fuels-wallet
fuels-wallet copied to clipboard
[wallet sdk] A `switchNetwork` method
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
@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
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