Skip to content

Commit

Permalink
use latest block nonce
Browse files Browse the repository at this point in the history
  • Loading branch information
rain-zxn committed Nov 9, 2022
1 parent 9a716c0 commit ecfb27a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions wallet/nonce.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ package wallet

import (
"context"
"math/big"

"github.com/ethereum/go-ethereum/common"
"github.com/polynetwork/bridge-common/chains/eth"
)
Expand All @@ -40,7 +38,7 @@ type RemoteNonceProvider struct {
}

func (p *RemoteNonceProvider) Acquire() (uint64, error) {
return p.sdk.Node().NonceAt(context.Background(), p.address, big.NewInt(-1))
return p.sdk.Node().NonceAt(context.Background(), p.address, nil)
}

func (p *RemoteNonceProvider) Update(success bool) {
Expand Down

0 comments on commit ecfb27a

Please sign in to comment.