From ceb7ea97374dda902be38e4c87cfbea66ce1e6af Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 21 Sep 2020 17:25:43 +0300 Subject: [PATCH] rpc: allow both base58 and hex for Uint160 RPC server parameters `getunclaimedgas` RPC-call allows to use both base58 and hex representations for uint160. --- pkg/rpc/server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rpc/server/server.go b/pkg/rpc/server/server.go index 4be7e6f44..5d9f18bac 100644 --- a/pkg/rpc/server/server.go +++ b/pkg/rpc/server/server.go @@ -894,7 +894,7 @@ func (s *Server) getBlockHeader(reqParams request.Params) (interface{}, *respons // getUnclaimedGas returns unclaimed GAS amount of the specified address. func (s *Server) getUnclaimedGas(ps request.Params) (interface{}, *response.Error) { - u, err := ps.ValueWithType(0, request.StringT).GetUint160FromAddress() + u, err := ps.ValueWithType(0, request.StringT).GetUint160FromAddressOrHex() if err != nil { return nil, response.ErrInvalidParams }