feat(TRAM-3997): launch Sumsub through KycController after VBA email collection - #36081
Conversation
Replace the client-side KYC API fetch in useKycDisclaimers with KycController.loadDisclaimers so Iron/MoonPay vendor terms use a single Engine source of truth. Wires preview @metamask/kyc-controller with minimal KycService/KycController init for disclaimer loading only. TRAM-3978 Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
…ers-from-controller
…ers-from-controller
…ntroller' into feat/vba-kyc-disclaimers-from-controller
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
…ntroller' into feat/vba-kyc-disclaimers-from-controller
…rrectly for iron already)
…-kyc-verify-identity-fetch-disclaimers
Co-authored-by: Cursor <cursoragent@cursor.com>
… customer Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
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 0c18346. Configure here.
Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|




Description
Before this PR, the VBA email screen launched Sumsub from the UI with
MOCK_SUMSUB_APPLICANT_ACCESS_TOKEN, andKycControllerwas constructed with a no-op launcher.Now after customer creation,
sumSubLauncheris injected intoKycController, and verification is started through the controller.KycController.fetchSessionDisclaimers({ country })and callsacceptTermsAndStartSessionwithproduct: 'money'and the catalog consents.POST /sessions/{sessionId}/journey(KycService:createJourney) and hands it to the launcher. Token expiry re-calls the same endpoint.sumsub.status === 'abandoned') is not treated as an error.KycServicenow receivesidosEnclaveBaseUrlandidosRelayBaseUrlsostartSumSubcan fetch the JWKS it verifies the session encryption schemas against before reaching the journey call.@metamask/kyc-controlleris bumped to0.2.0-preview-97d6b86c0.Get Pix Key still loads vendor T&Cs via
initialize+loadDisclaimers; initialize now also passesproduct: 'money'so the KYC-required check and Sumsub hand-off stay scoped to Money.Changelog
CHANGELOG entry: Sumsub flow opens after email submission.
Related issues
Fixes: TRAM-3997
Manual testing steps
Screenshots/Recordings
Before
N/A
After
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-09-10.at.19.30.10.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
High Risk
Changes identity verification orchestration, UKYC session/consent posting, and real SumSub token flow—security- and compliance-sensitive paths with new idOS backend configuration.
Overview
Routes VBA identity verification through
KycControllerinstead of launching SumSub from the email screen with a mock applicant token.After the user submits email,
useKycEmailVerificationcreates the Iron customer, loads the pre-session idOS/SumSub catalog viafetchSessionDisclaimers, then callsacceptTermsAndStartSessionwithproduct: 'money'and catalog consent keys. SumSub presentation is owned by the controller via an injected Engine-levelsumsubLauncher(the UI-locallaunchSumSubSdkhelper andkycSumSubLauncherStubare removed). Closing SumSub withsumsub.status === 'abandoned'is treated as a non-error exit; missing vendor T&Cs on the prior Get Pix Key step surfaces a dedicated alert.Get Pix Key disclaimer loading now passes
product: 'money'onKycController.initialize.KycServiceinit wiresIDOS_ENCLAVE_URL/IDOS_RELAY_URL(with UAT defaults andbuilds.yml/ Jest env updates).Reviewed by Cursor Bugbot for commit b310f84. Bugbot is set up for automated code reviews on this repo. Configure here.