WIP: wallet exists check

This commit is contained in:
Julian 2025-03-18 09:05:11 -06:00
parent ce5d9d43e1
commit 6361d9f048

View file

@ -319,6 +319,15 @@ abstract class LibXelisWallet<T extends ElectrumCurrency>
),
];
static Future<bool> checkWalletExists(String walletId) async {
final xelisDir = await StackFileSystem.applicationXelisDirectory();
final walletDir = Directory(
"${xelisDir.path}${Platform.pathSeparator}$walletId",
);
// TODO: should we check for certain files within the dir?
return await walletDir.exists();
}
@override
Future<void> open() async {
bool wasNull = false;