We've observed that the WalletConnect session sometimes expires and returns that the connected wallet address is null, even if it was connected successfully before.
Here's how I was able to reproduce it with a Metamask wallet:
Connect a Metamask wallet using WalletConnectModalConnect widget.
After connecting a wallet, you'll observe isConnected is true and address is not null (in _onWalletUpdated listener).
Restart the app after connecting the wallet (within 10-15 seconds).
After the app launches, you'll observe isConnected is false and address is null.
Expected behavior
If the WalletConnect service returns isConnected as true and the connected address is not null, then at any point in the future, the session should stay connected unless I disconnect it manually.
Describe the bug
We've observed that the WalletConnect session sometimes expires and returns that the connected wallet address is null, even if it was connected successfully before.
To Reproduce
Initialize the WalletConnect session
```dart service = WalletConnectModalService( projectId: AppDotEnv.walletConnectProjectId, metadata: const PairingMetadata( name: 'orb', description: 'Everyday app for web3 social', url: 'https://orb.ac/', icons: ['https://i.ibb.co/w6sNHRC/launcher.png'], redirect: Redirect( native: 'orbapp://', universal: 'https://orb.ac/', ), ), recommendedWalletIds: { WalletUtils.metaMaskWalletId, WalletUtils.zerionWalletId, WalletUtils.trustWalletId, WalletUtils.rainbowWalletId, WalletUtils.bitgetWalletId, WalletUtils.imTokenWalletId, WalletUtils.omniWalletId, ... }, requiredNamespaces: { 'eip155': RequiredNamespace( methods: [ 'eth_sendTransaction', 'personal_sign', 'eth_sign', 'eth_signTypedData', ], chains: ['eip155:137'], events: [ 'chainChanged', 'accountsChanged', ], ), }, excludedWalletState: ExcludedWalletState.list, ); service!.addListener(_onWalletUpdated); await service!.init(); ```Here's how I was able to reproduce it with a Metamask wallet:
WalletConnectModalConnect
widget.isConnected
is true andaddress
is not null (in_onWalletUpdated
listener).isConnected
is false andaddress
is null.Expected behavior If the WalletConnect service returns
isConnected
as true and the connectedaddress
is not null, then at any point in the future, the session should stay connected unless I disconnect it manually.