Skip to content

Commit

Permalink
fix(wallet)_: in case of sepolia optimism returned a nonce is not gen…
Browse files Browse the repository at this point in the history
…erated the same way as it is for optimism mainnet

Changes done here simply increment the resolved nonce by sepolia optimism chain by one, cause
it's differently generated that it is for mainnet sepolia and other chains. This change aligns on that.
  • Loading branch information
saledjenic committed Dec 15, 2024
1 parent 6685032 commit c212616
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion transactions/transactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ func (t *Transactor) NextNonce(rpcClient rpc.ClientInterface, chainID uint64, fr
if err != nil {
return 0, err
}
return nonce + countOfPendingTXs, nil
nonce = nonce + countOfPendingTXs
}
// sepolia optimism returns nonce differently than mainnet optimism, that's why we need to increment it by 1
if chainID == wallet_common.OptimismSepolia {
nonce++
}
}

Expand Down

0 comments on commit c212616

Please sign in to comment.