Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Conversation

@usame-algan
Copy link
Contributor

@usame-algan usame-algan commented Feb 1, 2022

What it solves

Resolves #3359

How this PR fixes it

We now take the pending state of a transaction into account to decide whether their replacement transaction should be disabled or not

How to test it

  1. Open the Safe
  2. Queue a Transaction
  3. Reject the queued Transaction
  4. Execute one of the transactions and confirm in Wallet
  5. Observe that the other transaction stays disabled while the executed one is pending
  6. Execute one of the transactions and reject in Wallet
  7. Observe that the other transaction becomes available again

Screenshots

Screenshot 2022-02-02 at 16 36 35

@github-actions
Copy link

github-actions bot commented Feb 1, 2022

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Feb 1, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@github-actions
Copy link

github-actions bot commented Feb 1, 2022

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@github-actions
Copy link

github-actions bot commented Feb 1, 2022

E2E Tests Failed
Check the results here: https://github.com/gnosis/safe-react-e2e-tests/actions/runs/1789467382

Failed tests:

  • ❌ Safe Apps List Safe Apps List
  • ❌ Read-only transaction creation and review Read-only transaction creation and review
  • ❌ Safe Balances Safe Balances

@coveralls
Copy link

coveralls commented Feb 1, 2022

Pull Request Test Coverage Report for Build 1789441569

  • 3 of 19 (15.79%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.07%) to 33.583%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/logic/safe/store/middleware/pendingTransactionsMiddleware.ts 0 1 0.0%
src/routes/safe/components/Transactions/TxList/TxCollapsedActions.tsx 0 3 0.0%
src/logic/safe/store/selectors/pendingTransactions.ts 3 8 37.5%
src/routes/safe/components/Transactions/TxList/TxQueueRow.tsx 0 7 0.0%
Totals Coverage Status
Change from base Build 1788322086: -0.07%
Covered Lines: 3167
Relevant Lines: 8462

💛 - Coveralls

@usame-algan usame-algan force-pushed the pending-tx-replacement branch from 2dc9611 to a6082c3 Compare February 2, 2022 14:20
@usame-algan usame-algan requested a review from iamacook February 2, 2022 15:41
Copy link
Contributor

@iamacook iamacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice selector! Just a couple things

@usame-algan usame-algan marked this pull request as ready for review February 2, 2022 15:43

useEffect(() => {
if (activeHover && activeHover !== transaction.id) {
if ((activeHover && activeHover !== transaction.id) || (!isPending && nonce === pendingTxNonce)) {
Copy link
Contributor

@iamacook iamacook Feb 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they are both undefined (nonce and pendingTxNonce) this condition will pass. You should check that they both exist as well.

@usame-algan usame-algan force-pushed the pending-tx-replacement branch from 4f3f253 to b7da931 Compare February 3, 2022 08:31
@usame-algan usame-algan force-pushed the pending-tx-replacement branch from b7da931 to ab4be46 Compare February 3, 2022 08:33

setTx(transaction)
}, [activeHover, transaction])
}, [activeHover, transaction, isPending, nonce, pendingTxNonce])
Copy link
Contributor

@iamacook iamacook Feb 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add isReplacementTxPending as a dependancy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixed it

Copy link
Contributor

@iamacook iamacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@usame-algan usame-algan merged commit 9cb83b0 into dev Feb 4, 2022
@usame-algan usame-algan deleted the pending-tx-replacement branch February 4, 2022 17:15
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pending transactions do not block their replacement counterparts

4 participants