From 62e0c2ba3dcf480674e0abda736ac5ea29da4b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Caras?= Date: Sun, 30 Jun 2024 11:30:33 +0200 Subject: [PATCH] fix: only check json files in listWallets --- lib/api/wallet_manager.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/api/wallet_manager.dart b/lib/api/wallet_manager.dart index 8f5d086..53c5c02 100644 --- a/lib/api/wallet_manager.dart +++ b/lib/api/wallet_manager.dart @@ -26,8 +26,12 @@ class WalletManager { path.createSync(); } final wallets = []; - for (final w - in path.listSync().map((e) => e.path.split("/").last).toList()) { + for (final w in path + .listSync() + .whereType() + .where((e) => e.path.endsWith(".json")) + .map((e) => e.path.split("/").last) + .toList()) { try { wallets.add(loadWallet(w)); } catch (e) {