feat: use split relay and iron disclaimer submission - #9979
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 2e926c0. Configure here.
amitabh94
approved these changes
Aug 26, 2026
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
*Consents path order: vendor T&Cs → create UKYC session → session catalog/consents → SumSub. A 409 is re-checked with a GET and only treated as success when every accepted document is consented.
References
Checklist
Note
High Risk
Breaking API and consent orchestration for identity/KYC flows; incorrect 409 or catalog handling could block verification or skip required legal consents.
Overview
Breaking: Removes
KycService.submitConsents(POST /consents) and replaces it with three endpoints:submitVendorDisclaimersfor Iron/vendor T&C ids,fetchSessionDisclaimers/submitSessionDisclaimersfor the idOS + SumSub catalog using{ key, version }andcredentialReusabilityConsentGiven.On the non-MoonPay consents path,
KycControllernow runs vendor T&Cs → UKYC session create → session disclaimers → SumSub (vendor content ids are no longer bundled into session consent POSTs).acceptTermsAndStartSessionaccepts optionalcredentialReusabilityConsentGiven; T&C2 booleans map onto catalog documents. 409 on session disclaimer POST triggers a re-GET and only continues when every accepted item is actually consented—otherwise the flow fails closed and rewinds toterms.UKYC session creation is extracted into
#createUkycSessionso the consents path can create the session before recording disclaimers;startSumSubskips wrapping-key/session steps when a session id already exists. Adds in-memorysessionDisclaimers/credentialReusabilityConsentGivenstate and related types; docs and tests follow the new contract.Reviewed by Cursor Bugbot for commit 06dc3da. Bugbot is set up for automated code reviews on this repo. Configure here.