fix: getCashLimit wasn't returning actual value, cashLimit was assigned to an object instead of a number

This commit is contained in:
Cesar 2020-11-30 15:03:06 +00:00
parent f6a876ccb8
commit 95a1385a1e
2 changed files with 3 additions and 7 deletions

View file

@ -15,9 +15,8 @@ function maxDaysThreshold (triggers) {
}
function getCashLimit (triggers) {
const withFiat = _.filter(({ triggerType }) => _.includes(['txVolume', 'txAmount'])(triggerType))
const blocking = _.filter(({ requirement }) => _.includes(['block', 'suspend'])(requirement))
const withFiat = _.filter(({ triggerType }) => _.includes(triggerType, ['txVolume', 'txAmount']))
const blocking = _.filter(({ requirement }) => _.includes(requirement, ['block', 'suspend']))
return _.compose(_.minBy('threshold'), blocking, withFiat)(triggers)
}