mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-12-15 07:52:58 -05: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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue