organize linux monero saves

This commit is contained in:
Marco 2022-10-04 12:29:50 -06:00
parent 2ed5559cde
commit 2de7692375
5 changed files with 18 additions and 1 deletions

@ -1 +1 @@
Subproject commit 2c4e102f107305e1df50246f8ddf35da9a13d154
Subproject commit bffdb9688a93d8b88940a332dc52243f3ab8169d

View file

@ -84,6 +84,10 @@ void main() async {
if (Platform.isIOS) {
appDirectory = (await getLibraryDirectory());
}
if (Platform.isLinux || Logging.isArmLinux) {
appDirectory = Directory("${appDirectory.path}/stackwallet");
await appDirectory.create();
}
// FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
if (!(Logging.isArmLinux || Logging.isTestEnv)) {
final isar = await Isar.open(

View file

@ -259,6 +259,9 @@ Future<String> deleteEpicWallet({
if (Platform.isIOS) {
appDir = (await getLibraryDirectory());
}
if (Platform.isLinux) {
appDir = Directory("${appDir.path}/stackwallet");
}
final path = "${appDir.path}/epiccash";
final String name = walletId;
@ -1232,6 +1235,9 @@ class EpicCashWallet extends CoinServiceAPI {
if (Platform.isIOS) {
appDir = (await getLibraryDirectory());
}
if (Platform.isLinux) {
appDir = Directory("${appDir.path}/stackwallet");
}
final path = "${appDir.path}/epiccash";
final String name = _walletId.trim();
return '$path/$name';

View file

@ -910,6 +910,10 @@ class MoneroWallet extends CoinServiceAPI {
if (Platform.isIOS) {
root = (await getLibraryDirectory());
}
//
if (Platform.isLinux) {
root = Directory("${root.path}/stackwallet");
}
final prefix = walletTypeToString(type).toLowerCase();
final walletsDir = Directory('${root.path}/wallets');
final walletDire = Directory('${walletsDir.path}/$prefix/$name');

View file

@ -913,6 +913,9 @@ class WowneroWallet extends CoinServiceAPI {
if (Platform.isIOS) {
root = (await getLibraryDirectory());
}
if (Platform.isLinux) {
root = Directory("${root.path}/stackwallet");
}
final prefix = walletTypeToString(type).toLowerCase();
final walletsDir = Directory('${root.path}/wallets');
final walletDire = Directory('${walletsDir.path}/$prefix/$name');