Feat: enable notify operator for OFAC matches
Fix: fix lack of newline in some SVGs Chore: fix rebase issues
This commit is contained in:
parent
69d3e4cb9b
commit
05373e83db
6 changed files with 46 additions and 40 deletions
|
|
@ -3,6 +3,7 @@ const _ = require('lodash/fp')
|
|||
const queries = require('./queries')
|
||||
const utils = require('./utils')
|
||||
const codes = require('./codes')
|
||||
const customers = require('../customers')
|
||||
|
||||
const { NOTIFICATION_TYPES: {
|
||||
COMPLIANCE,
|
||||
|
|
@ -15,6 +16,17 @@ const { NOTIFICATION_TYPES: {
|
|||
|
||||
const { STALE, PING } = codes
|
||||
|
||||
const sanctionsNotify = (customer, phone) => {
|
||||
const code = 'SANCTIONS'
|
||||
const detailB = utils.buildDetail({ customerId: customer.id, code })
|
||||
|
||||
// if it's a new customer then phone comes as undefined
|
||||
if (phone) {
|
||||
return queries.addNotification(COMPLIANCE, `Blocked customer with phone ${phone} for being on the OFAC sanctions list`, detailB)
|
||||
}
|
||||
return customers.getById(customer.id).then(c => queries.addNotification(COMPLIANCE, `Blocked customer with phone ${c.phone} for being on the OFAC sanctions list`, detailB))
|
||||
}
|
||||
|
||||
const clearOldCustomerSuspendedNotifications = (customerId, deviceId) => {
|
||||
const detailB = utils.buildDetail({ code: 'SUSPENDED', customerId, deviceId })
|
||||
return queries.invalidateNotification(detailB, 'compliance')
|
||||
|
|
@ -167,4 +179,11 @@ const blacklistNotify = (tx, isAddressReuse) => {
|
|||
return queries.addNotification(COMPLIANCE, message, detailB)
|
||||
}
|
||||
|
||||
module.exports = { customerComplianceNotify, balancesNotify, errorAlertsNotify, notifCenterTransactionNotify, blacklistNotify }
|
||||
module.exports = {
|
||||
sanctionsNotify,
|
||||
customerComplianceNotify,
|
||||
balancesNotify,
|
||||
errorAlertsNotify,
|
||||
notifCenterTransactionNotify,
|
||||
blacklistNotify
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue