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

[wallet sdk] A switchNetwork method #1163

Closed
Dhaiwat10 opened this issue Mar 21, 2024 · 2 comments · Fixed by #1468, FuelLabs/fuel-connectors#251 or FuelLabs/fuel-connectors#252
Closed
Assignees

Comments

@Dhaiwat10
Copy link

Motivation

Currently we do not have a switchNetwork method that would prompt a popup that would let users switch to a different network in the wallet.

Would be nice if we can have a counterpart React Hook for this as well.

Usage example

No response

Possible implementations

No response

@arboleya
Copy link
Member

@LuizAsFight Do you think we could prioritize this?

This will help increase the experience on the dApp we generate via create fuels CLI.

cc @Dhaiwat10 @petertonysmith94

@LuizAsFight LuizAsFight added the p1 label Jun 14, 2024
@LuizAsFight
Copy link
Contributor

LuizAsFight commented Jun 14, 2024

one idea here is:

to avoid changing connectors spec with a new method and avoid create new hooks, we can:

instead of adding a new method switchNetwork, we can make the addNetwork work on this way:

  • if the network inputted to add doesn't exist, it will be added
  • if the network inputted to add exists, we start a switchNetwork flow inside of the application

on this way, the change would be only on application level, to support this new flow. connectors / hooks would not need changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants