From 465476201c7a4c1d4304cd51556ae84ba2d7c01a Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 20 Feb 2020 12:00:20 +0300 Subject: [PATCH] rpc/response: drop duplicating AccountState structure --- pkg/rpc/response/types.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/pkg/rpc/response/types.go b/pkg/rpc/response/types.go index cd0985b54..5b1e3ad79 100644 --- a/pkg/rpc/response/types.go +++ b/pkg/rpc/response/types.go @@ -27,7 +27,7 @@ type InvokeResult struct { // AccountState holds the getaccountstate response. type AccountState struct { Header - Result *Account `json:"result"` + Result *result.AccountState `json:"result"` } // Unspent represents server response to the `getunspents` command. @@ -36,22 +36,6 @@ type Unspent struct { Result *result.Unspents `json:"result,omitempty"` } -// Account represents details about a NEO account. -type Account struct { - Version int `json:"version"` - ScriptHash string `json:"script_hash"` - Frozen bool - // TODO: need to check this field out. - Votes []interface{} - Balances []*Balance -} - -// Balance represents details about a NEO account balance. -type Balance struct { - Asset string `json:"asset"` - Value string `json:"value"` -} - // Header is a generic JSON-RPC 2.0 response header (ID and JSON-RPC version). type Header struct { ID json.RawMessage `json:"id"`