Skip to content

Commit

Permalink
Fix balanceValue data type (CMW-524)
Browse files Browse the repository at this point in the history
koltsov-iv committed Sep 27, 2023
1 parent b7c6db3 commit b09c743
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rpc/response.go
Original file line number Diff line number Diff line change
@@ -24,8 +24,8 @@ type StateGetAuctionInfoResult struct {
}

type StateGetBalanceResult struct {
ApiVersion string `json:"api_version"`
BalanceValue uint64 `json:"balance_value,string"`
ApiVersion string `json:"api_version"`
BalanceValue clvalue.UInt512 `json:"balance_value"`
}

type StateGetAccountInfo struct {
2 changes: 1 addition & 1 deletion tests/rpc/rpc_client_test.go
Original file line number Diff line number Diff line change
@@ -204,7 +204,7 @@ func Test_DefaultClient_GetStateBalance(t *testing.T) {
"uref-7b12008bb757ee32caefb3f7a1f77d9f659ee7a4e21ad4950c4e0294000492eb-007",
)
require.NoError(t, err)
assert.NotEmpty(t, result.BalanceValue)
assert.Equal(t, "93000000000", result.BalanceValue.String())
}

func Test_DefaultClient_GetStateBalance_WithEmptyStateRootHash(t *testing.T) {

0 comments on commit b09c743

Please sign in to comment.