feat: new compliance options
This commit is contained in:
parent
ccf7eacfad
commit
f2080c32e9
23 changed files with 161 additions and 121 deletions
2
test/fixtures/new-settings.json
vendored
2
test/fixtures/new-settings.json
vendored
|
|
@ -3,7 +3,7 @@
|
|||
"triggers": [
|
||||
{
|
||||
"id": "ce8f240f-7235-4948-b833-4af56ccfa90f",
|
||||
"cashDirection": "cash-out",
|
||||
"direction": "cash-out",
|
||||
"triggerType": "volume",
|
||||
"threshold": "12",
|
||||
"requirement": "block"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const config = settings.config
|
|||
|
||||
test('first examples', () => {
|
||||
const triggers = configManager.getTriggers(config)
|
||||
const filtered = _.filter(_.matches({ triggerType: 'volume', cashDirection: 'both' }))(triggers)
|
||||
const filtered = _.filter(_.matches({ triggerType: 'volume', direction: 'both' }))(triggers)
|
||||
const grouped = _.groupBy(_.prop('requirement'))(filtered)
|
||||
const final = _.mapValues(_.compose(_.get('threshold'), _.minBy('threshold')))(grouped)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue