When building a Solana dApp, developers need to understand changes in both the active wallet for the current user, and in changes to the selected network for that wallet. Changes to the active wallet can be detected through events or by comparing the active account publickeypublic key. What events, listeners, or automated checks can be used to detect changes in the selected network for the current wallet if the selected account publickeypublic key stays the same (i.e. on mainnet-beta and testnet)?
For reference, this question is centered around event detection across all wallets supported in @solana/wallet-adapter
.
Link to Repo: https://github.com/solana-labs/wallet-adapter