✨ app: support bridge kyc link#973
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds 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
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
🦋 Changeset detectedLatest 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2758166 to
d7c69f6
Compare
6ac9d89 to
b531c90
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/components/add-funds/RampWebView.tsx (1)
26-36:⚠️ Potential issue | 🟡 MinorMissing
onErrorhandler for iframe on web platform.The native
WebViewbranch wiresonErrorto bothonErrorandonHttpError, but the webiframebranch doesn't forward errors to the caller.Fees.tsxandStatus.tsxrely ononErrorto 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
⛔ Files ignored due to path filters (1)
src/assets/images/documents.svgis excluded by!**/*.svg
📒 Files selected for processing (6)
.changeset/bright-masks-attend.mdsrc/components/add-funds/Fees.tsxsrc/components/add-funds/RampWebView.tsxsrc/components/add-funds/Status.tsxsrc/i18n/es.jsonsrc/i18n/pt.json
Summary by CodeRabbit
New Features
Bug Fixes
Internationalization