backup trade wallet on successful save and close

This commit is contained in:
woodser 2024-11-07 11:53:15 -05:00
parent ff76e39c03
commit 6c1fa1770c

View file

@ -937,6 +937,7 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
if (wallet == null) throw new RuntimeException("Trade wallet to close is not open for trade " + getId());
stopPolling();
xmrWalletService.closeWallet(wallet, true);
maybeBackupWallet();
wallet = null;
pollPeriodMs = null;
}
@ -1545,9 +1546,6 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
forceCloseWallet();
}
// backup trade wallet if applicable
maybeBackupWallet();
// de-initialize
if (idlePayoutSyncer != null) {
xmrWalletService.removeWalletListener(idlePayoutSyncer);