mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
clear basic trade process data on payout unlocked
This commit is contained in:
parent
948be8ce29
commit
74cfd474ad
@ -595,7 +595,7 @@ public abstract class Trade implements Tradable, Model {
|
||||
|
||||
// check if done
|
||||
if (isPayoutUnlocked()) {
|
||||
if (walletExists()) deleteWallet();
|
||||
maybeClearProcessData();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -662,6 +662,7 @@ public abstract class Trade implements Tradable, Model {
|
||||
if (!isInitialized) return;
|
||||
log.info("Payout unlocked for {} {}, deleting multisig wallet", getClass().getSimpleName(), getId());
|
||||
deleteWallet();
|
||||
maybeClearProcessData();
|
||||
if (idlePayoutSyncer != null) {
|
||||
xmrWalletService.removeWalletListener(idlePayoutSyncer);
|
||||
idlePayoutSyncer = null;
|
||||
@ -1144,6 +1145,24 @@ public abstract class Trade implements Tradable, Model {
|
||||
return payoutAmountFromMediation < normalPayoutAmount;
|
||||
}
|
||||
|
||||
public void maybeClearProcessData() {
|
||||
synchronized (walletLock) {
|
||||
|
||||
// skip if already cleared
|
||||
if (!walletExists()) return;
|
||||
|
||||
// delete trade wallet
|
||||
deleteWallet();
|
||||
|
||||
// TODO: clear other process data
|
||||
setPayoutTxHex(null);
|
||||
for (TradePeer peer : getPeers()) {
|
||||
peer.setUnsignedPayoutTxHex(null);
|
||||
peer.setUpdatedMultisigHex(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void maybeClearSensitiveData() {
|
||||
String change = "";
|
||||
if (removeAllChatMessages()) {
|
||||
|
Loading…
Reference in New Issue
Block a user