force usage of adkVersion parameter

This commit is contained in:
julian 2023-01-24 10:30:00 -06:00
parent 7d10ae2011
commit e404de2116
5 changed files with 7 additions and 8 deletions

View file

@ -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

View file

@ -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

View file

@ -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()) {

View file

@ -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

View file

@ -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");