Code readability and added the forgotten mocks
This commit is contained in:
parent
134eaaa518
commit
7accdaa84f
12 changed files with 126 additions and 96 deletions
|
|
@ -1,9 +1,13 @@
|
|||
const common = require('../common/ccxt')
|
||||
const _ = require('lodash/fp')
|
||||
const consts = require('./consts')
|
||||
const ORDER_TYPE = consts.ORDER_TYPES.LIMIT
|
||||
const FIAT = common.FIAT['kraken']
|
||||
const CRYPTO = common.CRYPTO['kraken']
|
||||
|
||||
const { ORDER_TYPES } = require('./consts')
|
||||
const { COINS } = require('../../new-admin/config/coins') // para cada exchange
|
||||
|
||||
const ORDER_TYPE = ORDER_TYPES.LIMIT
|
||||
const { BTC, ETH, LTC, BCH } = COINS
|
||||
const CRYPTO = [BTC, ETH, LTC, BCH]
|
||||
const FIAT = ['USD']
|
||||
const AMOUNT_PRECISION = 4
|
||||
|
||||
const loadConfig = (account) => {
|
||||
const mapper = {
|
||||
|
|
@ -17,6 +21,4 @@ const loadConfig = (account) => {
|
|||
const loadOptions = ({ walletId }) => ({ walletId })
|
||||
const isConfigValid = ({ clientKey, clientSecret, userId, walletId }) => clientKey && clientSecret && userId && walletId
|
||||
|
||||
const amountPrecision = () => 4
|
||||
|
||||
module.exports = { amountPrecision, loadOptions, loadConfig, isConfigValid, CRYPTO, FIAT, ORDER_TYPE }
|
||||
module.exports = { loadOptions, loadConfig, isConfigValid, CRYPTO, FIAT, ORDER_TYPE, AMOUNT_PRECISION }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue