-
Notifications
You must be signed in to change notification settings - Fork 465
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: allow removing counterfactual safes from safe list #4643
Conversation
Branch preview✅ Deploy successful! Storybook: |
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.
Code review by ChatGPT
if (safeAddress === address && safeChainId === chainId) { | ||
await router.push(AppRoutes.welcome.accounts) | ||
} | ||
dispatch(removeUndeployedSafe({ chainId, address })) | ||
dispatch(removeSafe({ chainId, address })) | ||
dispatch(removeAddressBookEntry({ chainId, address })) | ||
handleClose() |
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.
-
Consolidate
useSafeAddress
anduseChainId
within a custom hook or context if they are frequently used together to avoid code repetition. -
Add error-handling logic to
handleConfirm
for therouter.push
call to manage possible navigation failures.
📦 Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
1020.66 KB (🟡 +40 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!
Coverage report
Show files with reduced coverage 🔻
Test suite run success1675 tests passing in 228 suites. Report generated by 🧪jest coverage report action from 80d1563 |
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.
👍
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.
Looks good! 👍
I tested the following cases:
- Remove pinned, undeployed safe while open -> Redirects to the accounts page
- Remove unpinned, undeployed safe while open -> Redirects to the accounts page
- Remove pinned, undeployed safe on the accounts page -> Removes it and stays there
- Remove unpinned, undeployed safe on the accounts page -> Removes it and stays there
What it solves
Resolves #4611
How this PR fixes it
undeployedSafes
store as well as from theaddedSafes
store.How to test it
Screenshots
Checklist