From c21261639fb8bb9fd552cab687947fff4098a5f4 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..dd41a3e03b5 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 optimism returns nonce differently than mainnet optimism, that's why we need to increment it by 1 + if chainID == wallet_common.OptimismSepolia { + nonce++ } }