Skip to content

Commit

Permalink
fix: send with declared nonce 0
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
  • Loading branch information
Jakub Sztandera committed Dec 3, 2020
1 parent 3196b2c commit 07afd93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 07afd93

Please sign in to comment.