refactor: unindent .then() chain
This commit is contained in:
parent
ab4bc5b4eb
commit
0ea8a5af50
1 changed files with 5 additions and 7 deletions
|
|
@ -758,13 +758,11 @@ function plugins (settings, deviceId) {
|
||||||
const fiatCode = localeConfig.fiatCurrency
|
const fiatCode = localeConfig.fiatCurrency
|
||||||
|
|
||||||
return machineLoader.getMachines()
|
return machineLoader.getMachines()
|
||||||
.then(devices => {
|
.then(devices => Promise.all([
|
||||||
return Promise.all([
|
checkCryptoBalances(fiatCode, devices),
|
||||||
checkCryptoBalances(fiatCode, devices),
|
checkDevicesCashBalances(fiatCode, devices)
|
||||||
checkDevicesCashBalances(fiatCode, devices)
|
]))
|
||||||
])
|
.then(_.flow(_.flattenDeep, _.compact))
|
||||||
.then(_.flow(_.flattenDeep, _.compact))
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function randomCode () {
|
function randomCode () {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue