add sanctions_logs table

This commit is contained in:
Josh Harvey 2018-05-07 12:20:22 +03:00
parent d3b7e7c2ad
commit 5ba164e566
3 changed files with 85 additions and 41 deletions

View file

@ -1,9 +1,10 @@
const compliance = require('../lib/compliance')
const ofac = require('../lib/ofac/index')
const [firstName, lastName, dateOfBirth] = process.argv.slice(2)
const [customerId, firstName, lastName, dateOfBirth] = process.argv.slice(2)
const customer = {
id: customerId,
idCardData: {firstName, lastName, dateOfBirth}
}
@ -11,7 +12,9 @@ const config = {
sanctionsVerificationActive: true
}
const deviceId = 'test-device'
ofac.load()
.then(() => compliance.validateCustomer(config, customer))
.then(() => console.log('SUCCESS!'))
.then(() => compliance.validationPatch(deviceId, config, customer))
.then(console.log)
.catch(err => console.log(err))