mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-20 07:46:05 -04:00
Reduce sec. deposit and max trade amount for mainnet
This commit is contained in:
parent
582999844f
commit
ec1fcad52e
@ -50,5 +50,9 @@ public class FeePolicy {
|
||||
|
||||
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;
|
||||
public static final Coin SECURITY_DEPOSIT = Coin.valueOf(10000000); // 0.1 BTC; about 40 EUR @ 400 EUR/BTC
|
||||
|
||||
// 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
|
||||
}
|
||||
|
@ -21,8 +21,20 @@ import org.bitcoinj.core.Coin;
|
||||
import org.bitcoinj.core.Transaction;
|
||||
|
||||
public class Restrictions {
|
||||
public static final Coin MIN_TRADE_AMOUNT = Coin.parseCoin("0.001"); // 40 cent @ 400 EUR/BTC
|
||||
public static final Coin MAX_TRADE_AMOUNT = Coin.parseCoin("1");
|
||||
|
||||
// TODO revert 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
|
||||
|
||||
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
|
||||
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;
|
||||
|
@ -205,6 +205,11 @@ public class WalletService {
|
||||
walletAppKit.connectToLocalHost(); // You should run a regtest mode bitcoind locally.}
|
||||
}
|
||||
} else if (params == MainNetParams.get()) {
|
||||
|
||||
// reduce for mainnet testing
|
||||
// TODO revert later when tested enough
|
||||
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
|
||||
// in the checkpoints file and then download the rest from the network. It makes things much faster.
|
||||
// Checkpoint files are made using the BuildCheckpoints tool and usually we have to download the
|
||||
|
Loading…
x
Reference in New Issue
Block a user