family / connectkit

Connecting a wallet, made simple.
https://docs.family.co/connectkit
BSD 2-Clause "Simplified" License
846 stars 182 forks source link

[BUG] Unreadable QR code when connecting to Coinbase Wallet #358

Closed danielattilasimon closed 5 months ago

danielattilasimon commented 6 months ago

Describe the bug

ConnectKit renders an unreadable QR code when selecting Coinbase Wallet.

To reproduce

Visit https://docs.family.co/connectkit/try-it-out, click Connect Wallet, Coinbase Wallet. Attempt to read the QR code with Coinbase Wallet or any other app capable of QR code reading. None recognize the image as a valid QR code.

Expected behavior

The QR code should be readable by Coinbase Wallet, as well as generic QR code readers.

Environment details

I'm using the latest version of Coinbase Wallet on iOS, but I've also tried reading the QR code with alternative apps, such as the built-in Camera app, Cognex's Barcode Scanners app on the App Store and various QR reading web apps, with no luck.

Additional context

Using ConnectKit v1.7.2.

danielattilasimon commented 6 months ago

I did some experiments just now, in an effort to figure out what's wrong. I can make the QR code readable by upping the error correction level (by passing ecl="H" to <QRCode>), but still nothing happens after reading the code. It has something to do with the deeplink (https://go.cb-w.com/wc?uri=...). If I short-circuit the deeplinking, then it works:

getWalletConnectDeeplink: (uri) => {
    // return `https://go.cb-w.com/wc?uri=${encodeURIComponent(uri)}`;
    return uri;
},

I'm using the iOS version of Coinbase Wallet, I dunno if it works on Android.

brockpetrie commented 6 months ago

Any word on if this issue? We're trying to decide if we want to fork and tackle (less likely) or switch to a different wallet library (more likely).

lochie commented 6 months ago

Should have this issue resolved in this PR https://github.com/family/connectkit/pull/363, feel free to test here: https://connectkit-testbench-git-fix-qr-codes-avaraxyz.vercel.app/

danielattilasimon commented 6 months ago

Many thanks! 🙏

Looks to be working great on my end 👍 👍

robdoesstuff commented 6 months ago

Any ETA? We are on a blocked release because of this

lochie commented 5 months ago

This feature is now available in ConnectKit 1.7.3 🫡