mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-30 18:28:52 -04:00
update to bitcoinJ master
This commit is contained in:
parent
2190772370
commit
0f04d3c483
56 changed files with 671 additions and 824 deletions
|
@ -1,11 +1,10 @@
|
|||
package io.bitsquare.trade;
|
||||
|
||||
import com.google.bitcoin.core.Coin;
|
||||
import io.bitsquare.bank.BankAccountType;
|
||||
import io.bitsquare.btc.BtcFormatter;
|
||||
import io.bitsquare.locale.Country;
|
||||
import io.bitsquare.user.Arbitrator;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.security.PublicKey;
|
||||
import java.util.*;
|
||||
|
||||
|
@ -22,13 +21,13 @@ public class Offer implements Serializable
|
|||
private final Date creationDate;
|
||||
|
||||
private final double price;
|
||||
private final BigInteger amount;
|
||||
private final BigInteger minAmount;
|
||||
private final Coin amount;
|
||||
private final Coin minAmount;
|
||||
private final PublicKey messagePublicKey;
|
||||
private final BankAccountType bankAccountType;
|
||||
private final Country bankAccountCountry;
|
||||
|
||||
private final int collateral;
|
||||
private final double collateral;
|
||||
private final List<Country> acceptedCountries;
|
||||
private final List<Locale> acceptedLanguageLocales;
|
||||
private final String bankAccountUID;
|
||||
|
@ -43,14 +42,14 @@ public class Offer implements Serializable
|
|||
public Offer(PublicKey messagePublicKey,
|
||||
Direction direction,
|
||||
double price,
|
||||
BigInteger amount,
|
||||
BigInteger minAmount,
|
||||
Coin amount,
|
||||
Coin minAmount,
|
||||
BankAccountType bankAccountType,
|
||||
Currency currency,
|
||||
Country bankAccountCountry,
|
||||
String bankAccountUID,
|
||||
Arbitrator arbitrator,
|
||||
int collateral,
|
||||
double collateral,
|
||||
List<Country> acceptedCountries,
|
||||
List<Locale> acceptedLanguageLocales)
|
||||
{
|
||||
|
@ -98,12 +97,12 @@ public class Offer implements Serializable
|
|||
return price;
|
||||
}
|
||||
|
||||
public BigInteger getAmount()
|
||||
public Coin getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
|
||||
public BigInteger getMinAmount()
|
||||
public Coin getMinAmount()
|
||||
{
|
||||
return minAmount;
|
||||
}
|
||||
|
@ -140,12 +139,12 @@ public class Offer implements Serializable
|
|||
|
||||
public double getVolume()
|
||||
{
|
||||
return price * BtcFormatter.satoshiToBTC(amount);
|
||||
return price * amount.value;
|
||||
}
|
||||
|
||||
public double getMinVolume()
|
||||
{
|
||||
return price * BtcFormatter.satoshiToBTC(minAmount);
|
||||
return price * minAmount.value;
|
||||
}
|
||||
|
||||
public String getOfferFeePaymentTxID()
|
||||
|
@ -163,7 +162,7 @@ public class Offer implements Serializable
|
|||
return arbitrator;
|
||||
}
|
||||
|
||||
public int getCollateral()
|
||||
public double getCollateral()
|
||||
{
|
||||
return collateral;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue