mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-09 17:45:38 +00:00
Fix nonce 0 check (#1941)
This commit is contained in:
parent
9b2dd8141c
commit
ac920f0361
@ -80,11 +80,7 @@ export const createTransaction = (
|
|||||||
const safeInstance = await getGnosisSafeInstanceAt(safeAddress)
|
const safeInstance = await getGnosisSafeInstanceAt(safeAddress)
|
||||||
const lastTx = await getLastTx(safeAddress)
|
const lastTx = await getLastTx(safeAddress)
|
||||||
const nextNonce = await getNewTxNonce(lastTx, safeInstance)
|
const nextNonce = await getNewTxNonce(lastTx, safeInstance)
|
||||||
|
const nonce = txNonce !== undefined ? txNonce.toString() : nextNonce
|
||||||
let nonce = nextNonce
|
|
||||||
if (txNonce !== undefined) {
|
|
||||||
nonce = txNonce.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
const isExecution = await shouldExecuteTransaction(safeInstance, nonce, lastTx)
|
const isExecution = await shouldExecuteTransaction(safeInstance, nonce, lastTx)
|
||||||
const safeVersion = await getCurrentSafeVersion(safeInstance)
|
const safeVersion = await getCurrentSafeVersion(safeInstance)
|
||||||
|
@ -88,11 +88,10 @@ export const useTransactionParameters = (props?: Props): TxParameters => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const safeNonce = Number(props?.initialSafeNonce || 0)
|
|
||||||
if (safeNonce === undefined) {
|
if (safeNonce === undefined) {
|
||||||
getSafeNonce()
|
getSafeNonce()
|
||||||
}
|
}
|
||||||
}, [safeAddress, props?.initialSafeNonce])
|
}, [safeAddress, safeNonce])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
safeNonce,
|
safeNonce,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user