mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-04-17 19:51:58 +00:00
WIP: wallet exists check
This commit is contained in:
parent
ce5d9d43e1
commit
6361d9f048
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue