mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-21 06:18:42 +02:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user