Skip to main content

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

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 comparing the active account publickey. What events, listeners, or automated checks can be used to detect changes in the selected network for the current wallet if the selected account publickey 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

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

Source Link
Wagg
  • 183
  • 9

What method should a dApp use to detect a change in Wallet Network for any wallet supported in the Solana Wallet Adapter?

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 comparing the active account publickey. What events, listeners, or automated checks can be used to detect changes in the selected network for the current wallet if the selected account publickey 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