fix: bitpay condition
This commit is contained in:
parent
0843ecd83b
commit
5dc3bcfa81
1 changed files with 5 additions and 4 deletions
|
|
@ -36,11 +36,12 @@ function _getRates (settings, fiatCode, cryptoCode) {
|
|||
}
|
||||
|
||||
function buildTicker (fiatCode, cryptoCode, tickerName) {
|
||||
if (tickerName === 'bitpay') return bitpay.ticker(fiatCode, cryptoCode)
|
||||
if (tickerName === 'mock-ticker') return mockTicker.ticker(fiatCode, cryptoCode)
|
||||
if (_.includes(fiatCode, _.keys(CURRENCY_PEGS_MISMATCH))) {
|
||||
return bitpay.ticker(CURRENCY_PEGS_MISMATCH[fiatCode], cryptoCode, tickerName)
|
||||
if (tickerName === 'bitpay') {
|
||||
return _.includes(fiatCode, _.keys(CURRENCY_PEGS_MISMATCH))
|
||||
? bitpay.ticker(CURRENCY_PEGS_MISMATCH[fiatCode], cryptoCode)
|
||||
: bitpay.ticker(fiatCode, cryptoCode)
|
||||
}
|
||||
if (tickerName === 'mock-ticker') return mockTicker.ticker(fiatCode, cryptoCode)
|
||||
return ccxt.ticker(fiatCode, cryptoCode, tickerName)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue