fix: EIP-681 QR scans 404 — recipient guard rejects address@chainId#2427
fix: EIP-681 QR scans 404 — recipient guard rejects address@chainId#2427abalinda wants to merge 20 commits into
Conversation
…rozone Bridge now supports SEPA for Albania, Moldova, Montenegro, North Macedonia and Serbia (TASK-20580) — surface the bank rail as available instead of 'Soon' for deposit and withdraw, and show the standard EUR-accounts-only warning for the four that keep a domestic currency. Bulgaria adopted the euro in Jan 2026: badge EUR instead of BGN and drop the stale non-EUR SEPA warning.
The map already carried US/GB/CH and now the 2025/26 SEPA joiners; the old label invited a 'clean up non-EEA entries' edit that would disable live rails.
Signed-off-by: ab <78670703+abalinda@users.noreply.github.com>
…at check gates CI
feat: enable SEPA bank rail for AL/MD/ME/MK/RS + treat Bulgaria as Eurozone
…rnels Three accounts carry validNonceFrom > currentNonce (left by the 2025-09-18 root-validator migration wave); Kernel v3.1 rejects every enable-mode card approval below that floor with InvalidNonce, so auto-balance fails hourly forever and no re-grant can help — the account state itself is the poison. A fourth account is undeployed with a v0.0.3-initCode approval (AA14). Hidden support page (not linked anywhere): diagnoses the account on-chain, sends the matching repair userOp (invalidateNonce(floor+1), or the migration no-op deploy), confirms against re-read chain state, then re-grants — the existing session-approve route stores the fresh approval and kicks off a funding run immediately.
- diagnose keyed on the async zerodev address (mount-only effect left the page dead on a cold load from a support DM — the exact target flow) - repair() re-diagnoses live state before sending, so a retry after a confirm-poll timeout can't re-send an already-consumed invalidateNonce - guard the Kernel v3.1 invalidation cap (floor > currentNonce+10 has no valid target — fail with clear copy instead of burning doomed passkey taps) - step 2 respects the card-overview loading state instead of flashing 'no active card — contact support' at users on the success path - 'Check again' affordance after a failed diagnosis; dismissed passkey sheets are quiet no-ops, matching the grant path; drop the dead lastError render condition and the type export from the hook file
…lse negatives on laggy RPCs
…e-repair feat(card): /fix-card-signature — guided repair for enable-bricked kernel accounts
A user cancelled a funded bank deposit while trying to report a problem: the cancel button sits next to the support link and fired instantly with no confirmation (PostHog: 'Issues with this transaction?' at 09:03:00, 'Cancel deposit' 11s later), making the arriving wire unmatchable. The drawer also showed the FULL deposit reference while Add Money shows the intentionally shortened 10-char form (some banks cap reference fields; Bridge matches on the partial) — the two-different-codes confusion that sent the user hunting in the drawer to begin with.
…a vaul drawer Root cause of the phantom deposit cancels: vaul sets pointer-events:none on body while the transaction drawer is open, and the SupportDrawer's backdrop/panel never re-enabled pointer events — the whole support overlay was click-transparent, so taps on it fell through to the receipt underneath, where 'Cancel deposit' sits adjacent to the support link and fired irreversibly (PostHog: support link 15:05:47.7 → fall-through click on Cancel deposit 15:05:48.8 → BE cancel 15:05:49.4). Also per code review: single shortDepositReference() helper for the 6 reference sites across both screens, separate confirm-modal visibility from the armed action (noun flashed mid-fade), drop no-op icon props.
… twice CodeRabbit finding: two taps during the modal fade both see the armed action and start concurrent cancellations. Ref guard, not state — a same-frame double-tap lands before any re-render.
…rmation fix(deposits): stop support-chat clicks from cancelling deposits + confirm-before-cancel + uniform reference
Bumps src/content to peanut-content hotfix 32f5b91 (off current prod pointer f3c0ef66): removes personal phone number + swaps help@ -> support@ in the card legal docs. Isolated from the in-flight tos-v1 rework so it passes content verification and ships to peanut.me now.
…tact-hotfix content: publish card-legal contact hotfix (remove phone number, help@ → support@)
…3a05f7) Bumps src/content on production (main) from 32f5b91 → e3a05f7 (peanut-content latest = mono@83166e9). Single-file submodule pointer change. Publishes content already merged + mirrored from mono that the dev-targeted auto-PRs never promote to main.
…202607151650 content: publish legal docs overhaul to production (tos-v1)
The Feb-21 SEO guard (couldBeRecipient) only whitelisted bare EVM addresses, so the QR scanner's EIP-681 path — which builds /0x…@42161/34.4USDC and is fully supported by the downstream url parser — dead-ended on a 404 for every real-world EIP-681 payment QR. Strip the @chain suffix before the address/ENS checks; chain validation still happens downstream.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthrough
ChangesRecipient deep-link recognition
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code-analysis diffPainscore total: 6122.01 → 6122.26 (+0.25) 🆕 New findings (6)
✅ Resolved (6)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
…ed amount segments The widened recipient guard makes /0x…@chain/<garbage-amount> URLs reach generateMetadata, where an unguarded parseAmountAndToken throw 500'd the render (pre-existing for /username/<garbage>, now wider). Fall back to default metadata instead.
|
Retargeted to Is this already fixed on dev? No — web is still broken. Conflicts: none — verified with Heads-up before merging: this branch is based on main's tip, and main is currently 18 commits ahead of dev (content publishes + #2416). Merging this PR into dev therefore also performs that main→dev back-merge. All 18 are legitimately destined for dev, but if you'd rather keep this PR's diff to the 2 fix commits, say the word and I'll rebase it onto dev (needs a force-push). |
Why
Scanning any real-world EIP-681 payment QR (e.g.
ethereum:USDC@42161/transfer?address=0x…&uint256=3.44e7) dead-ends on the 404 page. The scanner parses it correctly and builds/0x…@42161/34.4USDC, and the url parser downstream fully supportsrecipient@chain— butcouldBeRecipient(the Feb-21/es/argentinaSEO-regression guard) tests the EVM-address regex against the full segment including the@42161suffix, fails, andnotFound()s.Repro: Konrad's scan 07-15 13:54 UTC (PostHog
qr_scanned, qr_type EIP_681, Crisp session_50bb92f0).What
couldBeRecipient: strip the@chainsuffix before the address/ENS checks (it was already stripped for the username check). Chain validation still happens downstream. Also collapsed the deadincludes('@')ternary (split('@')[0]is equivalent).generateMetadata([...recipient]/page.tsx): wrappedparseAmountAndTokenin try/catch — it throws on malformed amount segments and the widened guard makes/0x…@chain/<garbage>URLs reach it (was pre-existing for/username/<garbage>); now falls back to default metadata instead of 500ing.Design notes / accepted trade-offs
/0xADDR@<invalid-chain>now renders a 200 with a clean "Invalid chain" ErrorAlert instead of a hard 404 (bogus-profile rendering is impossible — @-suffixed inputs never reach PublicProfile). These URLs were never indexable pre-fix, so crawl exposure is negligible. Tracked with other follow-ups in Recipient route guard duplicates parser rules with no contract test (drift risk) #2428.Testing
0xADDR@42161, percent-encoded%4042161,vitalik.eth@arbitrum→ accepted; all locale-regression guards still pass.🤖 Generated with Claude Code