Skip to content

chore: back-merge main → dev (offramp migration deposit + invite fixes)#2343

Merged
Hugo0 merged 6 commits into
devfrom
chore/backmerge-main-2026-07-03-ui
Jul 3, 2026
Merged

chore: back-merge main → dev (offramp migration deposit + invite fixes)#2343
Hugo0 merged 6 commits into
devfrom
chore/backmerge-main-2026-07-03-ui

Conversation

@Hugo0

@Hugo0 Hugo0 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Brings the 4 offramp/invite commits that landed on main (add-money offramp migration deposit entry #2333 + review fixes, lowercase vanity-tag resolution, real OFFRAMP_USER badge code) back into dev so the dev→main release #2340 stays a clean superset.

Textually clean merge (zero overlap with the release payload). Typecheck + 1674 jest tests green on the merged tree.

Risks

None — pure sync of already-merged, already-in-prod main commits. No new code.

QA

Local gate: typecheck ✅, jest 1674 ✅ (108 suites).

kushagrasarathe and others added 6 commits July 2, 2026 20:22
offramp.xyz is shutting down and migrating users to peanut. give
offramp migrants a de-cluttered arbitrum deposit surface instead of the
full multi-chain crypto picker: same rhino EVM SDA (funds land on the
peanut arbitrum wallet), but stripped to a single arbitrum + usdc view
with offramp copy.

- gate a 'migrate from offramp' entry on the offramp badge (placeholder
  code, wired to the real badge once that PR lands)
- deep-link /add-money/crypto?network=EVM&source=offramp drives a new
  'offramp' variant of the crypto deposit view
- tag completions as offramp_migration for the growth dashboard

reuses the existing SDA creation, polling and success screen unchanged.
badge PRs (peanut-api-ts#1105, peanut-ui#2331) landed the link-granted
OFFRAMP_USER badge; wire the deposit-entry gate to it.
?campaign=offramp (and any UTM-mapped vanity tag passed via the explicit
campaign/campaignTag param) reached /badge/award raw and 400'd, since the
backend matches the badge code. Resolve it through the UTM map first so the
offramp migration link grants OFFRAMP_USER regardless of link shape.

depends on peanut-ui#2331 (adds the offramp UTM map entry) reaching this base.
…ted campaign resolution

Code-review + UX pass findings:
- pin network to EVM when source=offramp: a shared ?network=SOL&source=offramp
  link previously created a Solana deposit address rendered under Arbitrum-only
  labels — funds-confusion class
- migration-aware terminal states: success header 'Migration Complete', receipt
  fallbacks USDC/Arbitrum (was USDT + Ethereum icon when Rhino omits
  token/chain), failed-state copy points migrants back to their Offramp account
  instead of 'market moved / back to your wallet'
- retryable error state when deposit-address creation fails (was: screen
  instructs 'send USDC' with no address rendered at all — applies to the
  default crypto flow too)
- offramp-specific How to Migrate steps (generic modal said 'select one of the
  supported networks' — contradicting the single-network migration screen)
- 'Migration deposit address' + reuse-warning tooltip (was 'Your Arbitrum
  address', teaching users to save a constrained bridge endpoint as their
  wallet), per-transfer limit labels + split-into-parts hint
- post-claim routing: logged-in offramp claimants land on the migration screen,
  not /home
- campaign resolution extracted to resolveCampaign() in campaign-maps.ts with
  unit tests — encodes ?campaign= ≡ ?utm_campaign= deliberately; shared
  OFFRAMP_BADGE_CODE so the entry gate can't drift from the maps
…eposit-main

feat(add-money): offramp migration deposit entry
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
peanut-wallet Ready Ready Preview, Comment Jul 3, 2026 1:49am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 32 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e6dda0e-d1cc-43e1-8bcb-ddd9cdd7583d

📥 Commits

Reviewing files that changed from the base of the PR and between 10f3b8f and 60a875c.

📒 Files selected for processing (7)
  • src/app/(mobile-ui)/add-money/crypto/page.tsx
  • src/components/AddMoney/components/HowToDepositModal.tsx
  • src/components/AddMoney/views/AddMoneyMethodSelection.view.tsx
  • src/components/AddMoney/views/CryptoDeposit.view.tsx
  • src/components/Invites/InvitesPage.tsx
  • src/components/Invites/campaign-maps.test.ts
  • src/components/Invites/campaign-maps.ts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 5867.29 → 5872.35 (+5.06)
Findings: +3 net (+17 new, -14 resolved)

🆕 New findings (17)

  • critical complexity — src/components/Invites/InvitesPage.tsx — CC 54, MI 56.84, SLOC 126
  • high complexity — src/components/AddMoney/views/CryptoDeposit.view.tsx — CC 45, MI 62.95, SLOC 53
  • high method-complexity — src/components/AddMoney/views/CryptoDeposit.view.tsx:57 — CC 36 SLOC 33
  • medium high-mdd — src/components/AddMoney/views/CryptoDeposit.view.tsx:57 — CryptoDepositView: MDD 137.7 (uses across many lines from declarations)
  • medium high-mdd — src/components/Invites/InvitesPage.tsx:24 — InvitePageContent: MDD 56.7 (uses across many lines from declarations)
  • medium high-mdd — src/app/(mobile-ui)/add-money/crypto/page.tsx:24 — AddMoneyCryptoPage: MDD 42.2 (uses across many lines from declarations)
  • medium high-dlt — src/components/Invites/InvitesPage.tsx:24 — InvitePageContent: DLT 31 (calls 31 distinct functions — high context load)
  • medium high-mdd — src/components/AddMoney/views/AddMoneyMethodSelection.view.tsx:18 — AddMoneyMethodSelection: MDD 24.0 (uses across many lines from declarations)
  • medium complexity — src/app/(mobile-ui)/add-money/crypto/page.tsx — CC 20, MI 55.81, SLOC 103
  • medium method-complexity — src/components/Invites/InvitesPage.tsx:24 — InvitePageContent CC 15 SLOC 65
  • medium complexity — src/components/Invites/campaign-maps.ts — CC 14, MI 57.49, SLOC 40
  • medium complexity — src/components/AddMoney/components/HowToDepositModal.tsx — CC 7, MI 61.96, SLOC 27
  • low high-mdd — src/app/(mobile-ui)/add-money/crypto/page.tsx:71 — : MDD 18.8 (uses across many lines from declarations)
  • low high-dlt — src/app/(mobile-ui)/add-money/crypto/page.tsx:24 — AddMoneyCryptoPage: DLT 17 (calls 17 distinct functions — high context load)
  • low structural-dup — components/AddMoney/views/CryptoDeposit.view.tsx:113 — 13 duplicate lines / 55 tokens with components/AddMoney/views/RhinoDeposit.view.tsx:76
  • low high-mdd — src/components/AddMoney/components/HowToDepositModal.tsx:29 — HowToDepositModal: MDD 13.2 (uses across many lines from declarations)
  • low missing-return-type — src/components/Invites/InvitesPage.tsx:239 — InvitesPage: exported fn missing return type annotation

✅ Resolved (14)

  • src/components/Invites/InvitesPage.tsx — CC 57, MI 56.95, SLOC 125
  • src/components/AddMoney/views/CryptoDeposit.view.tsx:46 — CryptoDepositView: MDD 94.7 (uses across many lines from declarations)
  • src/components/Invites/InvitesPage.tsx:24 — InvitePageContent: MDD 55.5 (uses across many lines from declarations)
  • src/app/(mobile-ui)/add-money/crypto/page.tsx:24 — AddMoneyCryptoPage: MDD 32.6 (uses across many lines from declarations)
  • src/components/Invites/InvitesPage.tsx:24 — InvitePageContent: DLT 30 (calls 30 distinct functions — high context load)
  • src/components/AddMoney/views/AddMoneyMethodSelection.view.tsx:14 — AddMoneyMethodSelection: MDD 21.0 (uses across many lines from declarations)
  • src/components/AddMoney/views/CryptoDeposit.view.tsx — CC 21, MI 65.33, SLOC 48
  • src/components/Invites/InvitesPage.tsx:24 — InvitePageContent CC 19 SLOC 64
  • src/app/(mobile-ui)/add-money/crypto/page.tsx — CC 13, MI 55.65, SLOC 93
  • src/components/Invites/campaign-maps.ts — CC 6, MI 54.93, SLOC 36
  • src/app/(mobile-ui)/add-money/crypto/page.tsx:58 — : MDD 18.4 (uses across many lines from declarations)
  • src/app/(mobile-ui)/add-money/crypto/page.tsx:24 — AddMoneyCryptoPage: DLT 16 (calls 16 distinct functions — high context load)
  • components/AddMoney/views/CryptoDeposit.view.tsx:73 — 15 duplicate lines / 66 tokens with components/AddMoney/views/RhinoDeposit.view.tsx:74
  • src/components/Invites/InvitesPage.tsx:240 — InvitesPage: exported fn missing return type annotation

📈 Painscore deltas (top movers)

File Before After Δ
src/components/AddMoney/views/CryptoDeposit.view.tsx 7.8 9.7 +2.0
src/components/AddMoney/components/HowToDepositModal.tsx 4.6 6.3 +1.7
src/components/AddMoney/views/AddMoneyMethodSelection.view.tsx 4.2 4.8 +0.5

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • unit: 1677 ran, 0 failed, 0 skipped, 25.3s

📊 Coverage (unit)

metric %
statements 55.1%
branches 38.7%
functions 43.1%
lines 55.1%
⏱ 10 slowest test cases
time test
3.5s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › never places two stickers in heavy overlap (broad seed sweep)
0.5s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › every sticker stays within canvas at any count
0.4s src/app/actions/__tests__/api-headers.test.ts › should include Content-Type in updateUserById
0.3s src/app/actions/__tests__/api-headers-extended.test.ts › should not include apiKey in updateUserById body
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid 9-digit US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid US account with spaces
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle too long for US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid ETH address with surrounding spaces
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle maximum length (17 digits) US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid ETH address in lowercase
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

@Hugo0 Hugo0 merged commit 35cae78 into dev Jul 3, 2026
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants