feat(compliance): add manual AML pass whitelist and canManualPass helper#176
Merged
Conversation
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.
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.
This reverts commit 9437334.
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.
7 tasks
davidleomay
approved these changes
May 13, 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
ManualPassWhitelistErrors(string list of AML errors that may be overridden by a compliance clerk) andcanManualPass(comment)helper to@dfx.swiss/core, re-exported from@dfx.swiss/react.canManualPassparses a transaction comment (semicolon-separated AML errors) and returnstrueonly when every error is on the whitelist — used to gate the manual Pass button.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')→ truecanManualPass('PhoneVerificationNeeded;IpCountryMismatch')→ truecanManualPass('BankDataMissing;PhoneVerificationNeeded')→ false (one non-whitelist error)canManualPass(null)/canManualPass('')/canManualPass(' ')→ falseimport { canManualPass, ManualPassWhitelistErrors } from '@dfx.swiss/react'resolves