airgap-it / beacon-sdk

The beacon sdk allows developers of dApps and wallets on Tezos to implement the wallet interaction standard tzip-10.
https://walletbeacon.io
MIT License
100 stars 65 forks source link

fix: lazy connection for WC #705

Closed IsaccoSordo closed 7 months ago

IsaccoSordo commented 7 months ago

Previously we connected eagerly to all the transports because we need a URI to generate a sync QR code. This works really well for P2P transport, otherwise there's gonna be a visible delay before the QR gets displayed. Unfortunately whenever we initialize a WC instance, internally an expirer property set to 5 minutes is also load up. What this property does is to invalidate a pairing in the event a sync doesn't happen within the scheduled time. Therefore, the proposed change is to connect through walletconnect lazily to avoid setting up such counter for wallets on a different transport than WC.