Code readability and added the forgotten mocks

This commit is contained in:
José Oliveira 2021-01-25 23:51:39 +00:00 committed by Josh Harvey
parent 134eaaa518
commit 7accdaa84f
12 changed files with 126 additions and 96 deletions

View file

@ -1,9 +1,13 @@
const common = require('../common/ccxt')
const _ = require('lodash/fp')
const consts = require('./consts')
const ORDER_TYPE = consts.ORDER_TYPES.MARKET
const FIAT = common.FIAT['kraken']
const CRYPTO = common.CRYPTO['kraken']
const { ORDER_TYPES } = require('./consts')
const { COINS } = require('../../new-admin/config/coins')
const ORDER_TYPE = ORDER_TYPES.MARKET
const { BTC, BCH, DASH, ETH, LTC, ZEC } = COINS
const CRYPTO = [BTC, ETH, LTC, DASH, ZEC, BCH]
const FIAT = ['USD', 'EUR']
const AMOUNT_PRECISION = 6
const loadConfig = (account) => {
const mapper = {
@ -16,6 +20,4 @@ const loadConfig = (account) => {
const loadOptions = () => ({ expiretm: '+60' })
const isConfigValid = ({ apiKey, privateKey }) => apiKey && privateKey
const amountPrecision = () => 6
module.exports = { amountPrecision, loadOptions, loadConfig, isConfigValid, CRYPTO, FIAT, ORDER_TYPE }
module.exports = { loadOptions, loadConfig, isConfigValid, CRYPTO, FIAT, ORDER_TYPE, AMOUNT_PRECISION }