Mweb fixes (#1972)

* quick fix [still investigating]

* cleaner quick fix

* cleaner quick fix

* log fix

* save to downloads would require an additional permission

* change address handling updates [skip ci]

* should change address not updating

* change address handling updates

* remove unnecessary code + don't reset change address index to 0
This commit is contained in:
Matthew Fosse
2025-01-24 20:09:48 +02:00
committed by GitHub
parent 9673b7c026
commit 199ada3fa9
7 changed files with 55 additions and 60 deletions
@@ -3,6 +3,8 @@ import 'dart:io';
import 'package:cake_wallet/bitcoin/bitcoin.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/utils/exception_handler.dart';
import 'package:cw_core/root_dir.dart';
import 'package:cw_core/utils/print_verbose.dart';
import 'package:cw_core/wallet_base.dart';
import 'package:flutter/widgets.dart';
import 'package:mobx/mobx.dart';
@@ -47,25 +49,6 @@ abstract class MwebSettingsViewModelBase with Store {
_settingsStore.mwebAlwaysScan = value;
}
Future<bool> saveLogsLocally(String filePath) async {
try {
final appSupportPath = (await getApplicationSupportDirectory()).path;
final logsFile = File("$appSupportPath/logs/debug.log");
if (!logsFile.existsSync()) {
throw Exception('Logs file does not exist');
}
await logsFile.copy(filePath);
return true;
} catch (e, s) {
ExceptionHandler.onError(FlutterErrorDetails(
exception: e,
stack: s,
library: "Export Logs",
));
return false;
}
}
Future<String> getAbbreviatedLogs() async {
final appSupportPath = (await getApplicationSupportDirectory()).path;
final logsFile = File("$appSupportPath/logs/debug.log");