2.5.1 Dev <- master backmerge (#1093)
* check if there as a pending transaction before marking transaction as a cancellation one * update pkg.json
This commit is contained in:
parent
3fdac537ec
commit
54ed00564b
|
@ -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