Skip to content

Commit

Permalink
Merge pull request #758 from nspcc-dev/rpc-fix-hash160
Browse files Browse the repository at this point in the history
rpc: fix invocations of contracts using hash160
  • Loading branch information
roman-khimov committed Mar 13, 2020
2 parents ec2a732 + c8f4eee commit ba1c3bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/rpc/request/param.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ func (p Param) GetUint160FromHex() (util.Uint160, error) {
if err != nil {
return util.Uint160{}, err
}
if len(s) == 2*util.Uint160Size+2 && s[0] == '0' && s[1] == 'x' {
s = s[2:]
}

return util.Uint160DecodeStringLE(s)
}
Expand Down

0 comments on commit ba1c3bf

Please sign in to comment.