cli/wallet: fix error handling

ineffectual assignment to err (ineffassign)

`err` is shadowed at `tx, err = c.CreateNEP11TransferTx()` line.
This commit is contained in:
Roman Khimov 2021-05-12 19:33:27 +03:00
parent 78bf172108
commit ec50bb4041

View file

@ -243,7 +243,9 @@ func signAndSendNEP11Transfer(ctx *cli.Context, c *client.Client, acc *wallet.Ac
err error
)
if amount != nil {
from, err := address.StringToUint160(acc.Address)
var from util.Uint160
from, err = address.StringToUint160(acc.Address)
if err != nil {
return cli.NewExitError(fmt.Errorf("bad account address: %w", err), 1)
}