perawallet / pera-wallet

Source code for Pera Wallet, simply the best Algorand wallet.
https://perawallet.app
Other
178 stars 62 forks source link

WalletConnect Issues - Duplicate Sessions, Scan QR Code #34

Closed ghost closed 11 months ago

ghost commented 2 years ago

We have implemented the Algorand WalletConnect integration using the following developer documentation, developer.algorand.org/docs/get-details/walletconnect

We have used WalletConnect v1.6.5 as this was the version used in the sample react app.

After releasing the integration, we came across the following two issues.

Duplicate Sessions

WalletConnect v1 sessions have an indefinite lifetime so we call killSession on the following events,

However, there are a few situations where the call to killSession does not complete (e.g. network issues, refreshing page, page unloads before killSession call completes) and causes multiple active sessions in the wallet. In this situation, sendCustomRequest calls do not seem to reach the wallet. The only way to recover is to manually disconnect all the sessions and start anew.

Is there anything we can do apart from providing a help message to the user asking them to clear out the WalletConnect sessions?

Screenshot_20211107-092015 (2)

Scan QR Code

There are three places in the Algorand wallet where a user has the option to scan a QR code,

Some users are accustomed to going into the send transaction screen before making a payment. When they use the "Scan QR" button there, the wallet is unable to scan the WalletConnect QR code but does not show any warning or error message.

This causes frustration for the user as they have no information on what is wrong.

To provide better guidance to users would it be possible to change any of the following,

As a workaroud from our side, we have provided the old payment prompt as a fallback option and have added some instructions on how to scan the QR code.

However, the payment prompt has its own issues (#31, clicking on the URI on Android does not trigger a transaction) and we would like to migrate away from it.

image

yigitguler commented 11 months ago

This issue should be fixed now. Can you please check again?