-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [Counterfactual] Add event bus and pending state #3242
Conversation
Branch previewβ Deploy successful! |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Coverage report
Show new covered files π£
Show files with reduced coverage π»
Test suite run success1399 tests passing in 190 suites. Report generated by π§ͺjest coverage report action from 90a523c |
05fb6a2
to
2787771
Compare
π¦ Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. π€
|
Page | Size (compressed) |
---|---|
global |
1.02Β MB (π‘ +921Β B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Three Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
Page | Size (compressed) | First Load |
---|---|---|
/home |
41.27Β KB (π‘ +3Β B) |
1.06Β MB |
/new-safe/create |
31.91Β KB (π‘ +48Β B) |
1.06Β MB |
/settings/setup |
72.18Β KB (π‘ +108Β B) |
1.1Β MB |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link
is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll have to refactor all those event buses/associated notifications eventually. There are now regular txs, messages, safe creations. Lots of copypasta.
dc1031b
to
ce91d3a
Compare
# Conflicts: # src/features/counterfactual/utils.ts
The happy path and cleaning state work fine Question: I can't test the other 2 scenarios: The speeding up one is working in the sense that the safe is being deployed, but the pending state also never goes away, I don't get a "deployed" notification from the safe and I have to hard refresh to have the "undeployed safes" key from the local storage cleared So the question is. Should I ignore those 2 and test them in the RC? |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
I found a fix for this that wasn't documented in ethers v6 but now we should detect cancellations and speed-ups correctly. I also added one more test case to check that the Create button now has a loading state when in the safe creation flow. Noticed that it can take a second or two to find the next available nonce so its better to have a loading indication there. |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
@francovenica I fixed the issue that an error was shown even if there was a speed-up. There are still two other issues:
|
I tried twice and it works really well both times. Didn't have more issues LGTM |
What it solves
Part of #3156
How this PR fixes it
SafeCreationEvents
SafeCreationEvents
when deploying a counterfactual safeundeployedSafesSlice
SafeCreationEvents
How to test it
Happy path:
Pending state is persisted:
Sad path:
Cleaning state:
Creation Loading state:
Screenshots
Checklist