explorer icon indicating copy to clipboard operation
explorer copied to clipboard

Force a logout of the sandbox when the network changes

Open whoabuddy opened this issue 2 years ago • 3 comments

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:

  1. Log in here: https://explorer.stacks.co/sandbox/deploy?chain=testnet
  2. 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.

whoabuddy avatar Jan 04 '23 19:01 whoabuddy

After playing around I got it to work by:

  1. Going to the home page (network was reset to mainnet)
  2. Selecting the testnet network (shows testnet mode badge)
  3. 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.

whoabuddy avatar Jan 04 '23 19:01 whoabuddy

: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:

github-actions[bot] avatar Jan 27 '23 02:01 github-actions[bot]

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.

obycode avatar Mar 01 '23 20:03 obycode