From 8a9b4ffe11c4d1fea18b7653d63347dd6e51b612 Mon Sep 17 00:00:00 2001 From: woodser Date: Thu, 7 Nov 2024 11:53:15 -0500 Subject: [PATCH] backup trade wallet on successful save and close --- core/src/main/java/haveno/core/trade/Trade.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/main/java/haveno/core/trade/Trade.java b/core/src/main/java/haveno/core/trade/Trade.java index 72f84a5084..e7b7584ec9 100644 --- a/core/src/main/java/haveno/core/trade/Trade.java +++ b/core/src/main/java/haveno/core/trade/Trade.java @@ -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; } @@ -1561,9 +1562,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);