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:
commit
807d3b4f5c
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "safe-react",
|
"name": "safe-react",
|
||||||
"version": "2.5.0",
|
"version": "2.5.1",
|
||||||
"description": "Allowing crypto users manage funds in a safer way",
|
"description": "Allowing crypto users manage funds in a safer way",
|
||||||
"website": "https://github.com/gnosis/safe-react#readme",
|
"website": "https://github.com/gnosis/safe-react#readme",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|
|
@ -79,7 +79,10 @@ export type BatchProcessTxsProps = OutgoingTxs & {
|
||||||
const extractCancelAndOutgoingTxs = (safeAddress: string, outgoingTxs: TxServiceModel[]): OutgoingTxs => {
|
const extractCancelAndOutgoingTxs = (safeAddress: string, outgoingTxs: TxServiceModel[]): OutgoingTxs => {
|
||||||
return outgoingTxs.reduce(
|
return outgoingTxs.reduce(
|
||||||
(acc, transaction) => {
|
(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))) {
|
if (!isNaN(Number(transaction.nonce))) {
|
||||||
acc.cancellationTxs[transaction.nonce] = transaction
|
acc.cancellationTxs[transaction.nonce] = transaction
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue