-
Notifications
You must be signed in to change notification settings - Fork 408
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
Refactor: minimize the usage of the static chains config #1692
Conversation
Branch preview✅ Deploy successful! |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
@iamacook I've also removed our config and use that from safe-core-sdk-utils instead. It's better because it's now consistent with the Core SDK's chain support which we depend on already. |
Co-authored-by: Aaron Cook <aaron@safe.global>
LGTM Being switching networks around, switching between safes, checking the switching the network in the safe creation, checking the "switch to x network" button when the wallet is in the wrong network. |
What it solves
New chains are popping up like mushrooms and the static chainId<->shortName config becomes a hurdle when adding new chain support via the config service.
I removed all the places where looking up a shortName in the static config was blocking the UI if the chain isn't there.
useChainId
still relies on the static config to resolve a shortName from the URL faster, but it will now also look it up in the remote config. This means that loading a page on a chain that isn't in the config will redirect to the default chain (because the remote chains wouldn't be loaded instantly), but navigating to that chain via the menu will be still possible.How to test
Test opening different chains, and also reloading the page on a given chain.