refactor: simplify getting pegged fiat currencies
This commit is contained in:
parent
8eb1c3006f
commit
63f40da632
1 changed files with 1 additions and 3 deletions
|
|
@ -38,9 +38,7 @@ function _getRates (settings, fiatCode, cryptoCode) {
|
|||
}
|
||||
|
||||
function buildTicker (fiatCode, cryptoCode, tickerName) {
|
||||
fiatCode = _.includes(fiatCode, _.keys(PEGGED_FIAT_CURRENCIES))
|
||||
? PEGGED_FIAT_CURRENCIES[fiatCode]
|
||||
: fiatCode
|
||||
fiatCode = _.defaultTo(fiatCode, _.get([fiatCode], PEGGED_FIAT_CURRENCIES))
|
||||
cryptoCode = coinUtils.getEquivalentCode(cryptoCode)
|
||||
|
||||
if (tickerName === 'bitpay') return bitpay.ticker(fiatCode, cryptoCode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue