Skip to content

Commit 360a253

Browse files
authored
Merge pull request #1566 from jamaljsr/asset-stats-dec-display
rpcserver: add decimal display to asset stats rpc
2 parents 1e5dcb6 + 58f37e5 commit 360a253

File tree

4 files changed

+235
-212
lines changed

4 files changed

+235
-212
lines changed

rpcserver.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6504,6 +6504,13 @@ func (r *rpcServer) marshalAssetSyncSnapshot(ctx context.Context,
65046504
AnchorPoint: a.AnchorPoint.String(),
65056505
}
65066506

6507+
decDisplay, err := r.DecDisplayForAssetID(ctx, a.AssetID)
6508+
if err == nil {
6509+
decDisplay.WhenSome(func(u uint32) {
6510+
rpcAsset.DecimalDisplay = u
6511+
})
6512+
}
6513+
65076514
if a.GroupKey != nil {
65086515
resp.GroupKey = a.GroupKey.SerializeCompressed()
65096516
resp.GroupAnchor = rpcAsset

0 commit comments

Comments
 (0)