CryptoOnramp SDK: EU Compliance Backend APIs, Models, and Tests#13019
Merged
Conversation
jeanregisser
previously approved these changes
May 6, 2026
| fun toComplianceIdentifierRequirement(): ComplianceIdentifierRequirement { | ||
| return ComplianceIdentifierRequirement( | ||
| type = ComplianceIdentifierType.fromValue(type), | ||
| regulation = requireNotNull(ComplianceRegulation.fromValue(regulation)) { |
Member
There was a problem hiding this comment.
ComplianceIdentifierType handles unknown server values gracefully, but ComplianceRegulation is an enum - if the backend adds a new regulation, fromValue returns null and requireNotNull fails the whole response (via mapCatching). Worth aligning with how ComplianceIdentifierType works, or filtering out unrecognized regulations? (Flagged the same thing on the iOS PR - we have an equivalent issue with a String enum.)
Collaborator
Author
There was a problem hiding this comment.
Going to leave this as is, until we decide from the backend what the intention of this is.
jeanregisser
approved these changes
May 7, 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.
Summary
Adds new backend API communication, as well as models for the associated request and responses.
Adds tests covering new behavior in the CryptoApiRepository for encoding / decoding logic.
This does not modify the OnrampCoordinator API to make use of this functionality, nor does it update the example app. That will come in future pull requests.
Motivation
Mobile SDK EU KYC Additions
Backend API Review
Note that items in these docs may be out-of-date. The included JSON is taken from real network responses from the endpoints coded against in this PR.
Testing