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

Broadcast local status updates #3321

Merged
merged 6 commits into from
Jan 19, 2022
Merged

Broadcast local status updates #3321

merged 6 commits into from
Jan 19, 2022

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Jan 18, 2022

What it solves

Resolves #3223

How this PR fixes it

When 'local' status updates occur, they are broadcast via a BroadcastChannel that then dispatches the payload once more with an extra flag to prevent endless broadcasts.

Note: this is NOT supported by Safari.

How to test it

  1. Queue a transaction and ensure that it has sufficient confirmations.
  2. Open the same Safe on the queue list in a separate window.
  3. Execute the transaction from one window and observe the transaction statuses sync across the both.

Screenshots

status sync

@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Jan 18, 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

@coveralls
Copy link

coveralls commented Jan 18, 2022

Pull Request Test Coverage Report for Build 1719849546

  • 3 of 9 (33.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 32.005%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/logic/safe/store/middleware/localTransactionsMiddleware.ts 3 9 33.33%
Totals Coverage Status
Change from base Build 1718917186: -0.02%
Covered Lines: 3115
Relevant Lines: 8672

💛 - Coveralls

@github-actions
Copy link

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@github-actions
Copy link

github-actions bot commented Jan 18, 2022

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

Failed tests:

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

@@ -56,7 +56,7 @@ export const processTransaction = (props: ProcessTransactionArgs): ProcessTransa
safeAddress: props.safeAddress,
to: tx.to,
txData: tx.data ?? EMPTY_DATA,
txNonce: '',
txNonce: tx.nonce,
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the refactoring fix that was merged into dev.

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

Awesome, so simple!

Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

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

Well done!

@francovenica
Copy link
Contributor

So I was able to see it work with a safe 1 out of x owners.

But I tried with other safes of 2 out of x but is not working because of the issue #3305 .
Also rejections are not working as well, but I cannot know if it is because of the 3305 or because of this PR (I assume is because of the 3305, but I want to be sure)

@iamacook
Copy link
Member Author

I tried with other safes of 2 out of x but is not working because of the issue #3305 . Also rejections are not working as well, but I cannot know if it is because of the 3305 or because of this PR (I assume is because of the 3305, but I want to be sure)

I have just merged dev into this PR. Please lmk if it helps.

@francovenica
Copy link
Contributor

Thanks for applying the fix. It works fine now
I was able to test this PR in safes 2/x and test rejections. Both tabs share the tx status (usually a tab updates first and the other updates after 5 secs or so)

@iamacook iamacook merged commit 41a7cbf into dev Jan 19, 2022
@iamacook iamacook deleted the sync-tx-statuses branch January 19, 2022 21:19
@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 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.

Local tx statuses aren't shared across tabs
5 participants