Merge branch 'dev' into backport/binance-default-market
This commit is contained in:
commit
5e2ac6ecbf
69 changed files with 1516 additions and 599 deletions
|
|
@ -34,11 +34,8 @@ function buildMarket (fiatCode, cryptoCode, serviceName) {
|
|||
if (!_.includes(cryptoCode, ALL[serviceName].CRYPTO)) {
|
||||
throw new Error('Unsupported crypto: ' + cryptoCode)
|
||||
}
|
||||
const fiatSupported = ALL[serviceName].FIAT
|
||||
if (fiatSupported !== 'ALL_CURRENCIES' && !_.includes(fiatCode, fiatSupported)) {
|
||||
logger.info('Building a market for an unsupported fiat. Defaulting to EUR market')
|
||||
return cryptoCode + '/' + 'EUR'
|
||||
}
|
||||
|
||||
if (_.isNil(fiatCode)) throw new Error('Market pair building failed: Missing fiat code')
|
||||
return cryptoCode + '/' + fiatCode
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue