rsksmart / rwallet

The RSK Wallet is based on our rWallet open-source code-base, which will allow developers and organizations to use it to build their own apps.
https://developers.rsk.co/wallet/
GNU General Public License v3.0
43 stars 22 forks source link

Dapp Browser does not `handleReject` correctly #655

Open jessgusclark opened 3 years ago

jessgusclark commented 3 years ago

Describe the bug (required) When using the Dapp browser, the user signs a transaction or message, and hits cancel, the handleReject function is fired. However, this error is not passed back to the sendAsync function.

In addition, the id property is not assigned or used. This may be the identifier that is used, although it is unclear. More investigation is required.

With PR #653 a hack was introduced to check if the response from RN is not undefined. If it is, it will throws a generic provider error.

App & Device (required) N/A

To Reproduce Steps to reproduce the behavior:

  1. Go to the dapp browser tab
  2. Log on to https://basic-sample.rlogin.identity.rifos.org/
  3. Click 'Connect with rLogin'
  4. Click 'Sign Message
  5. Click 'Cancel'
  6. Expected error message to be [ERROR]: User reject as shown here

Additional context Add any other context about the problem here.