diff --git a/src/utils/lightning/index.ts b/src/utils/lightning/index.ts index 72dca20ca..2f46df897 100644 --- a/src/utils/lightning/index.ts +++ b/src/utils/lightning/index.ts @@ -659,27 +659,30 @@ export const refreshLdk = async ({ // Calls that don't require sequential execution. const promises: Promise>[] = [ - lm.syncLdk(), lm.setFees(), addPeers({ selectedNetwork, selectedWallet }), ]; const results = await Promise.all(promises); // Handle & Return syncLdk errors. - if (results[0].isErr()) { - showToast({ - type: 'error', - title: i18n.t('wallet:ldk_sync_error_title'), - description: results[0].error.message, - }); - return handleRefreshError(results[0].error.message); - } for (const result of results) { if (result.isErr()) { //setFees & addPeers can fail, but we should still continue and make UI ready so payments can be attempted - console.error(result.error.message); + console.error( + `refreshLdk setFees/addPeers error: ${result.error.message}`, + ); } } + const syncResult = await lm.syncLdk(); + if (syncResult.isErr()) { + showToast({ + type: 'error', + title: i18n.t('wallet:ldk_sync_error_title'), + description: syncResult.error.message, + }); + return handleRefreshError(syncResult.error.message); + } + await Promise.all([ updateLightningChannelsThunk(), syncLightningTxsWithActivityList(),