Force a logout of the sandbox when the network changes
Describe the bug
I'm trying to deploy some contracts to testnet using the sandbox but I am unable to get the transaction to work with testnet.
To reproduce:
- Log in here: https://explorer.stacks.co/sandbox/deploy?chain=testnet
- Try to deploy the default contract
For me the above results in a mainnet transaction every time, and the profile within the sandbox always shows mainnet information.
I've tried changing the network to testnet in the explorer (in addition to using the URL above), and while the page refreshes and a dialog is shown, the behavior is the same.
This is using the Hiro Wallet extension in Brave, and I've also tried setting the wallet to testnet before logging into the sandbox and before the transaction without luck.
After playing around I got it to work by:
- Going to the home page (network was reset to mainnet)
- Selecting the testnet network (shows testnet mode badge)
- Clicking on the Sandbox in the top links
This time the profile and the sandbox itself are working with testnet - the issue only occurred when trying to change network on that page.
:tada: This issue has been resolved in version 1.70.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
The only remaining problem that I seem to be seeing today is when I am logged into the sandbox, then switch networks, then attempt to submit a transaction from the sandbox, the wallet popup will fail with the "Something went wrong" message. This is because the transaction being submitted is for the wrong network.
Could you force a logout of the sandbox when the network changes? Then I wouldn't be able to send a transaction without first connecting the wallet with the right network.