diff --git a/common/src/main/java/bisq/common/app/DevEnv.java b/common/src/main/java/bisq/common/app/DevEnv.java index ee0495c902..c0065ea3e2 100644 --- a/common/src/main/java/bisq/common/app/DevEnv.java +++ b/common/src/main/java/bisq/common/app/DevEnv.java @@ -44,10 +44,6 @@ public class DevEnv { return devMode; } - public static boolean isDevTesting() { - return false; - } - public static void setDevMode(boolean devMode) { DevEnv.devMode = devMode; } diff --git a/core/src/main/java/bisq/core/trade/TradeManager.java b/core/src/main/java/bisq/core/trade/TradeManager.java index 232a6c07f8..0384187bf1 100644 --- a/core/src/main/java/bisq/core/trade/TradeManager.java +++ b/core/src/main/java/bisq/core/trade/TradeManager.java @@ -731,7 +731,7 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi clockWatcher.addListener(new ClockWatcher.Listener() { @Override public void onSecondTick() { - if (DevEnv.isDevTesting()) { + if (DevEnv.isDevMode()) { updateTradePeriodState(); } } @@ -748,8 +748,11 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi if (!trade.isPayoutPublished()) { Date maxTradePeriodDate = trade.getMaxTradePeriodDate(); Date halfTradePeriodDate = trade.getHalfTradePeriodDate(); - if (DevEnv.isDevTesting()) { - trade.setTradePeriodState(Trade.TradePeriodState.TRADE_PERIOD_OVER); + if (DevEnv.isDevMode()) { + TransactionConfidence confidenceForTxId = btcWalletService.getConfidenceForTxId(trade.getDepositTxId()); + if (confidenceForTxId != null && confidenceForTxId.getDepthInBlocks() > 4) { + trade.setTradePeriodState(Trade.TradePeriodState.TRADE_PERIOD_OVER); + } } if (maxTradePeriodDate != null && halfTradePeriodDate != null) { Date now = new Date(); diff --git a/desktop/src/main/java/bisq/desktop/main/MainViewModel.java b/desktop/src/main/java/bisq/desktop/main/MainViewModel.java index 91caddb09c..3eb0283a32 100644 --- a/desktop/src/main/java/bisq/desktop/main/MainViewModel.java +++ b/desktop/src/main/java/bisq/desktop/main/MainViewModel.java @@ -274,7 +274,7 @@ public class MainViewModel implements ViewModel, BisqSetup.BisqSetupListener { break; case TRADE_PERIOD_OVER: key = "displayTradePeriodOver" + trade.getId(); - if (DontShowAgainLookup.showAgain(key) && !DevEnv.isDevTesting()) { + if (DontShowAgainLookup.showAgain(key)) { DontShowAgainLookup.dontShowAgain(key, true); new Popup().warning(Res.get("popup.warning.tradePeriod.ended", trade.getShortId(),