remove debug

This commit is contained in:
Josh Harvey 2018-05-03 20:19:32 +03:00
parent d904c8391e
commit 43ac3f5923
3 changed files with 0 additions and 10 deletions

View file

@ -11,7 +11,6 @@ const config = {
sanctionsVerificationActive: true sanctionsVerificationActive: true
} }
console.log('DEBUG100')
ofac.load() ofac.load()
.then(() => compliance.validateCustomer(config, customer)) .then(() => compliance.validateCustomer(config, customer))
.then(() => console.log('SUCCESS!')) .then(() => console.log('SUCCESS!'))

View file

@ -33,7 +33,6 @@ function matchOfac (customer) {
} }
const results = ofac.match(nameParts, birthDate, options) const results = ofac.match(nameParts, birthDate, options)
console.log('DEBUG200: %j', results)
return !_.isEmpty(results) return !_.isEmpty(results)
} }
@ -42,7 +41,6 @@ function validateOfac (customer) {
if (customer.sanctionsOverride === 'blocked') return false if (customer.sanctionsOverride === 'blocked') return false
if (customer.sanctionsOverride === 'verified') return true if (customer.sanctionsOverride === 'verified') return true
console.log('DEBUG400')
return !matchOfac(customer) return !matchOfac(customer)
} }
@ -51,8 +49,6 @@ function validationPatch (config, customer) {
.then(() => { .then(() => {
const ofacValidation = validateOfac(customer) const ofacValidation = validateOfac(customer)
console.log('DEBUG401: %s, %j', ofacValidation, customer)
if (_.isNil(customer.sanctions) || customer.sanctions !== ofacValidation) { if (_.isNil(customer.sanctions) || customer.sanctions !== ofacValidation) {
return {sanctions: ofacValidation} return {sanctions: ofacValidation}
} }

View file

@ -197,8 +197,6 @@ function cryptoCodeDefaults (schema, cryptoCode) {
const hasCryptoSpecificDefault = r => r.cryptoScope === 'specific' && !_.isNil(r.default) const hasCryptoSpecificDefault = r => r.cryptoScope === 'specific' && !_.isNil(r.default)
const cryptoSpecificFields = _.filter(hasCryptoSpecificDefault, schemaEntries) const cryptoSpecificFields = _.filter(hasCryptoSpecificDefault, schemaEntries)
pp('DEBUG202')({scope, cryptoCode})
return _.map(r => { return _.map(r => {
const defaultValue = cryptoDefaultOverride(cryptoCode, r.code, r.default) const defaultValue = cryptoDefaultOverride(cryptoCode, r.code, r.default)
@ -208,7 +206,6 @@ function cryptoCodeDefaults (schema, cryptoCode) {
const uniqCompact = _.flow(_.compact, _.uniq) const uniqCompact = _.flow(_.compact, _.uniq)
const pp = require('./pp')
function addCryptoDefaults (oldConfig, newFields) { function addCryptoDefaults (oldConfig, newFields) {
const cryptoCodeEntries = _.filter(v => v.fieldLocator.code === 'cryptoCurrencies', newFields) const cryptoCodeEntries = _.filter(v => v.fieldLocator.code === 'cryptoCurrencies', newFields)
const cryptoCodes = _.flatMap(_.get('fieldValue.value'), cryptoCodeEntries) const cryptoCodes = _.flatMap(_.get('fieldValue.value'), cryptoCodeEntries)
@ -217,8 +214,6 @@ function addCryptoDefaults (oldConfig, newFields) {
const mapDefaults = cryptoCode => cryptoCodeDefaults(schema, cryptoCode) const mapDefaults = cryptoCode => cryptoCodeDefaults(schema, cryptoCode)
const defaults = _.flatMap(mapDefaults, uniqueCryptoCodes) const defaults = _.flatMap(mapDefaults, uniqueCryptoCodes)
pp('DEBUG201')({cryptoCodeEntries, cryptoCodes, uniqueCryptoCodes})
pp('DEBUG200')(defaults)
return mergeValues(defaults, oldConfig) return mergeValues(defaults, oldConfig)
} }