From 21873461587fdfdecce0729d5d5cc1a44b839673 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 23 Mar 2020 17:39:43 +0300 Subject: [PATCH] rpc: fix json marshalling of result.AssetState Modified result.AssetState: - removed `FeeMode` and `FeeAddress` fields - fixed json name of `ID` and `AssetType` fields to be consistent with C# RPC server --- pkg/rpc/response/result/asset_state.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/rpc/response/result/asset_state.go b/pkg/rpc/response/result/asset_state.go index 8d7ffe137..3c3d5f38d 100644 --- a/pkg/rpc/response/result/asset_state.go +++ b/pkg/rpc/response/result/asset_state.go @@ -10,14 +10,12 @@ import ( // AssetState wrapper used for the representation of // state.Asset on the RPC Server. type AssetState struct { - ID util.Uint256 `json:"assetID"` - AssetType transaction.AssetType `json:"assetType"` + ID util.Uint256 `json:"id"` + AssetType transaction.AssetType `json:"type"` Name string `json:"name"` Amount util.Fixed8 `json:"amount"` Available util.Fixed8 `json:"available"` Precision uint8 `json:"precision"` - FeeMode uint8 `json:"fee"` - FeeAddress util.Uint160 `json:"address"` Owner string `json:"owner"` Admin string `json:"admin"` Issuer string `json:"issuer"` @@ -34,8 +32,6 @@ func NewAssetState(a *state.Asset) AssetState { Amount: a.Amount, Available: a.Available, Precision: a.Precision, - FeeMode: a.FeeMode, - FeeAddress: a.FeeAddress, Owner: a.Owner.String(), Admin: address.Uint160ToString(a.Admin), Issuer: address.Uint160ToString(a.Issuer),