Skip to content

Reject direct REALU token deposits with AML FAIL#3278

Merged
TaprootFreak merged 1 commit intodevelopfrom
feature/realunit-deposit-aml-check
Feb 27, 2026
Merged

Reject direct REALU token deposits with AML FAIL#3278
TaprootFreak merged 1 commit intodevelopfrom
feature/realunit-deposit-aml-check

Conversation

@TaprootFreak
Copy link
Collaborator

Summary

  • New AmlError.ASSET_INPUT_NOT_ALLOWED triggers CheckStatus.FAIL when inputAsset is REALU
  • Prevents bypassing the intended BrokerBot swap flow (REALU→ZCHF→DFX) by sending REALU tokens directly to a DFX deposit address
  • Added corresponding entries in AmlReason, SiftAmlDeclineMap, and TransactionReasonMapper

Changed files

  • src/subdomains/core/aml/enums/aml-error.enum.ts — new enum + result entry
  • src/subdomains/core/aml/enums/aml-reason.enum.ts — new enum value
  • src/subdomains/core/aml/services/aml-helper.service.ts — REALU check in getAmlErrors()
  • src/integration/sift/dto/sift.dto.tsSiftAmlDeclineMap entry
  • src/subdomains/supporting/payment/dto/transaction.dto.tsTransactionReasonMapper entry

Test plan

  • Send REALU directly to a deposit address → verify AML check returns FAIL with reason AssetInputNotAllowed
  • Normal ZCHF deposit (from BrokerBot swap) still passes AML as before
  • All existing tests pass (npm run test — 61/61 suites passed)

Add ASSET_INPUT_NOT_ALLOWED error that triggers CheckStatus.FAIL when
the input asset is REALU. This prevents bypassing the intended
BrokerBot swap flow by sending REALU tokens directly to a DFX deposit
address.
@TaprootFreak TaprootFreak marked this pull request as ready for review February 26, 2026 15:11
@TaprootFreak TaprootFreak requested a review from xlamn February 26, 2026 15:11
Copy link
Member

@davidleomay davidleomay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already an AML error ASSET_NOT_SELLABLE for non-sellable assets. Can't we use this one?

@TaprootFreak
Copy link
Collaborator Author

There is already an AML error ASSET_NOT_SELLABLE for non-sellable assets. Can't we use this one?

nein, das sind schon zwei verschiedene Dinge, das eine ist technisch nicht erlaubt, das andere rechtlich.

@TaprootFreak TaprootFreak merged commit 1f6b1c7 into develop Feb 27, 2026
8 checks passed
@TaprootFreak TaprootFreak deleted the feature/realunit-deposit-aml-check branch February 27, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants