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',
|
||||
facePhoto: 'facephoto',
|
||||
sanctions: 'sanctions',
|
||||
block: 'block'
|
||||
suspend: 'suspend'
|
||||
}
|
||||
|
||||
function createTrigger (
|
||||
requirement,
|
||||
threshold
|
||||
) {
|
||||
return {
|
||||
const triggerConfig = {
|
||||
id: uuid.v4(),
|
||||
cashDirection: 'both',
|
||||
direction: 'both',
|
||||
suspensionDays: null,
|
||||
threshold,
|
||||
thresholdDays: 1,
|
||||
triggerType: triggerTypes.amount,
|
||||
triggerType: triggerTypes.volume,
|
||||
requirement
|
||||
}
|
||||
if (requirement === 'suspend') triggerConfig.suspensionDays = 1
|
||||
return triggerConfig
|
||||
}
|
||||
|
||||
const codes = [
|
||||
|
|
@ -413,7 +416,7 @@ function migrateComplianceTriggers (config) {
|
|||
}
|
||||
if (global.hardLimitVerificationActive && _.isNumber(global.hardLimitVerificationThreshold)) {
|
||||
triggers.push(
|
||||
createTrigger(requirements.block, global.hardLimitVerificationThreshold)
|
||||
createTrigger(requirements.suspend, global.hardLimitVerificationThreshold)
|
||||
)
|
||||
}
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue