mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-27 15:42:54 +00:00
cli/wallet: swap name/address checks for token identification
Address identification must have a priority, another token can have this address in its name, but when there is a hash specified we should take the one with proper hash.
This commit is contained in:
parent
8e2df8902c
commit
e3dfb5d165
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ func getMatchingTokenAux(ctx *cli.Context, get func(i int) *wallet.Token, n int,
|
|||
var count int
|
||||
for i := 0; i < n; i++ {
|
||||
t := get(i)
|
||||
if t != nil && (t.Name == name || t.Symbol == name || t.Address() == name || t.Hash.StringLE() == name) {
|
||||
if t != nil && (t.Hash.StringLE() == name || t.Address() == name || t.Symbol == name || t.Name == name) {
|
||||
if count == 1 {
|
||||
printTokenInfo(ctx, token)
|
||||
printTokenInfo(ctx, t)
|
||||
|
|
Loading…
Reference in a new issue