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();
|
path.createSync();
|
||||||
}
|
}
|
||||||
final wallets = <Wallet>[];
|
final wallets = <Wallet>[];
|
||||||
for (final w
|
for (final w in path
|
||||||
in path.listSync().map((e) => e.path.split("/").last).toList()) {
|
.listSync()
|
||||||
|
.whereType<File>()
|
||||||
|
.where((e) => e.path.endsWith(".json"))
|
||||||
|
.map((e) => e.path.split("/").last)
|
||||||
|
.toList()) {
|
||||||
try {
|
try {
|
||||||
wallets.add(loadWallet(w));
|
wallets.add(loadWallet(w));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in a new issue