CryptoOnramp SDK: SDK Changes for EU Support#13038
Conversation
|
|
||
| private fun handleCrsCarfDeclarationResult(result: CrsCarfDeclarationActivityResult) { | ||
| coroutineScope.launch { | ||
| onrampCallbacksState.crsCarfDeclarationCallback?.onResult( |
There was a problem hiding this comment.
nit: Should we fail fast if no callback is registered when presentCrsCarfDeclaration() is called? Because the safe-call short-circuits argument evaluation, interactor.handleCrsCarfDeclarationResult(result) (and the backend confirmCrsCarfDeclaration call inside it) is silently skipped when the callback is null. A silent no-op here could be hard to debug.
There was a problem hiding this comment.
I think instead, we always call the handleCrsCarfDeclarationResult, and then pass it to the optional callback. That way we successfully handle the declaration result regardless, and then the client can decide if they care about the result (I imagine they would but, this way we do the correct thing from the user perspective). The rest of the SDK works through these callbacks, so I think that matches with the expectation.
Summary
Adds CryptoOnrampCoordinator APIs used for EU support as well as associated UI via paymentsheet (design TBD), temporary named analytics, and tests supporting functionality. This does not include updates for the example app. That currently remains in a separate branch listed below in Testing.
Motivation
Mobile SDK EU KYC Additions
Backend API Review
Testing
This was manually verified against a working branch (
twigz/carfd-integration).