Closed DaveVodrazka closed 1 year ago
☝️ if you can confirm that this is indeed a bug and not a problem on my side, let me know and I'll make a PR when I get to it 🙂
Can you link the dApp that you are trying to use? If the dApp doesn't support TESTNET2, the wallet will be disconnected and therefore won't emit "networkChanged" event.
Can you link the dApp that you are trying to use? If the dApp doesn't support TESTNET2, the wallet will be disconnected and therefore won't emit "networkChanged" event.
Hey @dhruvkelawala 👋
I'm experiencing a similar issue where accountsChanged
and networkChanged
are never triggered. I probably missed something but what do you mean by If the dApp doesn't support TESTNET2
?
Should we register somewhere which networks can be used?
Has this issue in regards to accountsChanged and networkChanged triggering been resolved?
Description
In the extension wallet, added event listeners via wallets
window.starknet_argentX.on("networkChanged", callback)
stops working if the network is switched toTestnet 2
.Steps To Reproduce
networkChanged
event - you can do so by passing this code into console:Mainnet
andTestnet
- you should seeSN_MAIN
andSN_GOERLI
being logged in the consoleTestnet 2
- you should seeundefined
being loggedTestnet
orMainnet
now the callback will not be fired (network won't be logged)Expected Outcome
Callback will be still working after switching to
Testnet 2
orDevnet
and back toTestnet
orMainnet
.Actual Outcome
Callback stops being called.