fix: market currency migration
This commit is contained in:
parent
7f168859d8
commit
47c548c956
11 changed files with 25 additions and 22 deletions
|
|
@ -29,13 +29,12 @@ const ALL = {
|
|||
bitfinex: bitfinex
|
||||
}
|
||||
|
||||
function buildMarket (_fiatCode, cryptoCode, serviceName) {
|
||||
function buildMarket (fiatCode, cryptoCode, serviceName) {
|
||||
if (!_.includes(cryptoCode, ALL[serviceName].CRYPTO)) {
|
||||
throw new Error('Unsupported crypto: ' + cryptoCode)
|
||||
}
|
||||
|
||||
if (_.isNil(_fiatCode)) logger.debug('Missing fiat code information, defaulting to EUR markets')
|
||||
const fiatCode = _fiatCode ?? '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