Take machineid into account for coinatmradar rates (#301)
* Take machineid into account for coinatmradar rates * Remove test leftovers
This commit is contained in:
parent
98cc3b18b7
commit
1a53ce5fa1
4 changed files with 21 additions and 14 deletions
|
|
@ -755,18 +755,24 @@ function plugins (settings, deviceId) {
|
|||
return machineLoader.getMachineNames(settings.config)
|
||||
}
|
||||
|
||||
function getRates () {
|
||||
function getRawRates () {
|
||||
const config = configManager.unscoped(settings.config)
|
||||
const cryptoCodes = _.flatten(configManager.all('cryptoCurrencies', settings.config))
|
||||
const fiatCode = config.fiatCurrency
|
||||
const tickerPromises = cryptoCodes.map(c => ticker.getRates(settings, fiatCode, c))
|
||||
|
||||
return Promise.all(tickerPromises)
|
||||
}
|
||||
|
||||
function getRates () {
|
||||
return getRawRates()
|
||||
.then(buildRates)
|
||||
}
|
||||
|
||||
return {
|
||||
getRates,
|
||||
buildRates,
|
||||
getRawRates,
|
||||
pollQueries,
|
||||
sendCoins,
|
||||
newAddress,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue