mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
add info regarg. lower tradeamount limit when using mainnet
This commit is contained in:
parent
ec1fcad52e
commit
49b5ac5403
4 changed files with 18 additions and 17 deletions
|
@ -46,13 +46,15 @@ public class FeePolicy {
|
|||
Wallet.SendRequest.DEFAULT_FEE_PER_KB = TX_FEE;
|
||||
}
|
||||
|
||||
public static final Coin DUST = Coin.valueOf(546);
|
||||
|
||||
public static final Coin CREATE_OFFER_FEE = Coin.valueOf(100000); // 0.001 BTC 0.1% of 1 BTC about 0.4 EUR @ 400 EUR/BTC
|
||||
public static final Coin TAKE_OFFER_FEE = CREATE_OFFER_FEE;
|
||||
|
||||
// reduce for mainnet testing
|
||||
// TODO revert later when tested enough
|
||||
public static final Coin SECURITY_DEPOSIT = Coin.valueOf(1000000); // 0.01 BTC; about 4 EUR @ 400 EUR/BTC
|
||||
//public static final Coin SECURITY_DEPOSIT = Coin.valueOf(10000000); // 0.1 BTC; about 40 EUR @ 400 EUR/BTC
|
||||
// TODO make final again later
|
||||
public static Coin SECURITY_DEPOSIT = Coin.valueOf(10000000); // 0.1 BTC; about 4 EUR @ 400 EUR/BTC
|
||||
|
||||
// Called from WalletService to reduce SECURITY_DEPOSIT for mainnet to 0.01 btc
|
||||
// TODO remove later when tested enough
|
||||
public static void setSecurityDeposit(Coin securityDeposit) {
|
||||
SECURITY_DEPOSIT = securityDeposit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,20 +22,18 @@ import org.bitcoinj.core.Transaction;
|
|||
|
||||
public class Restrictions {
|
||||
|
||||
// TODO revert later
|
||||
// TODO make final again later
|
||||
public static final Coin MIN_TRADE_AMOUNT = Coin.parseCoin("0.0001"); // 4 cent @ 400 EUR/BTC
|
||||
//public static final Coin MIN_TRADE_AMOUNT = Coin.parseCoin("0.001"); // 40 cent @ 400 EUR/BTC
|
||||
|
||||
// TODO make final again later
|
||||
public static Coin MAX_TRADE_AMOUNT = Coin.parseCoin("1");
|
||||
|
||||
// WalletService reduce MAX_TRADE_AMOUNT for mainnet to 0.01 btc
|
||||
// TODO revert later when tested enough
|
||||
// Called from WalletService to reduce MAX_TRADE_AMOUNT for mainnet to 0.01 btc
|
||||
// TODO remove later when tested enough
|
||||
public static void setMaxTradeAmount(Coin maxTradeAmount) {
|
||||
MAX_TRADE_AMOUNT = maxTradeAmount;
|
||||
}
|
||||
|
||||
//public static final Coin MAX_TRADE_AMOUNT = Coin.parseCoin("1");
|
||||
|
||||
public static boolean isMinSpendableAmount(Coin amount) {
|
||||
return amount != null && amount.compareTo(FeePolicy.TX_FEE.add(Transaction.MIN_NONDUST_OUTPUT)) > 0;
|
||||
}
|
||||
|
|
|
@ -208,6 +208,7 @@ public class WalletService {
|
|||
|
||||
// reduce for mainnet testing
|
||||
// TODO revert later when tested enough
|
||||
FeePolicy.setSecurityDeposit(Coin.parseCoin("0.01")); // 4 EUR @ 400 EUR/BTC
|
||||
Restrictions.setMaxTradeAmount(Coin.parseCoin("0.01")); // 4 EUR @ 400 EUR/BTC
|
||||
|
||||
// Checkpoints are block headers that ship inside our app: for a new user, we pick the last header
|
||||
|
|
|
@ -195,11 +195,11 @@ public class NetworkSettingsView extends ActivatableViewAndModel<GridPane, Activ
|
|||
private void onSelectNetwork() {
|
||||
if (netWorkComboBox.getSelectionModel().getSelectedItem() != preferences.getBitcoinNetwork()) {
|
||||
if (netWorkComboBox.getSelectionModel().getSelectedItem() == BitcoinNetwork.MAINNET) {
|
||||
new Popup().warning("The application is not sufficiently tested yet and it so it is not recommended " +
|
||||
"to use mainnet yet.\n" +
|
||||
"If you want to take the risk to use Mainnet please use low trading amounts like 0.1 BTC " +
|
||||
"to limit possible losses.")
|
||||
.actionButtonText("I will wait and stick with Testnet")
|
||||
new Popup().warning("The application is not sufficiently tested yet. " +
|
||||
"Please be aware that using Mainnet comes with the risk to lose funds in case of software bugs.\n" +
|
||||
"To limit the possible losses the maximum allowed trading amount and the security deposit are " +
|
||||
"reduced to 0.01 BTC on Mainnet.")
|
||||
.actionButtonText("I will stick with Testnet for now")
|
||||
.onAction(() -> UserThread.execute(() -> netWorkComboBox.getSelectionModel().select(preferences.getBitcoinNetwork())))
|
||||
.closeButtonText("I understand the risk and want to use Mainnet")
|
||||
.onClose(() -> selectNetwork())
|
||||
|
|
Loading…
Add table
Reference in a new issue