From 0ea8a5af50576367b22458b7798a10619ae08bce Mon Sep 17 00:00:00 2001 From: siiky Date: Mon, 21 Nov 2022 17:08:31 +0000 Subject: [PATCH] refactor: unindent `.then()` chain --- lib/plugins.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/plugins.js b/lib/plugins.js index ce85123c..fd471836 100644 --- a/lib/plugins.js +++ b/lib/plugins.js @@ -758,13 +758,11 @@ function plugins (settings, deviceId) { const fiatCode = localeConfig.fiatCurrency return machineLoader.getMachines() - .then(devices => { - return Promise.all([ - checkCryptoBalances(fiatCode, devices), - checkDevicesCashBalances(fiatCode, devices) - ]) - .then(_.flow(_.flattenDeep, _.compact)) - }) + .then(devices => Promise.all([ + checkCryptoBalances(fiatCode, devices), + checkDevicesCashBalances(fiatCode, devices) + ])) + .then(_.flow(_.flattenDeep, _.compact)) } function randomCode () {