mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-22 19:29:39 +00:00
interop: refactor address.FromHash160 code
Make it more simple.
This commit is contained in:
parent
5d578fdd95
commit
24c107e3a2
1 changed files with 1 additions and 3 deletions
|
@ -29,8 +29,6 @@ func FromHash160(hash interop.Hash160) string {
|
|||
if len(hash) != interop.Hash160Len {
|
||||
panic("invalid Hash160 length")
|
||||
}
|
||||
var res = make([]byte, interop.Hash160Len+1)
|
||||
res[0] = byte(runtime.GetAddressVersion())
|
||||
copy(res[1:], hash) // @fixme #2696
|
||||
res := append([]byte{byte(runtime.GetAddressVersion())}, hash...)
|
||||
return std.Base58CheckEncode(res)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue