rename background sync cache file (#2129)

cyan committed Mar 28, 2025 at 00:08 UTC 16b180add04301d039d34b3042040cae34f7eacb
1 file changed +4
cw_monero/lib/monero_wallet.dart
+4
@@ -506,6 +506,7 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
506 final currentCacheFile = File(renamedWalletPath);
507 final currentKeysFile = File('$renamedWalletPath.keys');
508 final currentAddressListFile = File('$renamedWalletPath.address.txt');
509 + final backgroundSyncFile = File('$renamedWalletPath.background');
510
511 final newWalletPath =
512 await pathForWallet(name: newWalletName, type: type);
@@ -519,6 +520,9 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
520 if (currentAddressListFile.existsSync()) {
521 await currentAddressListFile.rename('$newWalletPath.address.txt');
522 }
523 + if (backgroundSyncFile.existsSync()) {
524 + await backgroundSyncFile.rename('$newWalletPath.background');
525 + }
526
527 await backupWalletFiles(newWalletName);
528 } catch (e) {