fix: migrate hardlimit to suspend
This commit is contained in:
parent
2bfd26d13c
commit
28ee05a24a
1 changed files with 8 additions and 5 deletions
|
|
@ -348,21 +348,24 @@ function migrateComplianceTriggers (config) {
|
||||||
idPhoto: 'idCardPhoto',
|
idPhoto: 'idCardPhoto',
|
||||||
facePhoto: 'facephoto',
|
facePhoto: 'facephoto',
|
||||||
sanctions: 'sanctions',
|
sanctions: 'sanctions',
|
||||||
block: 'block'
|
suspend: 'suspend'
|
||||||
}
|
}
|
||||||
|
|
||||||
function createTrigger (
|
function createTrigger (
|
||||||
requirement,
|
requirement,
|
||||||
threshold
|
threshold
|
||||||
) {
|
) {
|
||||||
return {
|
const triggerConfig = {
|
||||||
id: uuid.v4(),
|
id: uuid.v4(),
|
||||||
cashDirection: 'both',
|
direction: 'both',
|
||||||
|
suspensionDays: null,
|
||||||
threshold,
|
threshold,
|
||||||
thresholdDays: 1,
|
thresholdDays: 1,
|
||||||
triggerType: triggerTypes.amount,
|
triggerType: triggerTypes.volume,
|
||||||
requirement
|
requirement
|
||||||
}
|
}
|
||||||
|
if (requirement === 'suspend') triggerConfig.suspensionDays = 1
|
||||||
|
return triggerConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
const codes = [
|
const codes = [
|
||||||
|
|
@ -413,7 +416,7 @@ function migrateComplianceTriggers (config) {
|
||||||
}
|
}
|
||||||
if (global.hardLimitVerificationActive && _.isNumber(global.hardLimitVerificationThreshold)) {
|
if (global.hardLimitVerificationActive && _.isNumber(global.hardLimitVerificationThreshold)) {
|
||||||
triggers.push(
|
triggers.push(
|
||||||
createTrigger(requirements.block, global.hardLimitVerificationThreshold)
|
createTrigger(requirements.suspend, global.hardLimitVerificationThreshold)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue