Skip to content
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

feat: implement network switch #956

Merged
merged 68 commits into from
Feb 12, 2025
Merged

feat: implement network switch #956

merged 68 commits into from
Feb 12, 2025

Conversation

goga-m
Copy link
Contributor

@goga-m goga-m commented Feb 6, 2025

Summary

Closes https://app.clickup.com/t/86dvv87bz

  • Addition of mainsail mainnet network, with the default configs from PSDK.
  • usePortfolio hook now mutates & filters wallets based on the active network
  • A new hook useActiveNetwork is implemented, to provide the selected network, which can be used throughout the app and it's decoupled from wallets.
  • Network Step is removed from wallet creation & wallet import flows. It should always use the active network from the navigation.

For testing

  1. Enable Testnet toggle in Settings -> General -> Show Development Network.
  2. Import, create wallets and see them persisted per active network.
  3. The address selection is also per network.
  4. Votes page should also render data filtered by the active network.
  5. All the pages are reactive to the navigation network toggle,vso changing the network should re-render the page if necessary based on the selection.

A few more notes:

  • Existing profile wallet selections may not work, as the underlying structure has been changed and we need to re-apply the selection for existing profiles.
  • Wallet creation and import should work without issues with mainnet. However, as the existing config uses endpoints from testnet, you might see transactions & other network data from testnet. They can be ignored, and we can retest once we have the mainnet ready and pass the correct config in PSDK.
  • Default network is Testnet.
  • Mobile designs are not added yet, as we can inject the toggle once the navigation UI refactor will be ready in refactor: navbar styling #958
    UPDATE: UI designs should be updated as refactor: navbar styling #958 is merged.

Checklist

  • My changes look good in both light AND dark mode
  • The change is not hardcoded to a single network, but has multi-asset in mind
  • I checked my changes for obvious issues, debug statements and commented code
  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

Copy link

vercel bot commented Feb 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
arkvault ✅ Ready (Inspect) Visit Preview Feb 12, 2025 8:45am

@goga-m goga-m force-pushed the feat/network-switch branch from b1a9884 to 6b0d7dc Compare February 6, 2025 12:25
@goga-m
Copy link
Contributor Author

goga-m commented Feb 11, 2025

@ItsANameToo we should be ok now.

@ItsANameToo ItsANameToo added this to the mainsail-evm milestone Feb 12, 2025
@ItsANameToo ItsANameToo merged commit 3562fd3 into feat/evm Feb 12, 2025
18 checks passed
@ItsANameToo ItsANameToo deleted the feat/network-switch branch February 12, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants