Neobank demo - #9853
Conversation
Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
…b flow opening 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>
… been reset 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>
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>
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>
|
@metamaskbot publish-previews |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Caution MetaMask internal reviewing guidelines:
|
Autoramp creation needs the MoonPay customer id, which is owned by
KycController and captured from the Check/Auth frames. Rather than have
the UI read and plumb it, expose a narrow KycController:getCustomerIdentity
action returning the vendor-scoped { vendor, id } (or null before auth and
after reset), so consumers do not need access to the full KYC state, which
also holds session and access tokens.
RampsController.createAutoramp resolves that identity over the messenger,
injects customer_id into the request, forwards the body to
NeoBankService:createAutoramp, and applies the returned snapshot. The id is
session-scoped and is never persisted by RampsController.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
@metamaskbot publish-previews |
|
KYC + Iron status on this demo branch: For mobile demo consumers: after #9855 merges, comment |
## Summary - `neobank-demo` already includes Sébastien’s `feat/kyc-controller` stack and the Iron feature commit from #9852 (`a40fa2fc3f`, merged by George). - This PR cherry-picks the remaining #9852 CI fixes (`lint` / changelog PR link / `oxfmt`) so the demo branch matches the Iron tip for package publish/preview and mobile consumption. - Keeps #9852 targeting `feat/kyc-controller` for the eventual mainline path via #9615. Does **not** merge to `main`. ## Context (demo topology) - Integration branch: `neobank-demo` (owner: @georgeweiler) — umbrella PR #9853 → `main` - Iron feature PR (mainline stack): #9852 → `feat/kyc-controller` - KYC controller PR: #9615 → `main` ## Test plan - [ ] Confirm diff is formatting/lint/changelog only (no Iron behavior change) - [ ] CI green on this PR - [ ] After merge, `@metamaskbot publish-preview` on #9853 (or this PR) if mobile needs a preview pin of `@metamask/kyc-controller` Made with [Cursor](https://cursor.com) --------- Co-authored-by: Cursor <cursoragent@cursor.com>
|
@metamaskbot publish-preview |
The constant was annotated with the full RampsService/TransakService/ NeoBankService action unions, so spreading it into a messenger delegation widened the element type to every service action. Hosts that only delegate the actions RampsController actually calls (mobile) failed to typecheck once NeoBankService grew Pix and quote methods. Use `as const satisfies` so the type is the literal members while still being checked against the service action unions. Also record the kyc-controller dependency in the tsconfig project references so the package builds. Co-authored-by: Cursor <cursoragent@cursor.com>
…demo Keeps both sides of the KYC surface: the demo's `getCustomerIdentity` action and the incoming Money Account wallet registration APIs. Adds the missing `keyring-controller` project reference to the kyc-controller tsconfigs, which the incoming ownership-message signing imports but did not declare. Co-authored-by: Cursor <cursoragent@cursor.com>
Add an address-only KycController action that resolves the MoonPay customer, signs a Monad ownership proof, and registers the wallet through the MetaMask proxy.
Retarget Money Account self-hosted wallet registration from kyc-api /vendors/moonpay/* to onramp-api neobank-proxy /neobank/... so Core matches Money Movement ownership and transparent proxy semantics.
Prefer KycController identity when present, otherwise map the Profile Sync id through NeoBankService.getCustomerByExternalId so autoramp creation works before KYC has cached a MoonPay customer id. Co-authored-by: Cursor <cursoragent@cursor.com>
Reconciles the independently pushed wallet-registration commits with the local merge of feat/moonpay-wallet-registration-stacked. Co-authored-by: Cursor <cursoragent@cursor.com>
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 b0d70fa. Configure here.
| throw new Error( | ||
| 'Cannot create autoramp: wallet is not signed in to Profile Sync.', | ||
| ); | ||
| } |
There was a problem hiding this comment.
Wrong profile id for customer lookup
High Severity
resolveAutorampCustomerId falls back to profile.profileId for the neobank external_id lookup, but MoonPay customers are keyed by the MetaMask canonical profile id. After multi-SRP pairing those values can diverge, so autoramp creation can fail to find a mapped customer even when one exists. The KYC path already prefers canonicalProfileId (with profileId only as fallback).
Reviewed by Cursor Bugbot for commit b0d70fa. Configure here.


Explanation
References
Checklist
Note
High Risk
New identity/KYC orchestration, credential decryption, wallet signing, and neobank registration touch auth, PII, and money flows; large surface area with many async race/reset guards to validate in review.
Overview
Introduces
@metamask/kyc-controlleras a platform-agnostic package that orchestrates Universal KYC across MetaMask clients:KycController(phase machine, MoonPay Check/Auth frames + crypto, SumSub via injected launcher) andKycService(UKYC HTTP, optional separate neobank base URL).Money / neobank path: Adds an Iron vendor flow that skips MoonPay frames—Iron customer + disclaimers,
POST /consents,GET /kyc/statuswithrefreshKycStatus/statusChangedpolling—andregisterMoneyAccountWallet, which resolves the MoonPay/Iron customer, signs a Monad ownership message, and registers via neobank-proxy (409 reconciliation, idempotency, UTC date rollover in messages).getCustomerIdentityexposes a session-scoped vendor customer id without reading full state.Tooling & monorepo: Package dependencies and scripts (
build:watch,mint:ukyc-tokenCLI), ARCHITECTURE.md, expanded CHANGELOG, Universal KYC CODEOWNERS, README dependency graph edges, and ESLint relaxations forpackages/kyc-controller/scripts.transaction-pay-controllergains amoney_account_utilsdependency link in the root README graph.Reviewed by Cursor Bugbot for commit b0d70fa. Bugbot is set up for automated code reviews on this repo. Configure here.