Skip to content

Bug: signing not working when connected via mobile wallet #1542

@wa0x6e

Description

@wa0x6e

Describe the bug

On a desktop app, when connecting using the qr code method with the mobile app, the dapp is connected to the mobile wallet, but unable to sign any messages using the provider's getSigner function.

Steps

Use this repo for reproduction: https://github.com/wa0x6e/coinbase-wallet-test
All the interesting code it in https://github.com/wa0x6e/coinbase-wallet-test/blob/main/src/App.vue

  1. click on connect
  2. in the modal, click on 'sign in or connect wallet'
  3. choose 'mobile app'
  4. Scan the qr code with your mobile wallet
  5. you should be connected
  6. in the dapp, click on 'sign transaction'
  7. it should ask to confirm the transaction on the phone
  8. go to your phone mobile wallet
  9. it shows the following message
    Image

Expected behavior

expectation is to ask the user to sign the message.

Note that it works without issues when:

  1. connecting via passkey
  2. connecting via chrome extension
  3. opening and connecting the dapp in the mobile wallet internal browser

Version

4.3.0

Additional info

the shipped version is not working as-is, it's throwing the error 'Buffer is not defined'.

Buffer is not available on the browser, and need to be polyfilled.

I am guessing that the issue may come from the code using the buffer, since all other scenario work without Buffer.

Desktop

No response

Smartphone

No response

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions