fix(add-money): stop truncating Bridge deposit reference to 10 chars#2415
fix(add-money): stop truncating Bridge deposit reference to 10 chars#2415abalinda wants to merge 4 commits into
Conversation
Users wired funds with the first 10 chars of the deposit reference, so Bridge could not match the incoming transfer and deposits sat in AWAITING_FUNDS until cancelled/returned. Display overflow (the original reason for the truncation) is handled with break-all instead, matching BridgeDepositInstructions.tsx.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Warning Review limit reached
Next review available in: 29 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughChangesDeposit reference handling
Estimated code review effort: 2 (Simple) | ~15 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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: 6109.87 → 6110.11 (+0.24) 🆕 New findings (7)
✅ Resolved (7)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
…nce presence Code-review findings: the literal 'Loading...' fallback could be shared as the deposit reference via ShareButton before onrampData resolved, and the reference expression was copy-pasted across four surfaces — the same structure that let the original truncation land on one surface only.
|
Closing — diagnosis superseded. The 10-char truncation is intentional (some banks, e.g. Wise, cap reference fields at 10 chars; Bridge matches deposits on the partial reference), so removing it was the wrong direction. The real customer-impacting bugs are (1) the transaction drawer showing the FULL reference while Add Money shows the truncated one (two-codes confusion) and (2) Cancel deposit firing instantly with no confirmation, right next to the support link. Replacement PR follows: uniform 10-char reference everywhere + confirmation step before cancelling. |
Summary
On the bank-transfer Add Money screen, the Bridge deposit reference was sliced to its first 10 characters in display, the copy button, the copy-all-details blob, and the confirmation summary (
AddMoneyBankDetails.tsx, 4 sites). Users wired funds with the truncated reference, Bridge couldn't reconcile the incoming transfer, and the deposit sat inAWAITING_FUNDSuntil cancelled/returned — a happy-path money-flow break confirmed via a real user case and a PostHog session recording.The truncation came in via
44c5beb63("limit deposit msg to 10 chars") — a display-overflow patch that also truncatedtextToCopy. This PR restores the fulldepositMessageeverywhere and solves the original overflow withbreak-all, matching the correct sibling implementation inBridgeDepositInstructions.tsx.Follow-up fixes from
/code-review high:depositReferenceconst — the per-surface copy-paste is what let the original bug land on some surfaces only.'Loading...'fallback could be shared as the deposit reference if tapped before onramp data resolved (same unreconcilable-wire outcome as the truncation).Previous
Now
Design notes / accepted trade-offs
'Loading...'display fallbacks stay (legit loading UI); only the machine-consumed paths (copy/share) are gated on real data.break-allis only needed on the 4xl display.AddMoneyBankDetailsandBridgeDepositInstructionsrender the same Bridge deposit instructions independently — that divergence is how this bug shipped. Consolidation is a follow-up.Risks / breaking changes
depositMessage; this is display/copy only.break-allkeeps it inside the card.main→ back-merge debt main→dev after merge.QA
__tests__/AddMoneyBankDetails.test.tsx(4 tests): full reference in display,textToCopy, double-check summary, and shareable text; no copy/share while the reference is loading. Red-checked: reintroducing the slice fails the suite.add-money-states.test.tsxstubs this component, so the regression tests live colocated with it instead.UI_REPO=worktree qa up): full 20-char sandbox reference renders, wraps, copies.