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) {
|
public void unregisterTrade(Trade trade) {
|
||||||
|
log.warn("Unregistering {} {}", trade.getClass().getSimpleName(), trade.getId());
|
||||||
removeTrade(trade, true);
|
removeTrade(trade, true);
|
||||||
removeFailedTrade(trade);
|
removeFailedTrade(trade);
|
||||||
requestPersistence();
|
requestPersistence();
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class ProcessDepositResponse extends TradeTask {
|
||||||
// throw if error
|
// throw if error
|
||||||
DepositResponse message = (DepositResponse) processModel.getTradeMessage();
|
DepositResponse message = (DepositResponse) processModel.getTradeMessage();
|
||||||
if (message.getErrorMessage() != null) {
|
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);
|
trade.setStateIfValidTransitionTo(Trade.State.PUBLISH_DEPOSIT_TX_REQUEST_FAILED);
|
||||||
processModel.getTradeManager().unregisterTrade(trade);
|
processModel.getTradeManager().unregisterTrade(trade);
|
||||||
throw new RuntimeException(message.getErrorMessage());
|
throw new RuntimeException(message.getErrorMessage());
|
||||||
|
|
|
@ -1415,7 +1415,7 @@ public abstract class DisputeView extends ActivatableView<VBox, Void> implements
|
||||||
private String getDisputeStateText(Dispute dispute) {
|
private String getDisputeStateText(Dispute dispute) {
|
||||||
Trade trade = tradeManager.getTrade(dispute.getTradeId());
|
Trade trade = tradeManager.getTrade(dispute.getTradeId());
|
||||||
if (trade == null) {
|
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");
|
return Res.get("support.closed");
|
||||||
}
|
}
|
||||||
if (dispute.isClosed()) return Res.get("support.closed");
|
if (dispute.isClosed()) return Res.get("support.closed");
|
||||||
|
|
Loading…
Reference in a new issue