mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-09 12:19:24 +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,
|
||||
adkString,
|
||||
jsonEncode(backup),
|
||||
adkVersion: adkVersion,
|
||||
adkVersion,
|
||||
);
|
||||
|
||||
// this future should already be complete unless there was an error encrypting
|
||||
|
|
|
@ -187,7 +187,7 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
|
|||
fileToSave,
|
||||
adkString,
|
||||
jsonEncode(backup),
|
||||
adkVersion: adkVersion,
|
||||
adkVersion,
|
||||
);
|
||||
|
||||
// this future should already be complete unless there was an error encrypting
|
||||
|
|
|
@ -133,9 +133,9 @@ abstract class SWB {
|
|||
static Future<bool> encryptStackWalletWithADK(
|
||||
String fileToSave,
|
||||
String adk,
|
||||
String plaintext, {
|
||||
int? adkVersion,
|
||||
}) async {
|
||||
String plaintext,
|
||||
int adkVersion,
|
||||
) async {
|
||||
try {
|
||||
File backupFile = File(fileToSave);
|
||||
if (!backupFile.existsSync()) {
|
||||
|
|
|
@ -722,7 +722,7 @@ class _CreateAutoBackup extends ConsumerState<CreateAutoBackup> {
|
|||
fileToSave,
|
||||
adkString,
|
||||
jsonEncode(backup),
|
||||
adkVersion: adkVersion,
|
||||
adkVersion,
|
||||
);
|
||||
|
||||
// this future should already be complete unless there was an error encrypting
|
||||
|
|
|
@ -75,8 +75,7 @@ class AutoSWBService extends ChangeNotifier {
|
|||
createAutoBackupFilename(autoBackupDirectoryPath, now);
|
||||
|
||||
final result = await SWB.encryptStackWalletWithADK(
|
||||
fileToSave, adkString!, jsonString,
|
||||
adkVersion: adkVersion);
|
||||
fileToSave, adkString!, jsonString, adkVersion);
|
||||
|
||||
if (!result) {
|
||||
throw Exception("stack auto backup service failed to create a backup");
|
||||
|
|
Loading…
Reference in a new issue