Skip to content

Commit

Permalink
backup trade wallet on successful save and close
Browse files Browse the repository at this point in the history
  • Loading branch information
woodser committed Nov 7, 2024
1 parent ff76e39 commit 6c1fa17
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/src/main/java/haveno/core/trade/Trade.java
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ private void closeWallet() {
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;
}
Expand Down Expand Up @@ -1545,9 +1546,6 @@ public void shutDown() {
forceCloseWallet();
}

// backup trade wallet if applicable
maybeBackupWallet();

// de-initialize
if (idlePayoutSyncer != null) {
xmrWalletService.removeWalletListener(idlePayoutSyncer);
Expand Down

0 comments on commit 6c1fa17

Please sign in to comment.