mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-05-13 03:52:16 -04:00
added comments
This commit is contained in:
parent
1955250ae8
commit
77431b3d94
5 changed files with 10 additions and 10 deletions
|
@ -47,9 +47,8 @@ public class FeePolicy {
|
||||||
this.params = params;
|
this.params = params;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO other users or dev address? use donation option list?
|
//TODO who is receiver? other users or dev address? use donation option list?
|
||||||
// (dev, other users, wikileaks, tor, sub projects (bitcoinj, tomp2p,...)...)
|
// (dev, other users, wikileaks, tor, sub projects (bitcoinj, tomp2p,...)...)
|
||||||
|
|
||||||
public Address getAddressForRegistrationFee() {
|
public Address getAddressForRegistrationFee() {
|
||||||
try {
|
try {
|
||||||
return new Address(params, registrationFeeAddress);
|
return new Address(params, registrationFeeAddress);
|
||||||
|
@ -60,7 +59,6 @@ public class FeePolicy {
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO get address form arbitrator list
|
//TODO get address form arbitrator list
|
||||||
|
|
||||||
public Address getAddressForCreateOfferFee() {
|
public Address getAddressForCreateOfferFee() {
|
||||||
try {
|
try {
|
||||||
return new Address(params, createOfferFeeAddress);
|
return new Address(params, createOfferFeeAddress);
|
||||||
|
@ -71,7 +69,6 @@ public class FeePolicy {
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO get address form the intersection of both traders arbitrator lists
|
//TODO get address form the intersection of both traders arbitrator lists
|
||||||
|
|
||||||
public Address getAddressForTakeOfferFee() {
|
public Address getAddressForTakeOfferFee() {
|
||||||
try {
|
try {
|
||||||
return new Address(params, takeOfferFeeAddress);
|
return new Address(params, takeOfferFeeAddress);
|
||||||
|
|
|
@ -19,8 +19,9 @@ package io.bitsquare.btc;
|
||||||
|
|
||||||
import com.google.bitcoin.core.Coin;
|
import com.google.bitcoin.core.Coin;
|
||||||
|
|
||||||
public class Restritions {
|
// Lets see if we get more restriction otherwise move it to other class
|
||||||
public static final Coin MIN_TRADE_AMOUNT = Coin.CENT; // 0.01 Bitcoins
|
public class Restrictions {
|
||||||
|
public static final Coin MIN_TRADE_AMOUNT = Coin.parseCoin("0.0001");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -82,7 +82,8 @@ import static com.google.bitcoin.script.ScriptOpCodes.OP_RETURN;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: use walletextension (with protobuffer) instead of saving addressEntryList via storage
|
* TODO: use walletextension (with protobuffer) instead of saving addressEntryList via storage
|
||||||
* TODO: use HD wallet features instead of addressEntryList
|
* TODO: break that class up. maybe a bitsquarewallet
|
||||||
|
* Wait until steve's akka version to see how to continue here
|
||||||
*/
|
*/
|
||||||
public class WalletFacade {
|
public class WalletFacade {
|
||||||
public static final String MAIN_NET = "MAIN_NET";
|
public static final String MAIN_NET = "MAIN_NET";
|
||||||
|
|
|
@ -40,6 +40,7 @@ import org.spongycastle.util.encoders.Base64;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* That facade delivers crypto functionality from the bitcoinJ library
|
* That facade delivers crypto functionality from the bitcoinJ library
|
||||||
|
* //TODO still very basic as not much used yet, missing implementations
|
||||||
*/
|
*/
|
||||||
public class CryptoFacade {
|
public class CryptoFacade {
|
||||||
private static final Logger log = LoggerFactory.getLogger(CryptoFacade.class);
|
private static final Logger log = LoggerFactory.getLogger(CryptoFacade.class);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.trade.protocol.createoffer.tasks;
|
package io.bitsquare.trade.protocol.createoffer.tasks;
|
||||||
|
|
||||||
import io.bitsquare.btc.FeePolicy;
|
import io.bitsquare.btc.FeePolicy;
|
||||||
import io.bitsquare.btc.Restritions;
|
import io.bitsquare.btc.Restrictions;
|
||||||
import io.bitsquare.trade.Offer;
|
import io.bitsquare.trade.Offer;
|
||||||
import io.bitsquare.trade.handlers.FaultHandler;
|
import io.bitsquare.trade.handlers.FaultHandler;
|
||||||
import io.bitsquare.trade.handlers.ResultHandler;
|
import io.bitsquare.trade.handlers.ResultHandler;
|
||||||
|
@ -55,8 +55,8 @@ public class ValidateOffer {
|
||||||
|
|
||||||
checkArgument(offer.getAcceptedCountries().size() > 0);
|
checkArgument(offer.getAcceptedCountries().size() > 0);
|
||||||
checkArgument(offer.getAcceptedLanguageLocales().size() > 0);
|
checkArgument(offer.getAcceptedLanguageLocales().size() > 0);
|
||||||
checkArgument(offer.getMinAmount().compareTo(Restritions.MIN_TRADE_AMOUNT) >= 0);
|
checkArgument(offer.getMinAmount().compareTo(Restrictions.MIN_TRADE_AMOUNT) >= 0);
|
||||||
checkArgument(offer.getAmount().compareTo(Restritions.MIN_TRADE_AMOUNT) >= 0);
|
checkArgument(offer.getAmount().compareTo(Restrictions.MIN_TRADE_AMOUNT) >= 0);
|
||||||
checkArgument(offer.getAmount().compareTo(offer.getMinAmount()) >= 0);
|
checkArgument(offer.getAmount().compareTo(offer.getMinAmount()) >= 0);
|
||||||
checkArgument(offer.getCollateral() > 0);
|
checkArgument(offer.getCollateral() > 0);
|
||||||
checkArgument(offer.getPrice() > 0);
|
checkArgument(offer.getPrice() > 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue