We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5236dea + 4491aff commit 5e1529cCopy full SHA for 5e1529c
rpcserver.go
@@ -6668,7 +6668,16 @@ func (r *rpcServer) DecDisplayForAssetID(ctx context.Context,
6668
}
6669
6670
_, decDisplay, err := meta.GetDecDisplay()
6671
- if err != nil && !errors.Is(err, proof.ErrNotJSON) {
+ switch {
6672
+ // If it isn't JSON, or doesn't have a dec display, we'll just return 0
6673
+ // below.
6674
+ case errors.Is(err, proof.ErrNotJSON):
6675
+ fallthrough
6676
+ case errors.Is(err, proof.ErrDecDisplayMissing):
6677
6678
+ case errors.Is(err, proof.ErrDecDisplayInvalidType):
6679
+ break
6680
+ case err != nil:
6681
return 0, fmt.Errorf("unable to extract decimal "+
6682
"display for asset_id=%v :%v", id, err)
6683
0 commit comments