fix: getCashLimit wasn't returning actual value, cashLimit was assigned to an object instead of a number
This commit is contained in:
parent
f6a876ccb8
commit
95a1385a1e
2 changed files with 3 additions and 7 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue