mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Remove DevEnv.isDevTesting
Add check for number of confirmations in devMode to show support button after 5 blocks Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
parent
e3a0ae9425
commit
46b2cf914b
@ -44,10 +44,6 @@ public class DevEnv {
|
||||
return devMode;
|
||||
}
|
||||
|
||||
public static boolean isDevTesting() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void setDevMode(boolean devMode) {
|
||||
DevEnv.devMode = devMode;
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user