From 8ab2582db64764be65b6d99c9884f7571f6ae776 Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Thu, 17 Nov 2022 18:55:02 -0500 Subject: [PATCH] Use check for isRegtest instead of test for isDevTesting to set dev parameters Signed-off-by: HenrikJannsen --- .../main/java/bisq/core/dao/burningman/BurnTargetService.java | 4 ++-- .../core/dao/burningman/BurningManPresentationService.java | 4 ++-- .../main/java/bisq/core/dao/burningman/BurningManService.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/bisq/core/dao/burningman/BurnTargetService.java b/core/src/main/java/bisq/core/dao/burningman/BurnTargetService.java index ee5eda26b0..8ee1094d32 100644 --- a/core/src/main/java/bisq/core/dao/burningman/BurnTargetService.java +++ b/core/src/main/java/bisq/core/dao/burningman/BurnTargetService.java @@ -31,7 +31,7 @@ import bisq.core.dao.state.model.governance.Issuance; import bisq.core.dao.state.model.governance.IssuanceType; import bisq.core.dao.state.model.governance.ReimbursementProposal; -import bisq.common.app.DevEnv; +import bisq.common.config.Config; import bisq.common.util.Hex; import javax.inject.Inject; @@ -59,7 +59,7 @@ class BurnTargetService { // Default value for the estimated BTC trade fees per month as BSQ sat value (100 sat = 1 BSQ). // Default is roughly average of last 12 months at Nov 2022. // Can be changed with DAO parameter voting. - private static final long DEFAULT_ESTIMATED_BTC_TRADE_FEE_REVENUE_PER_CYCLE = DevEnv.isDevTesting() ? 1000000 : 6200000; + private static final long DEFAULT_ESTIMATED_BTC_TRADE_FEE_REVENUE_PER_CYCLE = Config.baseCurrencyNetwork().isRegtest() ? 1000000 : 6200000; private final DaoStateService daoStateService; private final CyclesInDaoStateService cyclesInDaoStateService; diff --git a/core/src/main/java/bisq/core/dao/burningman/BurningManPresentationService.java b/core/src/main/java/bisq/core/dao/burningman/BurningManPresentationService.java index ffd4d80011..e88ccb8c89 100644 --- a/core/src/main/java/bisq/core/dao/burningman/BurningManPresentationService.java +++ b/core/src/main/java/bisq/core/dao/burningman/BurningManPresentationService.java @@ -35,7 +35,7 @@ import bisq.core.dao.state.model.governance.Proposal; import bisq.network.p2p.storage.P2PDataStorage; -import bisq.common.app.DevEnv; +import bisq.common.config.Config; import bisq.common.util.Hex; import bisq.common.util.Tuple2; @@ -58,7 +58,7 @@ import lombok.extern.slf4j.Slf4j; public class BurningManPresentationService implements DaoStateListener { // Burn target gets increased by that amount to give more flexibility. // Burn target is calculated from reimbursements + estimated BTC fees - burned amounts. - static final long BURN_TARGET_BOOST_AMOUNT = DevEnv.isDevTesting() ? 1000000 : 10000000; + static final long BURN_TARGET_BOOST_AMOUNT = Config.baseCurrencyNetwork().isRegtest() ? 1000000 : 10000000; public static final String LEGACY_BURNING_MAN_NAME = "Legacy Burningman"; private final DaoStateService daoStateService; diff --git a/core/src/main/java/bisq/core/dao/burningman/BurningManService.java b/core/src/main/java/bisq/core/dao/burningman/BurningManService.java index 4ba06c353b..c0e9ca3b64 100644 --- a/core/src/main/java/bisq/core/dao/burningman/BurningManService.java +++ b/core/src/main/java/bisq/core/dao/burningman/BurningManService.java @@ -35,7 +35,7 @@ import bisq.core.dao.state.model.governance.IssuanceType; import bisq.network.p2p.storage.P2PDataStorage; -import bisq.common.app.DevEnv; +import bisq.common.config.Config; import bisq.common.util.Utilities; import javax.inject.Inject; @@ -69,7 +69,7 @@ public class BurningManService { private static final Date ACTIVATION_DATE = Utilities.getUTCDate(2023, GregorianCalendar.JANUARY, 1); public static boolean isActivated() { - return DevEnv.isDevTesting() || new Date().after(ACTIVATION_DATE); + return Config.baseCurrencyNetwork().isRegtest() || new Date().after(ACTIVATION_DATE); } // Parameters