From 3e165d0f9a0648d0d9e8a93b218d0245839f1a73 Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Fri, 13 Dec 2024 18:24:41 +0100 Subject: [PATCH] fix(wallet)_: in case of sepolia optimism returned a nonce is not generated 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. --- transactions/transactor.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/transactions/transactor.go b/transactions/transactor.go index aefda2947a6..9e90067f805 100644 --- a/transactions/transactor.go +++ b/transactions/transactor.go @@ -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 optimim returns nonce differently than mainnet optimim, that's why we need to increment it by 1 + if chainID == wallet_common.OptimismSepolia { + nonce++ } }