Skip to content

✨ app: support bridge kyc link#973

Merged
cruzdanilo merged 1 commit intomainfrom
link-ui
Apr 28, 2026
Merged

✨ app: support bridge kyc link#973
cruzdanilo merged 1 commit intomainfrom
link-ui

Conversation

@franm91
Copy link
Copy Markdown
Member

@franm91 franm91 commented Apr 22, 2026


Open in Devin Review

Summary by CodeRabbit

  • New Features

    • Added Bridge KYC link support in the add-funds flow with an in-app verification web view and a dedicated verification screen.
    • Onboarding now detects and prompts for additional KYC information when required.
  • Bug Fixes

    • Improved redirect handling and single-invocation protection for the embedded verification view; enhanced error handling with user-facing toasts and safer back-button layout.
  • Internationalization

    • Added Spanish and Portuguese translations for Bridge KYC messaging and “Complete verification.”

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a cross-platform RampWebView and integrates it into add-funds flows to handle Bridge KYC links and redirects; Status gains KYC state/UI and uses the webview for verification, Fees uses RampWebView for TOS, Spanish and Portuguese KYC strings added, and a changeset marks a patch release.

Changes

Cohort / File(s) Summary
Release Metadata
\.changeset/bright-masks-attend.md
New changeset marking @exactly/mobile as a patch release with note "support bridge kyc link".
RampWebView component
src/components/add-funds/RampWebView.tsx
New cross-platform component that renders an iframe (web) or WebView (native), detects navigation to redirectURL, invokes onRedirect once, and forwards onError callbacks.
Fees UI
src/components/add-funds/Fees.tsx
Replaced local TOSView with RampWebView; passes computed redirectURL, delegates onRedirect/onError, clears tosLink on navigate/error, adjusts back-button layout.
Status / KYC flow
src/components/add-funds/Status.tsx
Fetches ramp providers earlier, derives kycLink/needsMoreInfo, adds openKYC state, renders RampWebView for KYC with redirect/error handlers, updates UI/CTAs and invalidates ["ramp","providers"] on success.
Translations
src/i18n/es.json, src/i18n/pt.json
Added Spanish and Portuguese strings for Bridge "needs more information" messaging and "Complete verification" CTA.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Status as Status Component
    participant Providers as Providers Query
    participant Ramp as RampWebView
    participant Bridge as Bridge Service

    User->>Status: Open add-funds (bridge)
    Status->>Providers: Fetch providers (includes bridge.kycLink)
    Providers-->>Status: Return providers with kycLink
    Status->>User: Show "Complete verification" CTA
    User->>Status: Tap CTA
    Status->>Status: set openKYC = true
    Status->>Ramp: Render(uri=kycLink, redirectURL, onRedirect,onError)
    User->>Ramp: Complete KYC -> navigates to redirectURL
    Ramp->>Status: onRedirect(url)
    Status->>Status: close KYC (openKYC=false)
    Status->>Providers: Invalidate ["ramp","providers"]
    Status->>User: Close webview, refresh UI
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

high

Suggested reviewers

  • cruzdanilo
  • dieguezguille
  • nfmelendez
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title "✨ app: support bridge kyc link" directly and clearly summarizes the main changes across the changeset—adding KYC link support for the bridge provider through new components, logic, and translations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch link-ui

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.

❤️ Share

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

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 22, 2026

🦋 Changeset detected

Latest commit: acef232

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

gemini-code-assist[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.90%. Comparing base (7093014) to head (acef232).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #973      +/-   ##
==========================================
- Coverage   72.95%   72.90%   -0.05%     
==========================================
  Files         229      229              
  Lines        8671     8612      -59     
  Branches     2836     2802      -34     
==========================================
- Hits         6326     6279      -47     
- Misses       2103     2104       +1     
+ Partials      242      229      -13     
Flag Coverage Δ
e2e 71.14% <ø> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

sentry[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@franm91 franm91 force-pushed the link-ui branch 2 times, most recently from 6ac9d89 to b531c90 Compare April 22, 2026 15:03
devin-ai-integration[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
src/components/add-funds/RampWebView.tsx (1)

26-36: ⚠️ Potential issue | 🟡 Minor

Missing onError handler for iframe on web platform.

The native WebView branch wires onError to both onError and onHttpError, but the web iframe branch doesn't forward errors to the caller. Fees.tsx and Status.tsx rely on onError to close the webview and show feedback; without it, web users see no feedback on load failures.

Proposed fix
   if (Platform.OS === "web") {
     return React.createElement("iframe", {
       src: uri,
       style: { flex: 1, border: "none", width: "100%", height: "100%" },
+      onError: () => onError?.(),
       onLoad: (event: SyntheticEvent<HTMLIFrameElement>) => {
         try {
           const url = event.currentTarget.contentWindow?.location.href;
           if (url?.startsWith(redirectURL)) handleRedirect(url);
         } catch {} // eslint-disable-line no-empty -- cross-origin expected
       },
     });
   }

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0f433a51-721a-4832-bfd6-881b7a7bf434

📥 Commits

Reviewing files that changed from the base of the PR and between cd99d13 and 6fc070c.

⛔ Files ignored due to path filters (1)
  • src/assets/images/documents.svg is excluded by !**/*.svg
📒 Files selected for processing (6)
  • .changeset/bright-masks-attend.md
  • src/components/add-funds/Fees.tsx
  • src/components/add-funds/RampWebView.tsx
  • src/components/add-funds/Status.tsx
  • src/i18n/es.json
  • src/i18n/pt.json

coderabbitai[bot]

This comment was marked as resolved.

@cruzdanilo cruzdanilo merged commit acef232 into main Apr 28, 2026
14 of 15 checks passed
@cruzdanilo cruzdanilo deleted the link-ui branch April 28, 2026 22:23
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