mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Remove libdohj dependency
This commit is contained in:
parent
68a6de2576
commit
52e36187d1
@ -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')
|
||||
|
@ -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;
|
||||
}
|
||||
MIN_TRADE_AMOUNT = Coin.valueOf(10_000); // 2 USD @ 20000 USD/BTC
|
||||
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;
|
||||
}
|
||||
|
||||
MAX_BUYER_SECURITY_DEPOSIT = Coin.valueOf(5_000_000); // 1000 USD @ 20000 USD/BTC
|
||||
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;
|
||||
}
|
||||
MIN_BUYER_SECURITY_DEPOSIT = Coin.valueOf(50_000); // 10 USD @ 20000 USD/BTC
|
||||
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;
|
||||
}
|
||||
DEFAULT_BUYER_SECURITY_DEPOSIT = Coin.valueOf(1_000_000); // 200 EUR @ 20000 USD/BTC
|
||||
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;
|
||||
}
|
||||
SELLER_SECURITY_DEPOSIT = Coin.valueOf(300_000); // 60 USD @ 20000 USD/BTC
|
||||
return SELLER_SECURITY_DEPOSIT;
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -2204,19 +2204,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=周线
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
amount.set("1");
|
||||
price.set("0.0002");
|
||||
minAmount.set(amount.get());
|
||||
onFocusOutPriceAsPercentageTextField(true, false);
|
||||
applyMakerFee();
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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