rpc: allow both base58 and hex for Uint160 RPC server parameters

`getunclaimedgas` RPC-call allows to use both base58 and hex
representations for uint160.
This commit is contained in:
Anna Shaleva 2020-09-21 17:25:43 +03:00
parent 19a2e3bb91
commit ceb7ea9737

View file

@ -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
}