mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Merge branch 'master' into dao-fix-majorityvote-issue
# Conflicts: # desktop/src/main/java/bisq/desktop/main/dao/governance/make/MakeProposalView.java
This commit is contained in:
commit
a110d7d82d
@ -19,11 +19,18 @@ package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
|
||||
import org.libdohj.params.DashMainNetParams;
|
||||
import bisq.asset.NetworkParametersAdapter;
|
||||
|
||||
public class Dash extends Coin {
|
||||
public Dash() {
|
||||
super("Dash", "DASH", new Base58BitcoinAddressValidator(DashMainNetParams.get()), Network.MAINNET);
|
||||
super("Dash", "DASH", new Base58BitcoinAddressValidator(new DashMainNetParams()), Network.MAINNET);
|
||||
}
|
||||
|
||||
public static class DashMainNetParams extends NetworkParametersAdapter {
|
||||
public DashMainNetParams() {
|
||||
this.addressHeader = 76;
|
||||
this.p2shHeader = 16;
|
||||
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,8 +22,6 @@ import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.NetworkParametersAdapter;
|
||||
|
||||
import org.libdohj.params.DashMainNetParams;
|
||||
|
||||
public class DeepOnion extends Coin {
|
||||
public DeepOnion() {
|
||||
super("DeepOnion", "ONION", new DeepOnionAddressValidator());
|
||||
|
@ -19,12 +19,19 @@ package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
|
||||
import org.libdohj.params.DogecoinMainNetParams;
|
||||
import bisq.asset.NetworkParametersAdapter;
|
||||
|
||||
public class Dogecoin extends Coin {
|
||||
|
||||
public Dogecoin() {
|
||||
super("Dogecoin", "DOGE", new Base58BitcoinAddressValidator(DogecoinMainNetParams.get()));
|
||||
super("Dogecoin", "DOGE", new Base58BitcoinAddressValidator(new DogecoinMainNetParams()), Network.MAINNET);
|
||||
}
|
||||
|
||||
public static class DogecoinMainNetParams extends NetworkParametersAdapter {
|
||||
public DogecoinMainNetParams() {
|
||||
this.addressHeader = 30;
|
||||
this.p2shHeader = 22;
|
||||
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,11 +19,18 @@ package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
|
||||
import org.libdohj.params.LitecoinMainNetParams;
|
||||
import bisq.asset.NetworkParametersAdapter;
|
||||
|
||||
public class Litecoin extends Coin {
|
||||
public Litecoin() {
|
||||
super("Litecoin", "LTC", new Base58BitcoinAddressValidator(LitecoinMainNetParams.get()), Network.MAINNET);
|
||||
super("Litecoin", "LTC", new Base58BitcoinAddressValidator(new LitecoinMainNetParams()), Network.MAINNET);
|
||||
}
|
||||
|
||||
public static class LitecoinMainNetParams extends NetworkParametersAdapter {
|
||||
public LitecoinMainNetParams() {
|
||||
this.addressHeader = 48;
|
||||
this.p2shHeader = 5;
|
||||
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
10
build.gradle
10
build.gradle
@ -33,7 +33,6 @@ configure(subprojects) {
|
||||
jmockitVersion = '1.42'
|
||||
joptVersion = '5.0.3'
|
||||
langVersion = '3.4'
|
||||
libdohjVersion = '7be803fa'
|
||||
bitcoinjVersion = 'cd30ad5b'
|
||||
logbackVersion = '1.1.10'
|
||||
lombokVersion = '1.18.2'
|
||||
@ -132,10 +131,6 @@ configure([project(':desktop'),
|
||||
|
||||
configure(project(':assets')) {
|
||||
dependencies {
|
||||
compile("network.bisq.libdohj:libdohj-core:$libdohjVersion") {
|
||||
exclude(module: 'protobuf-java')
|
||||
exclude(module: 'bitcoinj-core')
|
||||
}
|
||||
compile("com.github.bisq-network.bitcoinj:bitcoinj-core:$bitcoinjVersion") {
|
||||
exclude(module: 'protobuf-java')
|
||||
}
|
||||
@ -174,11 +169,6 @@ configure(project(':common')) {
|
||||
compile('com.google.inject:guice:4.1.0') {
|
||||
exclude(module: 'guava')
|
||||
}
|
||||
compile("network.bisq.libdohj:libdohj-core:$libdohjVersion") {
|
||||
exclude(module: 'slf4j-api')
|
||||
exclude(module: 'protobuf-java')
|
||||
exclude(module: 'bitcoinj-core')
|
||||
}
|
||||
compile("com.github.bisq-network.bitcoinj:bitcoinj-core:$bitcoinjVersion") {
|
||||
exclude(module: 'jsr305')
|
||||
exclude(module: 'slf4j-api')
|
||||
|
@ -21,22 +21,24 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
// Helps configure listener objects that are run by the `UserThread` each second
|
||||
// and can do per second, per minute and delayed second actions.
|
||||
@Slf4j
|
||||
public class Clock {
|
||||
private static final Logger log = LoggerFactory.getLogger(Clock.class);
|
||||
|
||||
public static final int IDLE_TOLERANCE = 20000;
|
||||
public static final int IDLE_TOLERANCE_MS = 20000;
|
||||
|
||||
public interface Listener {
|
||||
void onSecondTick();
|
||||
|
||||
void onMinuteTick();
|
||||
|
||||
void onMissedSecondTick(long missed);
|
||||
default void onMissedSecondTick(long missedMs) {
|
||||
}
|
||||
|
||||
default void onAwakeFromStandby(long missedMs) {
|
||||
}
|
||||
}
|
||||
|
||||
private Timer timer;
|
||||
@ -51,18 +53,24 @@ public class Clock {
|
||||
if (timer == null) {
|
||||
lastSecondTick = System.currentTimeMillis();
|
||||
timer = UserThread.runPeriodically(() -> {
|
||||
listeners.stream().forEach(Listener::onSecondTick);
|
||||
listeners.forEach(Listener::onSecondTick);
|
||||
counter++;
|
||||
if (counter >= 60) {
|
||||
counter = 0;
|
||||
listeners.stream().forEach(Listener::onMinuteTick);
|
||||
listeners.forEach(Listener::onMinuteTick);
|
||||
}
|
||||
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
long diff = currentTimeMillis - lastSecondTick;
|
||||
if (diff > 1000)
|
||||
listeners.stream().forEach(listener -> listener.onMissedSecondTick(diff - 1000));
|
||||
if (diff > 1000) {
|
||||
long missedMs = diff - 1000;
|
||||
listeners.forEach(listener -> listener.onMissedSecondTick(missedMs));
|
||||
|
||||
if (missedMs > Clock.IDLE_TOLERANCE_MS) {
|
||||
log.info("We have been in standby mode for {} sec", missedMs / 1000);
|
||||
listeners.forEach(listener -> listener.onAwakeFromStandby(missedMs));
|
||||
}
|
||||
}
|
||||
lastSecondTick = currentTimeMillis;
|
||||
}, 1, TimeUnit.SECONDS);
|
||||
}
|
||||
|
@ -23,8 +23,6 @@ import bisq.core.locale.Res;
|
||||
import bisq.core.user.Preferences;
|
||||
import bisq.core.util.BSFormatter;
|
||||
|
||||
import org.libdohj.Version;
|
||||
|
||||
import org.bitcoinj.core.VersionMessage;
|
||||
import org.bitcoinj.store.BlockStoreException;
|
||||
import org.bitcoinj.store.ChainFileLockedException;
|
||||
@ -90,8 +88,8 @@ public class WalletAppSetup {
|
||||
Runnable walletPasswordHandler,
|
||||
Runnable downloadCompleteHandler,
|
||||
Runnable walletInitializedHandler) {
|
||||
log.info("Initialize WalletAppSetup with BitcoinJ version {} and LibDohJ version {} with hash of BitcoinJ commit {}",
|
||||
VersionMessage.BITCOINJ_VERSION, Version.VERSION, Version.BITCOINJ_VERSION);
|
||||
log.info("Initialize WalletAppSetup with BitcoinJ version {} and hash of BitcoinJ commit {}",
|
||||
VersionMessage.BITCOINJ_VERSION, "cd30ad5b");
|
||||
|
||||
ObjectProperty<Throwable> walletServiceException = new SimpleObjectProperty<>();
|
||||
btcInfoBinding = EasyBind.combine(walletsSetup.downloadPercentageProperty(),
|
||||
|
@ -17,13 +17,6 @@
|
||||
|
||||
package bisq.core.btc;
|
||||
|
||||
import org.libdohj.params.DashMainNetParams;
|
||||
import org.libdohj.params.DashRegTestParams;
|
||||
import org.libdohj.params.DashTestNet3Params;
|
||||
import org.libdohj.params.LitecoinMainNetParams;
|
||||
import org.libdohj.params.LitecoinRegTestParams;
|
||||
import org.libdohj.params.LitecoinTestNet3Params;
|
||||
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.params.MainNetParams;
|
||||
import org.bitcoinj.params.RegTestParams;
|
||||
@ -34,15 +27,7 @@ import lombok.Getter;
|
||||
public enum BaseCurrencyNetwork {
|
||||
BTC_MAINNET(MainNetParams.get(), "BTC", "MAINNET", "Bitcoin"),
|
||||
BTC_TESTNET(TestNet3Params.get(), "BTC", "TESTNET", "Bitcoin"),
|
||||
BTC_REGTEST(RegTestParams.get(), "BTC", "REGTEST", "Bitcoin"),
|
||||
|
||||
LTC_MAINNET(LitecoinMainNetParams.get(), "LTC", "MAINNET", "Litecoin"),
|
||||
LTC_TESTNET(LitecoinTestNet3Params.get(), "LTC", "TESTNET", "Litecoin"),
|
||||
LTC_REGTEST(LitecoinRegTestParams.get(), "LTC", "REGTEST", "Litecoin"),
|
||||
|
||||
DASH_MAINNET(DashMainNetParams.get(), "DASH", "MAINNET", "Dash"),
|
||||
DASH_TESTNET(DashTestNet3Params.get(), "DASH", "TESTNET", "Dash"),
|
||||
DASH_REGTEST(DashRegTestParams.get(), "DASH", "REGTEST", "Dash");
|
||||
BTC_REGTEST(RegTestParams.get(), "BTC", "REGTEST", "Bitcoin");
|
||||
|
||||
@Getter
|
||||
private final NetworkParameters parameters;
|
||||
@ -76,14 +61,6 @@ public enum BaseCurrencyNetwork {
|
||||
return "BTC".equals(currencyCode);
|
||||
}
|
||||
|
||||
public boolean isLitecoin() {
|
||||
return "LTC".equals(currencyCode);
|
||||
}
|
||||
|
||||
public boolean isDash() {
|
||||
return "DASH".equals(currencyCode);
|
||||
}
|
||||
|
||||
public long getDefaultMinFeePerByte() {
|
||||
return 1;
|
||||
}
|
||||
|
@ -48,83 +48,32 @@ public class Restrictions {
|
||||
|
||||
public static Coin getMinTradeAmount() {
|
||||
if (MIN_TRADE_AMOUNT == null)
|
||||
switch (BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode()) {
|
||||
case "BTC":
|
||||
MIN_TRADE_AMOUNT = Coin.valueOf(10_000); // 2 USD @ 20000 USD/BTC
|
||||
break;
|
||||
case "LTC":
|
||||
MIN_TRADE_AMOUNT = Coin.valueOf(100_000); // 0.04 EUR @ 40 EUR/LTC
|
||||
break;
|
||||
case "DASH":
|
||||
MIN_TRADE_AMOUNT = Coin.valueOf(20_000L); // 0.03 EUR at @ 150 EUR/DASH;
|
||||
break;
|
||||
}
|
||||
return MIN_TRADE_AMOUNT;
|
||||
}
|
||||
|
||||
// Can be reduced but not increased. Otherwise would break existing offers!
|
||||
public static Coin getMaxBuyerSecurityDeposit() {
|
||||
if (MAX_BUYER_SECURITY_DEPOSIT == null)
|
||||
switch (BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode()) {
|
||||
case "BTC":
|
||||
MAX_BUYER_SECURITY_DEPOSIT = Coin.valueOf(5_000_000); // 1000 USD @ 20000 USD/BTC
|
||||
break;
|
||||
case "LTC":
|
||||
MAX_BUYER_SECURITY_DEPOSIT = Coin.valueOf(1_200_000_000); // 500 EUR @ 40 EUR/LTC
|
||||
break;
|
||||
case "DASH":
|
||||
MAX_BUYER_SECURITY_DEPOSIT = Coin.valueOf(300_000_000L); // 450 EUR @ 150 EUR/DASH;
|
||||
break;
|
||||
}
|
||||
|
||||
return MAX_BUYER_SECURITY_DEPOSIT;
|
||||
}
|
||||
|
||||
public static Coin getMinBuyerSecurityDeposit() {
|
||||
if (MIN_BUYER_SECURITY_DEPOSIT == null)
|
||||
switch (BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode()) {
|
||||
case "BTC":
|
||||
MIN_BUYER_SECURITY_DEPOSIT = Coin.valueOf(50_000); // 10 USD @ 20000 USD/BTC
|
||||
break;
|
||||
case "LTC":
|
||||
MIN_BUYER_SECURITY_DEPOSIT = Coin.valueOf(6_000_000); // 2.4 EUR @ 40 EUR/LTC
|
||||
break;
|
||||
case "DASH":
|
||||
MIN_BUYER_SECURITY_DEPOSIT = Coin.valueOf(1_500_000L); // 2.5 EUR @ 150 EUR/DASH;
|
||||
break;
|
||||
}
|
||||
return MIN_BUYER_SECURITY_DEPOSIT;
|
||||
}
|
||||
|
||||
public static Coin getDefaultBuyerSecurityDeposit() {
|
||||
if (DEFAULT_BUYER_SECURITY_DEPOSIT == null)
|
||||
switch (BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode()) {
|
||||
case "BTC":
|
||||
DEFAULT_BUYER_SECURITY_DEPOSIT = Coin.valueOf(1_000_000); // 200 EUR @ 20000 USD/BTC
|
||||
break;
|
||||
case "LTC":
|
||||
DEFAULT_BUYER_SECURITY_DEPOSIT = Coin.valueOf(200_000_000); // 75 EUR @ 40 EUR/LTC
|
||||
break;
|
||||
case "DASH":
|
||||
DEFAULT_BUYER_SECURITY_DEPOSIT = Coin.valueOf(50_000_000L); // 75 EUR @ 150 EUR/DASH;
|
||||
break;
|
||||
}
|
||||
return DEFAULT_BUYER_SECURITY_DEPOSIT;
|
||||
}
|
||||
|
||||
public static Coin getSellerSecurityDeposit() {
|
||||
if (SELLER_SECURITY_DEPOSIT == null)
|
||||
switch (BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode()) {
|
||||
case "BTC":
|
||||
SELLER_SECURITY_DEPOSIT = Coin.valueOf(300_000); // 60 USD @ 20000 USD/BTC
|
||||
break;
|
||||
case "LTC":
|
||||
SELLER_SECURITY_DEPOSIT = Coin.valueOf(60_000_000); // 25 EUR @ 40 EUR/LTC
|
||||
break;
|
||||
case "DASH":
|
||||
SELLER_SECURITY_DEPOSIT = Coin.valueOf(15_000_000L); // 25 EUR @ 150 EUR/DASH;
|
||||
break;
|
||||
}
|
||||
return SELLER_SECURITY_DEPOSIT;
|
||||
}
|
||||
}
|
||||
|
@ -440,7 +440,7 @@ public class DaoFacade implements DaoSetupService {
|
||||
return lastBlock;
|
||||
}
|
||||
|
||||
// Because last block in request and voting phases must not be used fo making a tx as it will get confirmed in the
|
||||
// Because last block in request and voting phases must not be used for making a tx as it will get confirmed in the
|
||||
// next block which would be already the next phase we hide that last block to the user and add it to the break.
|
||||
public int getDurationForPhaseForDisplay(DaoPhase.Phase phase) {
|
||||
int duration = periodService.getDurationForPhase(phase, daoStateService.getChainHeight());
|
||||
@ -471,6 +471,10 @@ public class DaoFacade implements DaoSetupService {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public int getCurrentCycleDuration() {
|
||||
return periodService.getCurrentCycle().getDuration();
|
||||
}
|
||||
|
||||
// listeners for phase change
|
||||
public ReadOnlyObjectProperty<DaoPhase.Phase> phaseProperty() {
|
||||
return phaseProperty;
|
||||
|
@ -27,6 +27,7 @@ import bisq.core.dao.governance.proposal.storage.temp.TempProposalStorageService
|
||||
import bisq.core.dao.state.DaoStateListener;
|
||||
import bisq.core.dao.state.DaoStateService;
|
||||
import bisq.core.dao.state.model.blockchain.Block;
|
||||
import bisq.core.dao.state.model.blockchain.Tx;
|
||||
import bisq.core.dao.state.model.governance.DaoPhase;
|
||||
import bisq.core.dao.state.model.governance.Proposal;
|
||||
|
||||
@ -47,6 +48,7 @@ import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import lombok.Getter;
|
||||
@ -240,8 +242,11 @@ public class ProposalService implements HashMapChangedListener, AppendOnlyDataSt
|
||||
tempProposals.remove(proposal);
|
||||
}
|
||||
} else {
|
||||
Optional<Tx> tx = daoStateService.getTx(proposal.getTxId());
|
||||
log.warn("We received a remove request outside the PROPOSAL phase. " +
|
||||
"Proposal.txId={}, blockHeight={}", proposal.getTxId(), daoStateService.getChainHeight());
|
||||
"Proposal.txId={}, current blockHeight={}, tx blockHeight={}, proposal creation date={}",
|
||||
proposal.getTxId(), daoStateService.getChainHeight(),
|
||||
tx.isPresent() ? tx.get().getBlockHeight() : "null", proposal.getCreationDate());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
61
core/src/main/java/bisq/core/dao/presentation/DaoUtil.java
Normal file
61
core/src/main/java/bisq/core/dao/presentation/DaoUtil.java
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.dao.presentation;
|
||||
|
||||
import bisq.core.dao.DaoFacade;
|
||||
import bisq.core.dao.state.model.governance.DaoPhase;
|
||||
import bisq.core.locale.Res;
|
||||
import bisq.core.util.BSFormatter;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Util class for shared presentation code.
|
||||
*/
|
||||
public class DaoUtil {
|
||||
|
||||
public static String getNextPhaseDuration(int height, DaoPhase.Phase phase, DaoFacade daoFacade, BSFormatter formatter) {
|
||||
final int currentCycleDuration = daoFacade.getCurrentCycleDuration();
|
||||
long start = daoFacade.getFirstBlockOfPhaseForDisplay(height, phase) + currentCycleDuration;
|
||||
long end = daoFacade.getLastBlockOfPhaseForDisplay(height, phase) + currentCycleDuration;
|
||||
|
||||
long now = new Date().getTime();
|
||||
SimpleDateFormat dateFormatter = new SimpleDateFormat("dd MMM", Locale.getDefault());
|
||||
SimpleDateFormat timeFormatter = new SimpleDateFormat("HH:mm", Locale.getDefault());
|
||||
String startDateTime = formatter.formatDateTime(new Date(now + (start - height) * 10 * 60 * 1000L), dateFormatter, timeFormatter);
|
||||
String endDateTime = formatter.formatDateTime(new Date(now + (end - height) * 10 * 60 * 1000L), dateFormatter, timeFormatter);
|
||||
|
||||
return Res.get("dao.cycle.phaseDurationWithoutBlocks", start, end, startDateTime, endDateTime);
|
||||
}
|
||||
|
||||
public static String getPhaseDuration(int height, DaoPhase.Phase phase, DaoFacade daoFacade, BSFormatter formatter) {
|
||||
long start = daoFacade.getFirstBlockOfPhaseForDisplay(height, phase);
|
||||
long end = daoFacade.getLastBlockOfPhaseForDisplay(height, phase);
|
||||
long duration = daoFacade.getDurationForPhaseForDisplay(phase);
|
||||
long now = new Date().getTime();
|
||||
SimpleDateFormat dateFormatter = new SimpleDateFormat("dd MMM", Locale.getDefault());
|
||||
SimpleDateFormat timeFormatter = new SimpleDateFormat("HH:mm", Locale.getDefault());
|
||||
String startDateTime = formatter.formatDateTime(new Date(now + (start - height) * 10 * 60 * 1000L), dateFormatter, timeFormatter);
|
||||
String endDateTime = formatter.formatDateTime(new Date(now + (end - height) * 10 * 60 * 1000L), dateFormatter, timeFormatter);
|
||||
String durationTime = formatter.formatDurationAsWords(duration * 10 * 60 * 1000, false, false);
|
||||
return Res.get("dao.cycle.phaseDuration", duration, durationTime, start, end, startDateTime, endDateTime);
|
||||
}
|
||||
}
|
@ -42,21 +42,8 @@ class DefaultSeedNodeAddresses {
|
||||
|
||||
// regtest
|
||||
new NodeAddress("localhost:2002"),
|
||||
new NodeAddress("localhost:3002"),
|
||||
new NodeAddress("localhost:3002")
|
||||
/* new NodeAddress("localhost:4002"),*/
|
||||
|
||||
// LTC
|
||||
// mainnet
|
||||
new NodeAddress("localhost:2003"),
|
||||
|
||||
// regtest
|
||||
new NodeAddress("localhost:2005"),
|
||||
|
||||
// DOGE regtest
|
||||
new NodeAddress("localhost:2008"),
|
||||
|
||||
// DASH regtest
|
||||
new NodeAddress("localhost:2011")
|
||||
);
|
||||
|
||||
// Addresses are used if their port match the network id:
|
||||
@ -93,15 +80,8 @@ class DefaultSeedNodeAddresses {
|
||||
// 4. Rename the directory with your local onion address
|
||||
// 5. Edit here your found onion address (new NodeAddress("YOUR_ONION.onion:8002")
|
||||
new NodeAddress("rxdkppp3vicnbgqt.onion:8002"),
|
||||
new NodeAddress("4ie52dse64kaarxw.onion:8002"),
|
||||
new NodeAddress("4ie52dse64kaarxw.onion:8002")
|
||||
|
||||
// LTC mainnet
|
||||
new NodeAddress("acyvotgewx46pebw.onion:8003"),
|
||||
new NodeAddress("pklgy3vdfn3obkur.onion:8003"),
|
||||
|
||||
// DASH mainnet
|
||||
new NodeAddress("toeu5ikb27ydscxt.onion:8006"),
|
||||
new NodeAddress("ae4yvaivhnekkhqf.onion:8006")
|
||||
);
|
||||
|
||||
private DefaultSeedNodeAddresses() {
|
||||
|
@ -168,19 +168,6 @@ public final class PaymentMethod implements PersistablePayload, Comparable {
|
||||
maxTradeLimitLowRisk = Coin.parseCoin("0.5");
|
||||
maxTradeLimitVeryLowRisk = Coin.parseCoin("1");
|
||||
break;
|
||||
case "LTC":
|
||||
maxTradeLimitHighRisk = Coin.parseCoin("12.5");
|
||||
maxTradeLimitMidRisk = Coin.parseCoin("25");
|
||||
maxTradeLimitLowRisk = Coin.parseCoin("50");
|
||||
maxTradeLimitVeryLowRisk = Coin.parseCoin("100");
|
||||
break;
|
||||
case "DASH":
|
||||
maxTradeLimitHighRisk = Coin.parseCoin("5");
|
||||
maxTradeLimitMidRisk = Coin.parseCoin("10");
|
||||
maxTradeLimitLowRisk = Coin.parseCoin("20");
|
||||
maxTradeLimitVeryLowRisk = Coin.parseCoin("40");
|
||||
break;
|
||||
|
||||
default:
|
||||
log.error("Unsupported BaseCurrency. " + BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode());
|
||||
throw new RuntimeException("Unsupported BaseCurrency. " + BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode());
|
||||
|
@ -57,12 +57,8 @@ public class FeeProvider extends HttpClientProvider {
|
||||
//noinspection unchecked
|
||||
LinkedTreeMap<String, Double> dataMap = (LinkedTreeMap<String, Double>) linkedTreeMap.get("dataMap");
|
||||
Long btcTxFee = dataMap.get("btcTxFee").longValue();
|
||||
Long ltcTxFee = dataMap.get("ltcTxFee").longValue();
|
||||
Long dashTxFee = dataMap.get("dashTxFee").longValue();
|
||||
|
||||
map.put("BTC", btcTxFee);
|
||||
map.put("LTC", ltcTxFee);
|
||||
map.put("DASH", dashTxFee);
|
||||
} catch (Throwable t) {
|
||||
log.error(t.toString());
|
||||
t.printStackTrace();
|
||||
|
@ -636,10 +636,6 @@ public class TradeManager implements PersistedDataHost {
|
||||
public void onMinuteTick() {
|
||||
updateTradePeriodState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMissedSecondTick(long missed) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -105,26 +105,6 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
public static final BlockChainExplorer BSQ_TEST_NET_EXPLORER = new BlockChainExplorer("BSQ", "https://explorer.bisq.network/testnet/tx.html?tx=",
|
||||
"https://explorer.bisq.network/testnet/Address.html?addr=");
|
||||
|
||||
private static final ArrayList<BlockChainExplorer> LTC_MAIN_NET_EXPLORERS = new ArrayList<>(Arrays.asList(
|
||||
new BlockChainExplorer("Blockcypher", "https://live.blockcypher.com/ltc/tx/", "https://live.blockcypher.com/ltc/address/"),
|
||||
new BlockChainExplorer("CryptoID", "https://chainz.cryptoid.info/ltc/tx.dws?", "https://chainz.cryptoid.info/ltc/address.dws?"),
|
||||
new BlockChainExplorer("Abe Search", "http://explorer.litecoin.net/tx/", "http://explorer.litecoin.net/address/"),
|
||||
new BlockChainExplorer("SoChain", "https://chain.so/tx/LTC/", "https://chain.so/address/LTC/"),
|
||||
new BlockChainExplorer("Blockr.io", "http://ltc.blockr.io/tx/info/", "http://ltc.blockr.io/address/info/")
|
||||
));
|
||||
|
||||
private static final ArrayList<BlockChainExplorer> LTC_TEST_NET_EXPLORERS = new ArrayList<>(Arrays.asList(
|
||||
new BlockChainExplorer("SoChain", "https://chain.so/tx/LTCTEST/", "https://chain.so/address/LTCTEST/")
|
||||
));
|
||||
|
||||
private static final ArrayList<BlockChainExplorer> DASH_MAIN_NET_EXPLORERS = new ArrayList<>(Arrays.asList(
|
||||
new BlockChainExplorer("SoChain", "https://chain.so/tx/dash/", "https://chain.so/address/dash/")
|
||||
));
|
||||
private static final ArrayList<BlockChainExplorer> DASH_TEST_NET_EXPLORERS = new ArrayList<>(Arrays.asList(
|
||||
new BlockChainExplorer("SoChain", "https://chain.so/tx/DASHTEST/", "https://chain.so/address/DASHTEST/")
|
||||
));
|
||||
|
||||
|
||||
// payload is initialized so the default values are available for Property initialization.
|
||||
@Setter
|
||||
@Delegate(excludes = ExcludesDelegateMethods.class)
|
||||
@ -243,14 +223,6 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
setBlockChainExplorerMainNet(BTC_MAIN_NET_EXPLORERS.get(0));
|
||||
setBlockChainExplorerTestNet(BTC_TEST_NET_EXPLORERS.get(0));
|
||||
break;
|
||||
case "LTC":
|
||||
setBlockChainExplorerMainNet(LTC_MAIN_NET_EXPLORERS.get(0));
|
||||
setBlockChainExplorerTestNet(LTC_TEST_NET_EXPLORERS.get(0));
|
||||
break;
|
||||
case "DASH":
|
||||
setBlockChainExplorerMainNet(DASH_MAIN_NET_EXPLORERS.get(0));
|
||||
setBlockChainExplorerTestNet(DASH_TEST_NET_EXPLORERS.get(0));
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("BaseCurrencyNetwork not defined. BaseCurrencyNetwork=" + baseCurrencyNetwork);
|
||||
}
|
||||
@ -672,16 +644,6 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
case BTC_TESTNET:
|
||||
case BTC_REGTEST:
|
||||
return BTC_TEST_NET_EXPLORERS;
|
||||
case LTC_MAINNET:
|
||||
return LTC_MAIN_NET_EXPLORERS;
|
||||
case LTC_TESTNET:
|
||||
case LTC_REGTEST:
|
||||
return LTC_TEST_NET_EXPLORERS;
|
||||
case DASH_MAINNET:
|
||||
return DASH_MAIN_NET_EXPLORERS;
|
||||
case DASH_REGTEST:
|
||||
case DASH_TESTNET:
|
||||
return DASH_TEST_NET_EXPLORERS;
|
||||
default:
|
||||
throw new RuntimeException("BaseCurrencyNetwork not defined. BaseCurrencyNetwork=" + baseCurrencyNetwork);
|
||||
}
|
||||
|
@ -66,13 +66,6 @@ public class BsqFormatter extends BSFormatter {
|
||||
case "BTC":
|
||||
coinFormat = new MonetaryFormat().shift(6).code(6, "BSQ").minDecimals(2);
|
||||
break;
|
||||
case "LTC":
|
||||
coinFormat = new MonetaryFormat().shift(3).code(3, "BSQ").minDecimals(5);
|
||||
break;
|
||||
case "DASH":
|
||||
// BSQ for DASH not used/supported
|
||||
coinFormat = new MonetaryFormat().shift(3).code(3, "???").minDecimals(5);
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("baseCurrencyCode not defined. baseCurrencyCode=" + baseCurrencyCode);
|
||||
}
|
||||
|
@ -1205,10 +1205,12 @@ dao.cycle.overview.headline=Voting cycle overview
|
||||
dao.cycle.currentPhase=Current phase
|
||||
dao.cycle.currentBlockHeight=Current block height
|
||||
dao.cycle.proposal=Proposal phase
|
||||
dao.cycle.proposal.next=Next proposal phase
|
||||
dao.cycle.blindVote=Blind vote phase
|
||||
dao.cycle.voteReveal=Vote reveal phase
|
||||
dao.cycle.voteResult=Vote result
|
||||
dao.cycle.phaseDuration={0} blocks (≈{1}); Block {2} - {3} (≈{4} - ≈{5})
|
||||
dao.cycle.phaseDurationWithoutBlocks=Block {0} - {1} (≈{2} - ≈{3})
|
||||
|
||||
dao.voteReveal.txPublished.headLine=Vote reveal transaction published
|
||||
dao.voteReveal.txPublished=Your vote reveal transaction with transaction ID {0} was successfully published.\n\n\
|
||||
@ -1575,6 +1577,7 @@ dao.proposal.votes.header=Vote on all proposals
|
||||
dao.proposal.votes.header.voted=My vote
|
||||
dao.proposal.myVote.button=Vote on all proposals
|
||||
dao.proposal.create.selectProposalType=Select proposal type
|
||||
dao.proposal.create.phase.inactive=Please wait until the next proposal phase
|
||||
dao.proposal.create.proposalType=Proposal type
|
||||
dao.proposal.create.createNew=Make new proposal
|
||||
dao.proposal.create.create.button=Make proposal
|
||||
@ -2204,19 +2207,6 @@ BTC_TESTNET=Bitcoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Bitcoin Regtest
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Litecoin Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Litecoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Litecoin Regtest
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=DASH Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=DASH Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=DASH Regtest
|
||||
|
||||
time.year=Year
|
||||
time.month=Month
|
||||
time.week=Week
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Bitcoin-Testnetzwerk
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Bitcoin-Regtest
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Litecoin-Hauptnetzwerk
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Litecoin-Testnetzwerk
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Litecoin-Regtest
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=DASH-Hauptnetz
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=DASH Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=DASH Regtest
|
||||
|
||||
time.year=Jahr
|
||||
time.month=Monat
|
||||
time.week=Woche
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Bitcoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Bitcoin Regtest
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Litecoin Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Litecoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Litecoin Regtest
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=DASH Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=DASH Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=DASH Regtest
|
||||
|
||||
time.year=Έτος
|
||||
time.month=Μήνας
|
||||
time.week=Εβδομάδα
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Red de prueba de Bitcoin
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Regtest Bitcoin
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Red principal de Litecoin
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Testnet Litecoin
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Regtest Litecoin
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=Red principal DASH
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=Testnet DASH
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=Regtest DASH
|
||||
|
||||
time.year=Año
|
||||
time.month=Mes
|
||||
time.week=Semana
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Bitcoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Bitcoin Regtest
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Litecoin Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Litecoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Litecoin Regtest
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=DASH Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=DASH Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=DASH Regtest
|
||||
|
||||
time.year=سال
|
||||
time.month=ماه
|
||||
time.week=هفته
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Bitcoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Bitcoin Regtest
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Litecoin Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Litecoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Litecoin Regtest
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=DASH Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=DASH Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=DASH Regtest
|
||||
|
||||
time.year=Année
|
||||
time.month=Mois
|
||||
time.week=Semaine
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Bitcoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Bitcoin Regtest
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Litecoin Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Litecoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Litecoin Regtest
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=DASH főhálozat
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=DASH Teszthálozat
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=DASH Regtest
|
||||
|
||||
time.year=Év
|
||||
time.month=Hónap
|
||||
time.week=Hét
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Testnet do Bitcoin
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Regtest do Bitcoin
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Mainnet da Litecoin
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Testnet da Litecoin
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Regtest da Litecoin
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=Mainnet da DASH
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=Testnet do DASH
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=Regtest do DASH
|
||||
|
||||
time.year=Ano
|
||||
time.month=Mês
|
||||
time.week=Semana
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Bitcoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Bitcoin Regtest
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Litecoin Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Litecoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Litecoin Regtest
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=Rețeaua principală DASH
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=Rețeaua de test DASH
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=DASH Regtest
|
||||
|
||||
time.year=An
|
||||
time.month=Lună
|
||||
time.week=Săptămână
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Биткойн Тест-сеть
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Биткойн режим регрессионного тестирования
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Litecoin Основная сеть
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Litecoin Тест-сеть
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Litecoin Регистр.-тест
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=DASH Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=DASH Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=DASH Regtest
|
||||
|
||||
time.year=Год
|
||||
time.month=Месяц
|
||||
time.week=Неделя
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Bitkoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Bitkoin Regtest
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Lajtkoin Mejnnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Lajtkoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Lajtkoin Regtest
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=DASH Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=DASH Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=DASH Regtest
|
||||
|
||||
time.year=Godina
|
||||
time.month=Mesec
|
||||
time.week=Nedelja
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Bitcoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Bitcoin Regtest
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Litecoin Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Litecoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Litecoin Regtest
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=DASH Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=DASH Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=DASH Regtest
|
||||
|
||||
time.year=ปี
|
||||
time.month=เดือน
|
||||
time.week=สัปดาห์
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=Bitcoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=Bitcoin Regtest
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=Litecoin Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=Litecoin Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=Litecoin Regtest
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=DASH Mainnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=DASH Testnet
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=DASH Regtest
|
||||
|
||||
time.year=Năm
|
||||
time.month=Tháng
|
||||
time.week=Tuần
|
||||
|
@ -1956,19 +1956,6 @@ BTC_TESTNET=比特币测试网络
|
||||
# suppress inspection "UnusedProperty"
|
||||
BTC_REGTEST=比特币回归测试
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_MAINNET=莱特币主干网络
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_TESTNET=莱特币测试网络
|
||||
# suppress inspection "UnusedProperty"
|
||||
LTC_REGTEST=莱特币回归测试
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_MAINNET=达世币主干网络
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_TESTNET=达世币测试网络
|
||||
# suppress inspection "UnusedProperty"
|
||||
DASH_REGTEST=达世币回归测试
|
||||
|
||||
time.year=年线
|
||||
time.month=月线
|
||||
time.week=周线
|
||||
|
@ -20,11 +20,11 @@ package bisq.desktop.main.dao.governance.dashboard;
|
||||
import bisq.desktop.common.view.ActivatableView;
|
||||
import bisq.desktop.common.view.FxmlView;
|
||||
import bisq.desktop.main.dao.governance.PhasesView;
|
||||
import bisq.desktop.util.FormBuilder;
|
||||
import bisq.desktop.util.Layout;
|
||||
|
||||
import bisq.core.dao.DaoFacade;
|
||||
import bisq.core.dao.governance.period.PeriodService;
|
||||
import bisq.core.dao.presentation.DaoUtil;
|
||||
import bisq.core.dao.state.DaoStateListener;
|
||||
import bisq.core.dao.state.model.blockchain.Block;
|
||||
import bisq.core.dao.state.model.governance.DaoPhase;
|
||||
@ -36,11 +36,6 @@ import javax.inject.Inject;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import static bisq.desktop.util.FormBuilder.addTitledGroupBg;
|
||||
import static bisq.desktop.util.FormBuilder.addTopLabelReadOnlyTextField;
|
||||
|
||||
@ -77,11 +72,11 @@ public class GovernanceDashboardView extends ActivatableView<GridPane, Void> imp
|
||||
addTitledGroupBg(root, ++gridRow, 6, Res.get("dao.cycle.overview.headline"), Layout.GROUP_DISTANCE);
|
||||
currentBlockHeightTextField = addTopLabelReadOnlyTextField(root, gridRow, Res.get("dao.cycle.currentBlockHeight"),
|
||||
Layout.FIRST_ROW_AND_GROUP_DISTANCE).second;
|
||||
currentPhaseTextField = FormBuilder.addTopLabelReadOnlyTextField(root, ++gridRow, Res.get("dao.cycle.currentPhase")).second;
|
||||
proposalTextField = FormBuilder.addTopLabelReadOnlyTextField(root, ++gridRow, Res.get("dao.cycle.proposal")).second;
|
||||
blindVoteTextField = FormBuilder.addTopLabelReadOnlyTextField(root, ++gridRow, Res.get("dao.cycle.blindVote")).second;
|
||||
voteRevealTextField = FormBuilder.addTopLabelReadOnlyTextField(root, ++gridRow, Res.get("dao.cycle.voteReveal")).second;
|
||||
voteResultTextField = FormBuilder.addTopLabelReadOnlyTextField(root, ++gridRow, Res.get("dao.cycle.voteResult")).second;
|
||||
currentPhaseTextField = addTopLabelReadOnlyTextField(root, ++gridRow, Res.get("dao.cycle.currentPhase")).second;
|
||||
proposalTextField = addTopLabelReadOnlyTextField(root, ++gridRow, Res.get("dao.cycle.proposal")).second;
|
||||
blindVoteTextField = addTopLabelReadOnlyTextField(root, ++gridRow, Res.get("dao.cycle.blindVote")).second;
|
||||
voteRevealTextField = addTopLabelReadOnlyTextField(root, ++gridRow, Res.get("dao.cycle.voteReveal")).second;
|
||||
voteResultTextField = addTopLabelReadOnlyTextField(root, ++gridRow, Res.get("dao.cycle.voteResult")).second;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -128,22 +123,9 @@ public class GovernanceDashboardView extends ActivatableView<GridPane, Void> imp
|
||||
phase = periodService.getPhaseForHeight(height + 1);
|
||||
}
|
||||
currentPhaseTextField.setText(Res.get("dao.phase." + phase.name()));
|
||||
proposalTextField.setText(getPhaseDuration(height, DaoPhase.Phase.PROPOSAL));
|
||||
blindVoteTextField.setText(getPhaseDuration(height, DaoPhase.Phase.BLIND_VOTE));
|
||||
voteRevealTextField.setText(getPhaseDuration(height, DaoPhase.Phase.VOTE_REVEAL));
|
||||
voteResultTextField.setText(getPhaseDuration(height, DaoPhase.Phase.RESULT));
|
||||
}
|
||||
|
||||
private String getPhaseDuration(int height, DaoPhase.Phase phase) {
|
||||
long start = daoFacade.getFirstBlockOfPhaseForDisplay(height, phase);
|
||||
long end = daoFacade.getLastBlockOfPhaseForDisplay(height, phase);
|
||||
long duration = daoFacade.getDurationForPhaseForDisplay(phase);
|
||||
long now = new Date().getTime();
|
||||
SimpleDateFormat dateFormatter = new SimpleDateFormat("dd MMM", Locale.getDefault());
|
||||
SimpleDateFormat timeFormatter = new SimpleDateFormat("HH:mm", Locale.getDefault());
|
||||
String startDateTime = formatter.formatDateTime(new Date(now + (start - height) * 10 * 60 * 1000L), dateFormatter, timeFormatter);
|
||||
String endDateTime = formatter.formatDateTime(new Date(now + (end - height) * 10 * 60 * 1000L), dateFormatter, timeFormatter);
|
||||
String durationTime = formatter.formatDurationAsWords(duration * 10 * 60 * 1000, false, false);
|
||||
return Res.get("dao.cycle.phaseDuration", duration, durationTime, start, end, startDateTime, endDateTime);
|
||||
proposalTextField.setText(DaoUtil.getPhaseDuration(height, DaoPhase.Phase.PROPOSAL, daoFacade, formatter));
|
||||
blindVoteTextField.setText(DaoUtil.getPhaseDuration(height, DaoPhase.Phase.BLIND_VOTE, daoFacade, formatter));
|
||||
voteRevealTextField.setText(DaoUtil.getPhaseDuration(height, DaoPhase.Phase.VOTE_REVEAL, daoFacade, formatter));
|
||||
voteResultTextField.setText(DaoUtil.getPhaseDuration(height, DaoPhase.Phase.RESULT, daoFacade, formatter));
|
||||
}
|
||||
}
|
||||
|
@ -21,10 +21,10 @@ import bisq.desktop.Navigation;
|
||||
import bisq.desktop.common.view.ActivatableView;
|
||||
import bisq.desktop.common.view.FxmlView;
|
||||
import bisq.desktop.components.InputTextField;
|
||||
import bisq.desktop.components.TitledGroupBg;
|
||||
import bisq.desktop.main.dao.governance.PhasesView;
|
||||
import bisq.desktop.main.dao.governance.ProposalDisplay;
|
||||
import bisq.desktop.main.overlays.popups.Popup;
|
||||
import bisq.desktop.util.FormBuilder;
|
||||
import bisq.desktop.util.GUIUtil;
|
||||
import bisq.desktop.util.Layout;
|
||||
|
||||
@ -38,6 +38,7 @@ import bisq.core.dao.governance.proposal.ProposalType;
|
||||
import bisq.core.dao.governance.proposal.ProposalWithTransaction;
|
||||
import bisq.core.dao.governance.proposal.TxException;
|
||||
import bisq.core.dao.governance.proposal.param.ChangeParamValidator;
|
||||
import bisq.core.dao.presentation.DaoUtil;
|
||||
import bisq.core.dao.state.DaoStateListener;
|
||||
import bisq.core.dao.state.model.blockchain.Block;
|
||||
import bisq.core.dao.state.model.governance.DaoPhase;
|
||||
@ -52,6 +53,7 @@ import bisq.asset.Asset;
|
||||
import bisq.network.p2p.P2PService;
|
||||
|
||||
import bisq.common.app.DevEnv;
|
||||
import bisq.common.util.Tuple3;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
import org.bitcoinj.core.InsufficientMoneyException;
|
||||
@ -61,8 +63,15 @@ import javax.inject.Inject;
|
||||
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.ComboBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.VBox;
|
||||
|
||||
import javafx.beans.property.BooleanProperty;
|
||||
import javafx.beans.property.SimpleBooleanProperty;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.beans.property.StringProperty;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
@ -77,7 +86,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import static bisq.desktop.util.FormBuilder.addButtonAfterGroup;
|
||||
import static bisq.desktop.util.FormBuilder.addComboBox;
|
||||
import static bisq.desktop.util.FormBuilder.addTitledGroupBg;
|
||||
import static bisq.desktop.util.FormBuilder.addTopLabelReadOnlyTextField;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
@FxmlView
|
||||
@ -96,6 +107,13 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
||||
private Button makeProposalButton;
|
||||
private ComboBox<ProposalType> proposalTypeComboBox;
|
||||
private ChangeListener<ProposalType> proposalTypeChangeListener;
|
||||
private TextField nextProposalTextField;
|
||||
private TitledGroupBg proposalTitledGroup;
|
||||
private VBox nextProposalBox;
|
||||
|
||||
private BooleanProperty isProposalPhase = new SimpleBooleanProperty(false);
|
||||
private StringProperty proposalGroupTitle = new SimpleStringProperty(Res.get("dao.proposal.create.phase.inactive"));
|
||||
|
||||
@Nullable
|
||||
private ProposalType selectedProposalType;
|
||||
private int gridRow;
|
||||
@ -129,8 +147,13 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
||||
public void initialize() {
|
||||
gridRow = phasesView.addGroup(root, gridRow);
|
||||
|
||||
addTitledGroupBg(root, ++gridRow, 1, Res.get("dao.proposal.create.selectProposalType"), Layout.GROUP_DISTANCE);
|
||||
proposalTypeComboBox = FormBuilder.addComboBox(root, gridRow,
|
||||
proposalTitledGroup = addTitledGroupBg(root, ++gridRow, 2, proposalGroupTitle.get(), Layout.GROUP_DISTANCE);
|
||||
final Tuple3<Label, TextField, VBox> nextProposalPhaseTuple = addTopLabelReadOnlyTextField(root, gridRow,
|
||||
Res.get("dao.cycle.proposal.next"),
|
||||
Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
nextProposalBox = nextProposalPhaseTuple.third;
|
||||
nextProposalTextField = nextProposalPhaseTuple.second;
|
||||
proposalTypeComboBox = addComboBox(root, gridRow,
|
||||
Res.get("dao.proposal.create.proposalType"), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
proposalTypeComboBox.setMaxWidth(300);
|
||||
proposalTypeComboBox.setConverter(new StringConverter<>() {
|
||||
@ -157,6 +180,8 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
||||
|
||||
@Override
|
||||
protected void activate() {
|
||||
addBindings();
|
||||
|
||||
phasesView.activate();
|
||||
|
||||
daoFacade.addBsqStateListener(this);
|
||||
@ -170,6 +195,8 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
||||
|
||||
@Override
|
||||
protected void deactivate() {
|
||||
removeBindings();
|
||||
|
||||
phasesView.deactivate();
|
||||
|
||||
daoFacade.removeBsqStateListener(this);
|
||||
@ -179,6 +206,25 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
||||
makeProposalButton.setOnAction(null);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Bindings, Listeners
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void addBindings() {
|
||||
proposalTypeComboBox.managedProperty().bind(isProposalPhase);
|
||||
proposalTypeComboBox.visibleProperty().bind(isProposalPhase);
|
||||
nextProposalBox.managedProperty().bind(isProposalPhase.not());
|
||||
nextProposalBox.visibleProperty().bind(isProposalPhase.not());
|
||||
proposalTitledGroup.textProperty().bind(proposalGroupTitle);
|
||||
}
|
||||
|
||||
private void removeBindings() {
|
||||
proposalTypeComboBox.managedProperty().unbind();
|
||||
proposalTypeComboBox.visibleProperty().unbind();
|
||||
nextProposalBox.managedProperty().unbind();
|
||||
nextProposalBox.visibleProperty().unbind();
|
||||
proposalTitledGroup.textProperty().unbind();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// DaoStateListener
|
||||
@ -186,17 +232,27 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
||||
|
||||
@Override
|
||||
public void onParseTxsCompleteAfterBatchProcessing(Block block) {
|
||||
boolean isProposalPhase = daoFacade.isInPhaseButNotLastBlock(DaoPhase.Phase.PROPOSAL);
|
||||
proposalTypeComboBox.setDisable(!isProposalPhase);
|
||||
if (!isProposalPhase)
|
||||
isProposalPhase.set(daoFacade.isInPhaseButNotLastBlock(DaoPhase.Phase.PROPOSAL));
|
||||
if (isProposalPhase.get()) {
|
||||
proposalGroupTitle.set(Res.get("dao.proposal.create.selectProposalType"));
|
||||
} else {
|
||||
proposalGroupTitle.set(Res.get("dao.proposal.create.phase.inactive"));
|
||||
proposalTypeComboBox.getSelectionModel().clearSelection();
|
||||
updateTimeUntilNextProposalPhase(block.getHeight());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Private
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void updateTimeUntilNextProposalPhase(int height) {
|
||||
nextProposalTextField.setText(DaoUtil.getNextPhaseDuration(height, DaoPhase.Phase.PROPOSAL, daoFacade, btcFormatter));
|
||||
}
|
||||
|
||||
private void publishMyProposal(ProposalType type) {
|
||||
try {
|
||||
ProposalWithTransaction proposalWithTransaction = getProposalWithTransaction(type);
|
||||
@ -375,9 +431,8 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
||||
}
|
||||
});
|
||||
proposalDisplay.getComboBoxes().stream()
|
||||
.filter(Objects::nonNull).forEach(comboBox -> {
|
||||
inputsValid.set(inputsValid.get() && comboBox.getSelectionModel().getSelectedItem() != null);
|
||||
});
|
||||
.filter(Objects::nonNull).forEach(comboBox -> inputsValid.set(inputsValid.get() &&
|
||||
comboBox.getSelectionModel().getSelectedItem() != null));
|
||||
|
||||
InputTextField linkInputTextField = proposalDisplay.linkInputTextField;
|
||||
inputsValid.set(inputsValid.get() &&
|
||||
|
@ -223,21 +223,8 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
||||
public void activate() {
|
||||
if (DevEnv.isDevMode()) {
|
||||
UserThread.runAfter(() -> {
|
||||
switch (BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode()) {
|
||||
case "BTC":
|
||||
amount.set("1");
|
||||
price.set("0.0002");
|
||||
break;
|
||||
case "LTC":
|
||||
amount.set("50");
|
||||
price.set("40");
|
||||
break;
|
||||
case "DASH":
|
||||
amount.set("0.1");
|
||||
price.set("40");
|
||||
break;
|
||||
}
|
||||
|
||||
minAmount.set(amount.get());
|
||||
onFocusOutPriceAsPercentageTextField(true, false);
|
||||
applyMakerFee();
|
||||
|
@ -149,10 +149,6 @@ public abstract class TradeStepView extends AnchorPane {
|
||||
public void onMinuteTick() {
|
||||
updateTimeLeft();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMissedSecondTick(long missed) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -81,10 +81,6 @@ public class P2pNetworkListItem {
|
||||
@Override
|
||||
public void onMinuteTick() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMissedSecondTick(long missed) {
|
||||
}
|
||||
};
|
||||
clock.addListener(listener);
|
||||
onLastActivityChanged(statistic.getLastActivityTimestamp());
|
||||
|
@ -37,7 +37,6 @@ dependencyVerification {
|
||||
'com.googlecode.json-simple:json-simple:4e69696892b88b41c55d49ab2fdcc21eead92bf54acc588c0050596c3b75199c',
|
||||
'org.springframework:spring-core:c451e8417adb2ffb2445636da5e44a2f59307c4100037a1fe387c3fba4f29b52',
|
||||
'ch.qos.logback:logback-classic:e66efc674e94837344bc5b748ff510c37a44eeff86cbfdbf9e714ef2eb374013',
|
||||
'network.bisq.libdohj:libdohj-core:b89d2a6ad6a5aff1fccf2d4e5f7cc8c31991746e61913bcec3e999c2b0d7c954',
|
||||
'com.github.bisq-network.bitcoinj:bitcoinj-core:d148d9577cf96540f7f5367011f7626ff9c9f148f0bf903b541740d480652969',
|
||||
'org.slf4j:slf4j-api:3a4cd4969015f3beb4b5b4d81dbafc01765fb60b8a439955ca64d8476fef553e',
|
||||
'ch.qos.logback:logback-core:4cd46fa17d77057b39160058df2f21ebbc2aded51d0edcc25d2c1cecc042a005',
|
||||
|
@ -149,22 +149,6 @@ public class Socks5SeedOnionDiscovery implements PeerDiscovery {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* returns .onion nodes available on mainnet
|
||||
*/
|
||||
private String[] LitecoinMainNetSeeds() {
|
||||
return new String[]{
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* returns .onion nodes available on testnet3
|
||||
*/
|
||||
private String[] LitecoinTestNet4Seeds() {
|
||||
return new String[]{
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array containing all the Bitcoin nodes within the list.
|
||||
*/
|
||||
|
@ -151,12 +151,10 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMissedSecondTick(long missed) {
|
||||
if (missed > Clock.IDLE_TOLERANCE) {
|
||||
log.info("We have been in standby mode for {} sec", missed / 1000);
|
||||
public void onAwakeFromStandby(long missedMs) {
|
||||
// TODO is "stopped = false;" correct?
|
||||
stopped = false;
|
||||
listeners.stream().forEach(Listener::onAwakeFromStandby);
|
||||
}
|
||||
listeners.forEach(Listener::onAwakeFromStandby);
|
||||
}
|
||||
};
|
||||
clock.addListener(listener);
|
||||
|
@ -5,7 +5,7 @@
|
||||
The Bisq pricenode is a simple HTTP service that fetches, transforms and relays data from third-party price providers to Bisq exchange clients on request. Available prices include:
|
||||
|
||||
- Bitcoin exchange rates, available at `/getAllMarketPrices`, and
|
||||
- Bitcoin, Litecoin, Dash, and Dogecoin mining fee rates, available at `/getFees`
|
||||
- Bitcoin mining fee rates, available at `/getFees`
|
||||
|
||||
Pricenodes are deployed in production as Tor hidden services. This is not because the location of these nodes needs to be kept secret, but rather so that Bisq exchange clients do not need to exit the Tor network in order to get price data.
|
||||
|
||||
|
@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.mining.providers;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
class DashFeeRateProvider extends FixedFeeRateProvider {
|
||||
|
||||
public DashFeeRateProvider() {
|
||||
super("DASH", 50);
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.mining.providers;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
class DogecoinFeeRateProvider extends FixedFeeRateProvider {
|
||||
|
||||
public DogecoinFeeRateProvider() {
|
||||
super("DOGE", 5_000_000);
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.mining.providers;
|
||||
|
||||
import bisq.price.mining.FeeRate;
|
||||
import bisq.price.mining.FeeRateProvider;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
|
||||
abstract class FixedFeeRateProvider extends FeeRateProvider {
|
||||
|
||||
private final String currency;
|
||||
private final long price;
|
||||
|
||||
public FixedFeeRateProvider(String currency, long price) {
|
||||
super(Duration.ofDays(1));
|
||||
this.currency = currency;
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
protected final FeeRate doGet() {
|
||||
return new FeeRate(currency, price, Instant.now().getEpochSecond());
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.price.mining.providers;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
class LitecoinFeeRateProvider extends FixedFeeRateProvider {
|
||||
|
||||
public LitecoinFeeRateProvider() {
|
||||
super("LTC", 500);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user