File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
suite-common/wallet-core/src/blockchain Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { createThunk } from '@suite-common/redux-utils' ;
2
2
import {
3
3
getNetworkOptional ,
4
+ isBlockbookBasedNetwork ,
4
5
isNetworkSymbol ,
5
6
networksCollection ,
6
7
NetworkSymbol ,
@@ -335,9 +336,14 @@ export const syncAccountsWithBlockchainThunk = createThunk(
335
336
// First clear, to cancel last planned sync
336
337
tryClearTimeout ( blockchain [ symbol ] . syncTimeout ) ;
337
338
339
+ // non-blockbook networks will not update periodically if not visible in UI (sidebar)
340
+ const visibleAccounts = findAccountsByNetwork ( symbol , accounts ) . filter (
341
+ account => isBlockbookBasedNetwork ( symbol ) || account . visible ,
342
+ ) ;
343
+
338
344
await Promise . all (
339
- findAccountsByNetwork ( symbol , accounts ) . map ( a =>
340
- dispatch ( fetchAndUpdateAccountThunk ( { accountKey : a . key } ) ) ,
345
+ visibleAccounts . map ( account =>
346
+ dispatch ( fetchAndUpdateAccountThunk ( { accountKey : account . key } ) ) ,
341
347
) ,
342
348
) ;
343
349
You can’t perform that action at this time.
0 commit comments