mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-11-16 15:58:08 +00:00
add logging for dispute's trade being null #1364
This commit is contained in:
parent
22f32f43a0
commit
ed567beeb3
3 changed files with 3 additions and 1 deletions
|
@ -958,6 +958,7 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
|
|||
}
|
||||
|
||||
public void unregisterTrade(Trade trade) {
|
||||
log.warn("Unregistering {} {}", trade.getClass().getSimpleName(), trade.getId());
|
||||
removeTrade(trade, true);
|
||||
removeFailedTrade(trade);
|
||||
requestPersistence();
|
||||
|
|
|
@ -41,6 +41,7 @@ public class ProcessDepositResponse extends TradeTask {
|
|||
// throw if error
|
||||
DepositResponse message = (DepositResponse) processModel.getTradeMessage();
|
||||
if (message.getErrorMessage() != null) {
|
||||
log.warn("Unregistering trade {} {} because deposit response has error message={}", trade.getClass().getSimpleName(), trade.getShortId(), message.getErrorMessage());
|
||||
trade.setStateIfValidTransitionTo(Trade.State.PUBLISH_DEPOSIT_TX_REQUEST_FAILED);
|
||||
processModel.getTradeManager().unregisterTrade(trade);
|
||||
throw new RuntimeException(message.getErrorMessage());
|
||||
|
|
|
@ -1415,7 +1415,7 @@ public abstract class DisputeView extends ActivatableView<VBox, Void> implements
|
|||
private String getDisputeStateText(Dispute dispute) {
|
||||
Trade trade = tradeManager.getTrade(dispute.getTradeId());
|
||||
if (trade == null) {
|
||||
log.warn("Dispute's trade is null for trade {}", dispute.getTradeId());
|
||||
log.warn("Dispute's trade is null for trade {}, defaulting to dispute state text 'closed'", dispute.getTradeId());
|
||||
return Res.get("support.closed");
|
||||
}
|
||||
if (dispute.isClosed()) return Res.get("support.closed");
|
||||
|
|
Loading…
Reference in a new issue