From 07afd934437a6a07a6d69bc7576bd03821a4ec27 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Thu, 3 Dec 2020 18:36:34 +0100 Subject: [PATCH] fix: send with declared nonce 0 Signed-off-by: Jakub Sztandera --- cli/send.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/send.go b/cli/send.go index 14c1b263b..55ea8b028 100644 --- a/cli/send.go +++ b/cli/send.go @@ -43,10 +43,10 @@ var sendCmd = &cli.Command{ Usage: "specify gas limit", Value: 0, }, - &cli.Int64Flag{ + &cli.Uint64Flag{ Name: "nonce", Usage: "specify the nonce to use", - Value: -1, + Value: 0, }, &cli.Uint64Flag{ Name: "method", @@ -143,8 +143,8 @@ var sendCmd = &cli.Command{ Params: params, } - if cctx.Int64("nonce") > 0 { - msg.Nonce = uint64(cctx.Int64("nonce")) + if cctx.IsSet("nonce") { + msg.Nonce = cctx.Uint64("nonce") sm, err := api.WalletSignMessage(ctx, fromAddr, msg) if err != nil { return err