fix: transaction screens fixes
This commit is contained in:
parent
bf8f1d991c
commit
8f7bb412a1
12 changed files with 315 additions and 37 deletions
17
test/unit/new-settings-loader.js
Normal file
17
test/unit/new-settings-loader.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import test from 'ava'
|
||||
import _ from 'lodash/fp'
|
||||
import settings from '../../db.json'
|
||||
|
||||
import configManager from '../../lib/new-config-manager'
|
||||
|
||||
const machineId = '9682f15e40539e40d3e4050a993cf74e3e157d6d9b7866fb1ebd5206024ae68a'
|
||||
const config = settings.config
|
||||
|
||||
test('first examples', () => {
|
||||
const triggers = configManager.getTriggers(config)
|
||||
const filtered = _.filter(_.matches({ triggerType: 'volume', cashDirection: 'both' }))(triggers)
|
||||
const grouped = _.groupBy(_.prop('requirement'))(filtered)
|
||||
const final = _.mapValues(_.compose(_.get('threshold'), _.minBy('threshold')))(grouped)
|
||||
|
||||
console.log(final)
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue