[#2063] morph/client: Support new hash format in morph nns client

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
This commit is contained in:
Vladimir Domnich 2022-11-16 16:17:12 +03:00 committed by fyrchik
parent 584f465eee
commit b9a24e99dc
3 changed files with 18 additions and 1 deletions

View file

@ -261,6 +261,8 @@ func parseNNSResolveResult(res stackitem.Item) (util.Uint160, error) {
continue
}
// We support several formats for hash encoding, this logic should be maintained in sync
// with nnsResolve from pkg/morph/client/nns.go
h, err := util.Uint160DecodeStringLE(string(bs))
if err == nil {
return h, nil