app
app copied to clipboard
Add support for a "Switch network" prompt to Transact step
As soon as we go full multichain with our app, the app will no longer care what network the user is connected to as they navigate the app. Only when they trigger a transaction for a particular network will they need to switch to the right network before sending the TX.
For this situation, we should add a new "Switch wallet to chain X" prompt step within the new Transact step. In parallel, we can bring up a "Switch network" prompt in the user's wallet (if supported). As soon as the network is connected to the right wallet, it can move on to triggering the first TX.
In some cases, the user may not have added the network to their wallet yet at all. In that case, this step should first say "Add X chain to wallet", and we can also bring an "Add network" prompt up in the wallet automatically. Once that is done, the text should switch to "Switch wallet network to chain X", and we trigger the network change prompt.