diff --git a/src/logic/safe/store/actions/createTransaction.ts b/src/logic/safe/store/actions/createTransaction.ts index 81b48d91..8aeadd91 100644 --- a/src/logic/safe/store/actions/createTransaction.ts +++ b/src/logic/safe/store/actions/createTransaction.ts @@ -80,11 +80,7 @@ export const createTransaction = ( const safeInstance = await getGnosisSafeInstanceAt(safeAddress) const lastTx = await getLastTx(safeAddress) const nextNonce = await getNewTxNonce(lastTx, safeInstance) - - let nonce = nextNonce - if (txNonce !== undefined) { - nonce = txNonce.toString() - } + const nonce = txNonce !== undefined ? txNonce.toString() : nextNonce const isExecution = await shouldExecuteTransaction(safeInstance, nonce, lastTx) const safeVersion = await getCurrentSafeVersion(safeInstance) diff --git a/src/routes/safe/container/hooks/useTransactionParameters.ts b/src/routes/safe/container/hooks/useTransactionParameters.ts index 0c84a34d..1185c765 100644 --- a/src/routes/safe/container/hooks/useTransactionParameters.ts +++ b/src/routes/safe/container/hooks/useTransactionParameters.ts @@ -88,11 +88,10 @@ export const useTransactionParameters = (props?: Props): TxParameters => { } } - const safeNonce = Number(props?.initialSafeNonce || 0) if (safeNonce === undefined) { getSafeNonce() } - }, [safeAddress, props?.initialSafeNonce]) + }, [safeAddress, safeNonce]) return { safeNonce,