fix: only check json files in listWallets
This commit is contained in:
parent
07908797d5
commit
62e0c2ba3d
1 changed files with 6 additions and 2 deletions
|
@ -26,8 +26,12 @@ class WalletManager {
|
|||
path.createSync();
|
||||
}
|
||||
final wallets = <Wallet>[];
|
||||
for (final w
|
||||
in path.listSync().map((e) => e.path.split("/").last).toList()) {
|
||||
for (final w in path
|
||||
.listSync()
|
||||
.whereType<File>()
|
||||
.where((e) => e.path.endsWith(".json"))
|
||||
.map((e) => e.path.split("/").last)
|
||||
.toList()) {
|
||||
try {
|
||||
wallets.add(loadWallet(w));
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue