Skip to content

Commit 58f37e5

Browse files
committed
rpcserver: add decimal display to asset stats rpc
1 parent 324bce0 commit 58f37e5

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
@@ -6488,6 +6488,13 @@ func (r *rpcServer) marshalAssetSyncSnapshot(ctx context.Context,
64886488
AnchorPoint: a.AnchorPoint.String(),
64896489
}
64906490

6491+
decDisplay, err := r.DecDisplayForAssetID(ctx, a.AssetID)
6492+
if err == nil {
6493+
decDisplay.WhenSome(func(u uint32) {
6494+
rpcAsset.DecimalDisplay = u
6495+
})
6496+
}
6497+
64916498
if a.GroupKey != nil {
64926499
resp.GroupKey = a.GroupKey.SerializeCompressed()
64936500
resp.GroupAnchor = rpcAsset

0 commit comments

Comments
 (0)