Merge pull request #1228 from chaotixkilla/fix-exchange-default-market
Set exchange fiat default market to EUR
This commit is contained in:
commit
62620c13d2
1 changed files with 3 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ const cex = require('../exchange/cex')
|
||||||
const ftx = require('../exchange/ftx')
|
const ftx = require('../exchange/ftx')
|
||||||
const bitpay = require('../ticker/bitpay')
|
const bitpay = require('../ticker/bitpay')
|
||||||
const binance = require('../exchange/binance')
|
const binance = require('../exchange/binance')
|
||||||
|
const logger = require('../../logger')
|
||||||
|
|
||||||
const { BTC, BCH, DASH, ETH, LTC, ZEC } = COINS
|
const { BTC, BCH, DASH, ETH, LTC, ZEC } = COINS
|
||||||
|
|
||||||
|
|
@ -33,7 +34,8 @@ function buildMarket (fiatCode, cryptoCode, serviceName) {
|
||||||
}
|
}
|
||||||
const fiatSupported = ALL[serviceName].FIAT
|
const fiatSupported = ALL[serviceName].FIAT
|
||||||
if (fiatSupported !== 'ALL_CURRENCIES' && !_.includes(fiatCode, fiatSupported)) {
|
if (fiatSupported !== 'ALL_CURRENCIES' && !_.includes(fiatCode, fiatSupported)) {
|
||||||
throw new Error('Unsupported fiat: ' + fiatCode)
|
logger.info('Building a market for an unsupported fiat. Defaulting to EUR market')
|
||||||
|
return cryptoCode + '/' + 'EUR'
|
||||||
}
|
}
|
||||||
return cryptoCode + '/' + fiatCode
|
return cryptoCode + '/' + fiatCode
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue