feat(kyc-controller): move moonpay keypair generation out of constructor - #10053
Merged
Akaryatrh merged 3 commits intoSep 2, 2026
Merged
Conversation
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 b7217aa. Configure here.
amitabh94
previously approved these changes
Sep 1, 2026
jiexi
force-pushed
the
jl/kyc-controller-move-moonpay-keypair-out-of-constructor
branch
from
September 1, 2026 21:16
80520ae to
f8a976c
Compare
Member
Author
|
controller hasn't been released yet. No changelog entries will actually survive after the first release. Marking this no-changelog to save some time |
Akaryatrh
deleted the
jl/kyc-controller-move-moonpay-keypair-out-of-constructor
branch
September 2, 2026 12:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Explanation
initialize()when moonpay is passed as the vendorReferences
Checklist
Note
Medium Risk
Changes when MoonPay frame keys exist and how encrypted frame credentials are decrypted—callers must
initializewith MoonPay before building Check/Auth URLs, which may be a breaking integration change.Overview
MoonPay Check/Auth frame crypto is no longer created in the constructor. The controller keeps a nullable
#moonpayFrameKeypairthat is generated oninitialize()when the vendor is MoonPay (or lazily on a repeatinitializemid-flow if the keypair was missing), and cleared when switching to a non-MoonPay vendor viainitializeorcreateVendorCustomer.Frame URLs and credential handling now depend on that keypair.
buildCheckFrameUrlandbuildAuthFrameUrlreturnnullwithout it; frame credential decryption runs only when both an envelope and the MoonPay keypair are present.Tests were updated so helpers call
initialize({ vendor: 'moonpay' })where needed,envelopeForis async, and stale-completion cases no longer rely on a constructor-time key.Reviewed by Cursor Bugbot for commit 7cce858. Bugbot is set up for automated code reviews on this repo. Configure here.