mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-28 11:34:52 +01:00
Fixes for backups for Android. Fixes for send almost all amount.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:cake_wallet/core/backup_service.dart';
|
||||
import 'package:cake_wallet/core/execution_state.dart';
|
||||
import 'package:cake_wallet/entities/secret_store_key.dart';
|
||||
@@ -7,6 +6,7 @@ import 'package:cake_wallet/store/secret_store.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
part 'backup_view_model.g.dart';
|
||||
|
||||
@@ -56,9 +56,11 @@ abstract class BackupViewModelBase with Store {
|
||||
state = IsExecutingState();
|
||||
final backupContent = await backupService.exportBackup(backupPassword);
|
||||
state = ExecutedSuccessfullyState();
|
||||
final now = DateTime.now();
|
||||
final formatter = DateFormat('yyyy-MM-dd_Hm');
|
||||
|
||||
return BackupExportFile(backupContent.toList(),
|
||||
name: 'backup_${DateTime.now().toString()}.zip');
|
||||
name: 'cake_wallet_backup_${formatter.format(now)}');
|
||||
} catch (e) {
|
||||
print(e.toString());
|
||||
state = FailureState(e.toString());
|
||||
|
||||
@@ -167,6 +167,7 @@ abstract class SendViewModelBase with Store {
|
||||
|
||||
Validator get templateValidator => TemplateValidator();
|
||||
|
||||
@observable
|
||||
PendingTransaction pendingTransaction;
|
||||
|
||||
@computed
|
||||
|
||||
Reference in New Issue
Block a user