support opening dispute with corrupt trade wallet

This commit is contained in:
woodser 2024-11-07 10:47:54 -05:00
parent 6db4812f06
commit cdb99a9cfb
2 changed files with 16 additions and 3 deletions

View file

@ -393,8 +393,14 @@ public abstract class DisputeManager<T extends DisputeList<Dispute>> extends Sup
chatMessage.setSystemMessage(true); chatMessage.setSystemMessage(true);
dispute.addAndPersistChatMessage(chatMessage); dispute.addAndPersistChatMessage(chatMessage);
// create dispute opened message // export latest multisig hex
try {
trade.exportMultisigHex(); trade.exportMultisigHex();
} catch (Exception e) {
log.error("Failed to export multisig hex", e);
}
// create dispute opened message
NodeAddress agentNodeAddress = getAgentNodeAddress(dispute); NodeAddress agentNodeAddress = getAgentNodeAddress(dispute);
DisputeOpenedMessage disputeOpenedMessage = new DisputeOpenedMessage(dispute, DisputeOpenedMessage disputeOpenedMessage = new DisputeOpenedMessage(dispute,
p2PService.getAddress(), p2PService.getAddress(),

View file

@ -548,10 +548,17 @@ public class PendingTradesDataModel extends ActivatableDataModel {
sendDisputeOpenedMessage(dispute, disputeManager); sendDisputeOpenedMessage(dispute, disputeManager);
tradeManager.requestPersistence(); tradeManager.requestPersistence();
} else if (useArbitration) { } else if (useArbitration) {
// Only if we have completed mediation we allow arbitration
disputeManager = arbitrationManager; disputeManager = arbitrationManager;
Dispute dispute = disputesService.createDisputeForTrade(trade, offer, pubKeyRingProvider.get(), isMaker, isSupportTicket); Dispute dispute = disputesService.createDisputeForTrade(trade, offer, pubKeyRingProvider.get(), isMaker, isSupportTicket);
// export latest multisig hex
try {
trade.exportMultisigHex(); trade.exportMultisigHex();
} catch (Exception e) {
log.error("Failed to export multisig hex", e);
}
// send dispute opened message
sendDisputeOpenedMessage(dispute, disputeManager); sendDisputeOpenedMessage(dispute, disputeManager);
tradeManager.requestPersistence(); tradeManager.requestPersistence();
} else { } else {