Skip to content

Conversation

@TaprootFreak
Copy link
Collaborator

Summary

  • Add AML check to reject transactions where user's name has fewer than 4 letters
  • Banks (e.g. Yapeal) require minimum name length for processing payouts
  • Example: "M K" (2 letters) → amlCheck: FAIL, amlReason: NameTooShort

Changes

  • Add AmlError.NAME_TOO_SHORT with CRUCIAL type and FAIL status
  • Add AmlReason.NAME_TOO_SHORT
  • Add countLetters() helper counting only alphabetic characters (incl. ä, ö, ü, ß, etc.)
  • Add validation in getAmlErrors() after existing NAME_MISSING check
  • Update SiftAmlDeclineMap and TransactionReasonMapper

Test plan

  • Test with user name "M K" (2 letters) → should get amlCheck: FAIL
  • Test with user name "Li Wu" (4 letters) → should pass this check
  • Test with user name "Hans Müller" (10 letters) → should pass
  • Verify transaction shows NameTooShort reason in admin panel

Add AML check to reject transactions where the user's name contains
fewer than 4 letters. Banks require a minimum name length for processing.

Changes:
- Add AmlError.NAME_TOO_SHORT with CRUCIAL type and FAIL status
- Add AmlReason.NAME_TOO_SHORT
- Add countLetters() helper to count only alphabetic characters
- Add name length validation in getAmlErrors() after NAME_MISSING check
- Update SiftAmlDeclineMap and TransactionReasonMapper

The check uses verifiedName, bankData.name, or completeName (in that order)
and counts only letters (including European special characters like ä, ö, ü, ß).
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

🤖 PR Review Bot

⚠️ Security: 0 critical, 67 high vulnerabilities


This is an automated review. Please address the issues above.

Comment on lines 41 to 43
INTERMEDIARY_WITHOUT_SENDER = 'IntermediaryWithoutSender',
NAME_TOO_SHORT = 'NameTooShort',
}
Copy link
Member

Choose a reason for hiding this comment

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

@Yannick1712 do we need to add mail texts when adding a new AmlReason?

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.

3 participants