Open AlexandrosGounis opened 3 months ago
Hi @AlexandrosGounis,
Unfortunately after addressing this issue, the very first time we load the page, signClient
always returns the old session.
However, refreshing the page fixes the issue.
I am having a hard time uploading my recording because of size limit. If you want I can share it on Slack. But basically, follow the same steps you mentioned with the build below. Look for a log in the console which says 'init session getAll'. That log shows all the sessions signClient is currently holding.
https://8c25eafaac5f00544f5f9dcc4e93141b6d63187e--beacon-sdk.netlify.app/dapp PR: #767
@IsaccoSordo, yes, as you mentioned, refreshing the page fixes the issue. However, this is not a signClient
issue. Our wallet-connect example works on every page load, without having to reload. There might be some other internal beacon issue that prevents the signClient
from getting the last active session.
Describe the bug (current behavior) Switching accounts on the wallet side while the DApp is closed, does not emit an event on the next page load.
To Reproduce
Request Permissions
, copy the QR code, open a new tap on ghostnet.kukai.app → Settings (cog icon) → SCAN QR CODE (this uses the wallet-connect transport) → paste the QR code payloadSET_ACTIVE_ACCOUNT
event, the address will not be updated since the wallet client is closed.https://github.com/airgap-it/beacon-sdk/assets/41209538/3fb29b08-c54c-458e-8e29-291367ea03e2
Expected (correct) behavior Sessions should not depend on an active wallet client. This indicates that the event system relies on the wallet to emit events regarding sessions.