Merge pull request #1092 from gnosis/cant-execute-first-tx

Bug 2.5.1: Can't execute a transaction if one of the previous transactions was empty
This commit is contained in:
Mikhail Mikheev 2020-07-06 15:00:15 +04:00 committed by GitHub
commit 807d3b4f5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "safe-react",
"version": "2.5.0",
"version": "2.5.1",
"description": "Allowing crypto users manage funds in a safer way",
"website": "https://github.com/gnosis/safe-react#readme",
"bugs": {

View File

@ -79,7 +79,10 @@ export type BatchProcessTxsProps = OutgoingTxs & {
const extractCancelAndOutgoingTxs = (safeAddress: string, outgoingTxs: TxServiceModel[]): OutgoingTxs => {
return outgoingTxs.reduce(
(acc, transaction) => {
if (isCancelTransaction(transaction, safeAddress)) {
if (
isCancelTransaction(transaction, safeAddress) &&
outgoingTxs.find((tx) => tx.nonce === transaction.nonce && !isCancelTransaction(tx, safeAddress))
) {
if (!isNaN(Number(transaction.nonce))) {
acc.cancellationTxs[transaction.nonce] = transaction
}