Repository navigation
refactor(ramps/vba): adds onboarding route coordinator - #36764
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Smart E2E Test SelectionSelected E2E tags: SmokeMoney AI Confidence: 85 E2E reasoningExpand to readThe PR modifies the Virtual Bank Account (VBA) onboarding flow within the Ramp/Card feature area:
All changes are scoped to the Ramp/VBA/Card onboarding flow, which maps directly to No changes affect swap execution, transaction confirmations, accounts, networks, or other flows, so no other tags are warranted. The Performance reasoningExpand to readNo performance-sensitive code paths are modified. The changes are purely routing/navigation type definitions and a refactor of the VBA onboarding funnel logic (renaming types and abstracting destination IDs). No rendering, state management, asset loading, or app launch paths are affected. |
7520038 to
a4e5741
Compare
35c95df to
e064d12
Compare
e064d12 to
5c975ba
Compare
5c975ba to
25e4cfe
Compare
25e4cfe to
b617f00
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b617f00. Configure here.
| if (snapshot.kycStatus === 'approved') { | ||
| return snapshot.autorampStatus === 'ready' | ||
| ? 'complete' | ||
| : 'accountProvisioningError'; |
There was a problem hiding this comment.
Approved KYC treats in-progress as error
Medium Severity
When kycStatus is approved, any autorampStatus other than ready maps to accountProvisioningError. That includes the default not_ready in-progress value, not just retryable_failure. Users whose KYC just cleared while account provisioning is still running can land on the error screen instead of a waiting state.
Reviewed by Cursor Bugbot for commit b617f00. Configure here.
There was a problem hiding this comment.
Fixed. Approved KYC now maps ready to complete, retryable_failure to the provisioning error, and both not_ready and in_progress to the pending destination. Added coverage for both non-terminal statuses.
b617f00 to
faa82ea
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
faa82ea to
06b732e
Compare
weitingsun
left a comment
There was a problem hiding this comment.
navigation files LGTM
|





Description
Stack position: 1 of 4 remaining VBA onboarding PRs.
This PR has no UI. It is the coordinator that decides where a Virtual Bank Account user should be in onboarding.
Previously, each screen knew what came next. Resume was guesswork, and inserting or reordering steps required changing every screen.
Now one snapshot from
hydrateVbaOnboardingis the source of truth.getVbaDestinationForSnapshotwalks three client-owned modules — vendor terms, email, identity verification — and returns the first incomplete one. If all are complete, it maps controller status to pending, rejected, complete, or a provisioning error.Everything goes through
useOpenVbaOnboarding: entry, retry, and module completion all re-read facts and open the first incomplete destination. VBA screens live behind one feature-local navigator.Changelog
CHANGELOG entry: null
Related issues
Refs: MetaMask/core#10354
Manual testing steps
Screenshots/Recordings
N/A — architecture-only stack layer covered by unit tests.
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
Pre-merge reviewer checklist
Made with Cursor