Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: send with declared nonce 0 #5111

Merged
merged 1 commit into from
Dec 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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