Fix/tech debt indexes aml idempotency - #278
Open
james2177 wants to merge 4 commits into
Open
Conversation
Add @Index decorators to Settlement.merchantId/status, Webhook.merchantId/isActive, and BlockchainWallet.lastSyncedAt to match the indexing strategy already used in group.entity.ts and notification-preference.entity.ts. Add a migration to backfill these indexes on existing tables.
AmlService.checkAndFlag() was never called from anywhere outside the aml module, so high-value/high-velocity AML flags were never created in production. Call it from PaymentsService.confirmPayment() once a payment transitions to CONFIRMED, guarded so an AML failure never blocks the payment confirmation itself. Add unit tests asserting the check runs and that a check failure is non-blocking.
…MIN_EMAIL aml.service.ts read ADMIN_EMAIL, which appears nowhere in .env.example or README.md, while AdminAlertService and the docs use ADMIN_ALERT_EMAIL. In any environment configured per .env.example, AML alert emails silently never sent. Align on ADMIN_ALERT_EMAIL and log a warning when it's unset.
…dempotency interceptor CacheService.set() reads options.ttlSeconds, but the idempotency interceptor passed options.ttl, which was silently ignored in favor of CacheService's hardcoded 86400s default. Fix the option key and add a unit test asserting the TTL actually reaches the cache store.
|
@james2177 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #149
Closes #150
Closes #151
Closes #156