refactor: schema modularization
This commit is contained in:
parent
d9e3a9e61f
commit
82b5db6908
35 changed files with 2423 additions and 685 deletions
|
|
@ -5,25 +5,6 @@ const configManager = require('../../new-config-manager')
|
|||
const wallet = require('../../wallet')
|
||||
const ticker = require('../../ticker')
|
||||
const coinUtils = require('../../coin-utils')
|
||||
const logger = require('../../logger')
|
||||
|
||||
function allScopes (cryptoScopes, machineScopes) {
|
||||
const scopes = []
|
||||
cryptoScopes.forEach(c => {
|
||||
machineScopes.forEach(m => scopes.push([c, m]))
|
||||
})
|
||||
|
||||
return scopes
|
||||
}
|
||||
|
||||
function allMachineScopes (machineList, machineScope) {
|
||||
const machineScopes = []
|
||||
|
||||
if (machineScope === 'global' || machineScope === 'both') machineScopes.push('global')
|
||||
if (machineScope === 'specific' || machineScope === 'both') machineList.forEach(r => machineScopes.push(r))
|
||||
|
||||
return machineScopes
|
||||
}
|
||||
|
||||
function computeCrypto (cryptoCode, _balance) {
|
||||
const cryptoRec = coinUtils.getCryptoCurrency(cryptoCode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue