Skip to content

feat(compliance): add manual AML pass whitelist and canManualPass helper#176

Merged
bernd2022 merged 6 commits into
developfrom
feat/compliance-aml-and-kyc-log
May 13, 2026
Merged

feat(compliance): add manual AML pass whitelist and canManualPass helper#176
bernd2022 merged 6 commits into
developfrom
feat/compliance-aml-and-kyc-log

Conversation

@bernd2022

Copy link
Copy Markdown
Collaborator

Summary

  • Adds ManualPassWhitelistErrors (string list of AML errors that may be overridden by a compliance clerk) and canManualPass(comment) helper to @dfx.swiss/core, re-exported from @dfx.swiss/react.
  • canManualPass parses a transaction comment (semicolon-separated AML errors) and returns true only when every error is on the whitelist — used to gate the manual Pass button.
  • Mirrors the same constants in api (AmlError-typed list and equivalent helper). The two definitions must be kept in sync; both files carry a comment pointing at the other.

Context

Prerequisite for the upcoming services + api PRs that implement the manual AML pass flow on pending phone-call transactions and the new KycLog comment format.

Test plan

  • canManualPass('PhoneVerificationNeeded') → true
  • canManualPass('PhoneVerificationNeeded;IpCountryMismatch') → true
  • canManualPass('BankDataMissing;PhoneVerificationNeeded') → false (one non-whitelist error)
  • canManualPass(null) / canManualPass('') / canManualPass(' ') → false
  • import { canManualPass, ManualPassWhitelistErrors } from '@dfx.swiss/react' resolves

Shared definitions used by services (Pass-button gating in the call-queue
outcome form) and mirrored in api (server-side validation of the manual
pass endpoint). The whitelist lists the AML errors that may be overridden
by a compliance clerk; canManualPass parses a tx comment and returns true
only when every listed error is on the whitelist.
@bernd2022 bernd2022 requested a review from davidleomay May 13, 2026 08:52
bernd2022 added 3 commits May 13, 2026 12:09
The lockfile regeneration in 8edcb33 unintentionally bumped lockfileVersion
2 → 3 and removed the 9 non-current-platform @nx/nx-* optional-dependency
entries. CI runs on Node 16.x (npm 8.19), which cannot back-fill the
missing Linux native binding from the registry — so every PR since
8edcb33 fails the lint step with 'Cannot find module @nx/nx-linux-x64-gnu'.

Restored from d70a7e3 (last green PR CI). Verified locally in
node:16-bullseye Docker: 'npm install + npx lerna run lint' passes.
Node 16 is EOL since Sept 2023 and ships with npm 8, which cannot
back-fill missing platform-optional-dependencies from the registry.
Node 20 ships with npm 10 — test whether modern npm resolves the
nx platform bindings missing from the current lockfile.
@bernd2022 bernd2022 merged commit 00f647d into develop May 13, 2026
1 check passed
@bernd2022 bernd2022 deleted the feat/compliance-aml-and-kyc-log branch May 13, 2026 15:25
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