Open kantorcodes opened 1 month ago
@kantorcodes
we're struggling to reproduce.
The reproduction code does not cause the described behavior. Signer is returned throughout the lifecycle of the active session.
It should be taken into account that the signer can be deleted not only by calling disconnect or disconnectAll methods, but also by the user/wallet's initiative, as well as by session or pairing expiration.
It is possible to subscribe to session_delete, session_expire events for sessions and pairing_delete, pairing_expire event for pairings to handle these cases:
dAppConnector.walletConnectClient.on('session_delete', (pairing) => {
console.log('Dapp: Session deleted by wallet!')
})
dAppConnector.walletConnectClient.on('session_expire', (pairing) => {
console.log('Dapp: Session expire!')
})
dAppConnector.walletConnectClient.core.pairing.events.on('pairing_delete', (pairing) => {
console.log('Dapp: Pairing deleted by wallet!')
})
dAppConnector.walletConnectClient.core.pairing.events.on('pairing_expire', (pairing) => {
console.log('Dapp: Pairing expire!')
})
Describe the bug Sometimes calling
getSigner
does not return the Signer, even after a single refresh.To Reproduce Steps to reproduce the behavior:
Run:
Expected behavior: If you have not called
disconnect()
and the user has not manually disconnected then,getSigner()
should always return the signer.Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.