Repository navigation
fix: stop wallet QR codes crashing the connect modal - #478
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Picking Rainbow, MetaMask or WalletConnect in the RainbowKit modal without that browser extension installed threw "invalid border=0" while rendering the QR code, and the app error boundary replaced the page with "Oh no, something broke". RainbowKit 2.2.11 (still the latest release) pins cuer 0.0.3, which calls qr's encodeQR with border: 0. cuer depends on qr "~0", and since 4b9760d the lockfile resolves qr 0.6.0, which rejects border <= 0. cuer 0.0.4 only adds qr 0.6 support: it requests border: 1 and trims that ring, producing the same grid. Resolve cuer to 0.0.4 until a RainbowKit release depends on it. Add a regression test that renders the cuer QR code and checks the grid size, so CI fails if a lock refresh pairs incompatible cuer / qr again.
kingjacob
force-pushed
the
fix/wallet-qr-crash
branch
from
November 14, 2026 20:55
1e1bff1 to
047948c
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On app.union.finance, picking Rainbow, MetaMask or WalletConnect in the connect modal crashes the app whenever that wallet falls back to a QR code (its browser extension isn't installed). RainbowKit throws
Error: invalid border=0while rendering the QR code, and the app's error boundary replaces the page with "Oh no, something broke". Base is unaffected (it opens its own popup), as is any wallet whose extension is installed.Cause
RainbowKit 2.2.11, still the latest release, pins
cuer@0.0.3, which encodes QR codes withqr'sencodeQR(value, "raw", { border: 0, … }).cuerdepends onqr~0, and since 4b9760d (the RainbowKit 2.2.11 bump) the lockfile resolvesqr@0.6.0, which rejectsborder <= 0(0.5.x only checked the type).Fix
package.jsonresolutions:"cuer": "0.0.4". Its only change isqr@0.6support: it asks forborder: 1and trims that ring off. The lockfile diff is just thecuerentry;qrstays at 0.6.0.src/providers/walletQrCode.test.jsx: renders theCuerQR code RainbowKit uses and checks the grid carries no border, so CI fails if a lock refresh pairs incompatiblecuer/qrversions again.The same fix is open upstream as rainbow-me/rainbowkit#2716 (unmerged; no RainbowKit release since 2.2.11). Drop the resolution once a RainbowKit release depends on
cuer@>=0.0.4.Verification
masterwithinvalid border=0and passes with this change.yarn test(57 passed),yarn lint(0 errors),yarn build.cuer@0.0.4+qr@0.6.0produce grids identical toqr@0.5.5withborder: 0(the pre-break output) for 4 WalletConnect-style URIs × 5 error-correction levels, so the codes scan as before.