feat(compliance): add manual AML pass endpoints for BuyCrypto and BuyFiat#3705
Merged
Conversation
…Fiat Adds PUT :id/amlCheck/pass endpoints (COMPLIANCE role) that allow a compliance clerk to manually pass a pending AML check when all errors on the transaction comment are on the whitelist (phone-/referral-/ country-related). The ManualPassWhitelistErrors list and canManualPass helper are kept in sync with packages/core/src/definitions/compliance.ts.
Yannick1712
reviewed
May 14, 2026
- merge endpoint into PUT :id/amlCheck (drop /pass suffix) - add amlCheck field to DTO and gate canManualPass on PASS only - centralize DTO under aml/dto and rename to ManualAmlCheckDto
Yannick1712
reviewed
May 18, 2026
- reject when entity is complete or chargeback initiated by user - forbid only finalized amlCheck (PASS/FAIL) instead of allowing only PENDING
davidleomay
approved these changes
May 18, 2026
Yannick1712
reviewed
May 18, 2026
… manual PASS - add optional amlReason field to ManualAmlCheckDto - on PASS: force amlReason to NA and stamp priceDefinitionAllowedDate - on non-PASS: forward optional amlReason from DTO
Yannick1712
approved these changes
May 18, 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
PUT :id/amlCheck/passendpoints onBuyCryptoControllerandBuyFiatController(role:COMPLIANCE) that allow a clerk to manually pass a Pending AML check.ManualPassWhitelistErrorslist andcanManualPass(comment)helper inaml-error.enum.ts— kept in sync withpackages/core/src/definitions/compliance.ts.ManualPassAmlCheckDto(withresponsible: string) shared shape under each subdomain.Validation
amlCheck === Pendingand every error oncommentis whitelisted.amlCheck = PASSandamlResponsible = <responsible>via the existingupdate()path (so all downstream side-effects fire).Test plan
canManualPass(empty, single, multi, non-whitelisted)PUT buy-crypto/:id/amlCheck/passwith whitelisted comment → 200, status flips to PASSamlCheck !== Pending→ 400PUT buy-fiat/:id/amlCheck/pass