mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Dont remove listener on fault
This commit is contained in:
parent
148278a959
commit
ea76c0577e
@ -6,7 +6,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
public class DevFlags {
|
public class DevFlags {
|
||||||
private static final Logger log = LoggerFactory.getLogger(DevFlags.class);
|
private static final Logger log = LoggerFactory.getLogger(DevFlags.class);
|
||||||
|
|
||||||
public static final boolean STRESS_TEST_MODE = true;
|
public static final boolean STRESS_TEST_MODE = false;
|
||||||
public static final boolean DEV_MODE = STRESS_TEST_MODE || false;
|
public static final boolean DEV_MODE = STRESS_TEST_MODE || false;
|
||||||
public static final boolean IS_RELEASE_VERSION = !DEV_MODE && true;
|
public static final boolean IS_RELEASE_VERSION = !DEV_MODE && true;
|
||||||
|
|
||||||
|
@ -60,9 +60,8 @@ public abstract class TradeProtocol {
|
|||||||
TradeMessage tradeMessage = (TradeMessage) message;
|
TradeMessage tradeMessage = (TradeMessage) message;
|
||||||
nonEmptyStringOf(tradeMessage.tradeId);
|
nonEmptyStringOf(tradeMessage.tradeId);
|
||||||
|
|
||||||
if (tradeMessage.tradeId.equals(processModel.getId())) {
|
if (tradeMessage.tradeId.equals(processModel.getId()))
|
||||||
doHandleDecryptedMessage(tradeMessage, peersNodeAddress);
|
doHandleDecryptedMessage(tradeMessage, peersNodeAddress);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//TODO not clear anymore what case is handled here
|
//TODO not clear anymore what case is handled here
|
||||||
@ -82,14 +81,14 @@ public abstract class TradeProtocol {
|
|||||||
|
|
||||||
public void completed() {
|
public void completed() {
|
||||||
cleanup();
|
cleanup();
|
||||||
|
processModel.getP2PService().removeDecryptedDirectMessageListener(decryptedDirectMessageListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cleanup() {
|
private void cleanup() {
|
||||||
log.debug("cleanup " + this);
|
log.debug("cleanup " + this);
|
||||||
stopTimeout();
|
stopTimeout();
|
||||||
|
// Don't remove removeDecryptedDirectMessageListener as it might be a non critical bug and it would prevent
|
||||||
processModel.getP2PService().removeDecryptedDirectMessageListener(decryptedDirectMessageListener);
|
// that we get further messages
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void applyMailboxMessage(DecryptedMsgWithPubKey decryptedMsgWithPubKey, Trade trade) {
|
public void applyMailboxMessage(DecryptedMsgWithPubKey decryptedMsgWithPubKey, Trade trade) {
|
||||||
|
@ -225,9 +225,8 @@ public abstract class TradeStepView extends AnchorPane {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void showDisputeInfoLabel() {
|
private void showDisputeInfoLabel() {
|
||||||
if (notificationGroup != null) {
|
if (notificationGroup != null)
|
||||||
notificationGroup.setLabelAndHeadlineVisible(true);
|
notificationGroup.setLabelAndHeadlineVisible(true);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showOpenDisputeButton() {
|
private void showOpenDisputeButton() {
|
||||||
@ -308,6 +307,10 @@ public abstract class TradeStepView extends AnchorPane {
|
|||||||
notificationGroup.label.setText(getWarningText());
|
notificationGroup.label.setText(getWarningText());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void removeWarning() {
|
||||||
|
hideNotificationGroup();
|
||||||
|
}
|
||||||
|
|
||||||
protected String getWarningText() {
|
protected String getWarningText() {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -402,7 +405,10 @@ public abstract class TradeStepView extends AnchorPane {
|
|||||||
case NORMAL:
|
case NORMAL:
|
||||||
break;
|
break;
|
||||||
case HALF_REACHED:
|
case HALF_REACHED:
|
||||||
showWarning();
|
if (trade.getState().getPhase().ordinal() < Trade.Phase.FIAT_RECEIVED.ordinal())
|
||||||
|
showWarning();
|
||||||
|
else
|
||||||
|
removeWarning();
|
||||||
break;
|
break;
|
||||||
case TRADE_PERIOD_OVER:
|
case TRADE_PERIOD_OVER:
|
||||||
onOpenForDispute();
|
onOpenForDispute();
|
||||||
|
Loading…
Reference in New Issue
Block a user