mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-22 07:09:10 +00:00
force usage of adkVersion parameter
This commit is contained in:
parent
7d10ae2011
commit
e404de2116
5 changed files with 7 additions and 8 deletions
|
@ -596,7 +596,7 @@ class _EnableAutoBackupViewState extends ConsumerState<CreateAutoBackupView> {
|
||||||
fileToSave,
|
fileToSave,
|
||||||
adkString,
|
adkString,
|
||||||
jsonEncode(backup),
|
jsonEncode(backup),
|
||||||
adkVersion: adkVersion,
|
adkVersion,
|
||||||
);
|
);
|
||||||
|
|
||||||
// this future should already be complete unless there was an error encrypting
|
// this future should already be complete unless there was an error encrypting
|
||||||
|
|
|
@ -187,7 +187,7 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
|
||||||
fileToSave,
|
fileToSave,
|
||||||
adkString,
|
adkString,
|
||||||
jsonEncode(backup),
|
jsonEncode(backup),
|
||||||
adkVersion: adkVersion,
|
adkVersion,
|
||||||
);
|
);
|
||||||
|
|
||||||
// this future should already be complete unless there was an error encrypting
|
// this future should already be complete unless there was an error encrypting
|
||||||
|
|
|
@ -133,9 +133,9 @@ abstract class SWB {
|
||||||
static Future<bool> encryptStackWalletWithADK(
|
static Future<bool> encryptStackWalletWithADK(
|
||||||
String fileToSave,
|
String fileToSave,
|
||||||
String adk,
|
String adk,
|
||||||
String plaintext, {
|
String plaintext,
|
||||||
int? adkVersion,
|
int adkVersion,
|
||||||
}) async {
|
) async {
|
||||||
try {
|
try {
|
||||||
File backupFile = File(fileToSave);
|
File backupFile = File(fileToSave);
|
||||||
if (!backupFile.existsSync()) {
|
if (!backupFile.existsSync()) {
|
||||||
|
|
|
@ -722,7 +722,7 @@ class _CreateAutoBackup extends ConsumerState<CreateAutoBackup> {
|
||||||
fileToSave,
|
fileToSave,
|
||||||
adkString,
|
adkString,
|
||||||
jsonEncode(backup),
|
jsonEncode(backup),
|
||||||
adkVersion: adkVersion,
|
adkVersion,
|
||||||
);
|
);
|
||||||
|
|
||||||
// this future should already be complete unless there was an error encrypting
|
// this future should already be complete unless there was an error encrypting
|
||||||
|
|
|
@ -75,8 +75,7 @@ class AutoSWBService extends ChangeNotifier {
|
||||||
createAutoBackupFilename(autoBackupDirectoryPath, now);
|
createAutoBackupFilename(autoBackupDirectoryPath, now);
|
||||||
|
|
||||||
final result = await SWB.encryptStackWalletWithADK(
|
final result = await SWB.encryptStackWalletWithADK(
|
||||||
fileToSave, adkString!, jsonString,
|
fileToSave, adkString!, jsonString, adkVersion);
|
||||||
adkVersion: adkVersion);
|
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
throw Exception("stack auto backup service failed to create a backup");
|
throw Exception("stack auto backup service failed to create a backup");
|
||||||
|
|
Loading…
Reference in a new issue