Skip to content

Commit

Permalink
fix: Set pending state for batched transactions (#4298)
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan authored Oct 2, 2024
1 parent 40d571f commit 437689a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/tx-flow/flows/ExecuteBatch/ReviewBatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const ReviewBatch = ({ params }: { params: ExecuteBatchFlowProps }) => {
wallet.address,
safe.address.value,
overrides as Overrides & { nonce: number },
safe.nonce,
)
}

Expand Down
7 changes: 5 additions & 2 deletions src/services/tx/tx-sender/dispatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ export const dispatchCustomTxSpeedUp = async (
to,
groupKey: result?.hash,
txType: 'Custom',
nonce,
})

return result.hash
Expand Down Expand Up @@ -320,6 +321,7 @@ export const dispatchBatchExecution = async (
signerAddress: string,
safeAddress: string,
overrides: Omit<Overrides, 'nonce'> & { nonce: number },
nonce: number,
) => {
const groupKey = multiSendTxData

Expand All @@ -337,11 +339,11 @@ export const dispatchBatchExecution = async (
result = await multiSendContract.contract.connect(signer).multiSend(multiSendTxData, overrides)

txIds.forEach((txId) => {
txDispatch(TxEvent.EXECUTING, { txId, groupKey })
txDispatch(TxEvent.EXECUTING, { txId, groupKey, nonce })
})
} catch (err) {
txIds.forEach((txId) => {
txDispatch(TxEvent.FAILED, { txId, error: asError(err), groupKey })
txDispatch(TxEvent.FAILED, { txId, error: asError(err), groupKey, nonce })
})
throw err
}
Expand All @@ -357,6 +359,7 @@ export const dispatchBatchExecution = async (
txType: 'Custom',
data: txData,
to: txTo,
nonce,
})
})

Expand Down

0 comments on commit 437689a

Please sign in to comment.