mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-30 18:28:52 -04:00
offer creation screen, model updates, confirm comp.
This commit is contained in:
parent
a3bee7652b
commit
3f398755ad
53 changed files with 1261 additions and 1297 deletions
|
@ -1,8 +1,10 @@
|
|||
package io.bitsquare.trade;
|
||||
|
||||
import io.bitsquare.user.User;
|
||||
import io.bitsquare.bank.BankAccountType;
|
||||
|
||||
import java.util.Currency;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
public class Offer
|
||||
|
@ -11,28 +13,110 @@ public class Offer
|
|||
private double price;
|
||||
private double amount;
|
||||
private double minAmount;
|
||||
private Direction direction;
|
||||
private Currency currency;
|
||||
private User offerer;
|
||||
private OfferConstraints offerConstraints;
|
||||
|
||||
public Offer(UUID uid,
|
||||
|
||||
private String accountID;
|
||||
private String messageID;
|
||||
private Direction direction;
|
||||
private BankAccountType.BankAccountTypeEnum bankAccountTypeEnum;
|
||||
private Currency currency;
|
||||
private Locale bankAccountCountryLocale;
|
||||
private List<Locale> acceptedCountryLocales;
|
||||
private List<Locale> acceptedLanguageLocales;
|
||||
private String offerPaymentTxID;
|
||||
|
||||
public Offer(String accountID,
|
||||
String messageID,
|
||||
Direction direction,
|
||||
double price,
|
||||
double amount,
|
||||
double minAmount,
|
||||
BankAccountType.BankAccountTypeEnum bankAccountTypeEnum,
|
||||
Currency currency,
|
||||
User offerer,
|
||||
OfferConstraints offerConstraints)
|
||||
Locale bankAccountCountryLocale,
|
||||
List<Locale> acceptedCountryLocales,
|
||||
List<Locale> acceptedLanguageLocales)
|
||||
{
|
||||
this.uid = uid;
|
||||
this.accountID = accountID;
|
||||
this.messageID = messageID;
|
||||
this.direction = direction;
|
||||
this.price = price;
|
||||
this.amount = amount;
|
||||
this.minAmount = minAmount;
|
||||
this.bankAccountTypeEnum = bankAccountTypeEnum;
|
||||
this.currency = currency;
|
||||
this.offerer = offerer;
|
||||
this.offerConstraints = offerConstraints;
|
||||
this.bankAccountCountryLocale = bankAccountCountryLocale;
|
||||
this.acceptedCountryLocales = acceptedCountryLocales;
|
||||
this.acceptedLanguageLocales = acceptedLanguageLocales;
|
||||
|
||||
uid = UUID.randomUUID();
|
||||
}
|
||||
|
||||
// setter
|
||||
public void setOfferPaymentTxID(String offerPaymentTxID)
|
||||
{
|
||||
this.offerPaymentTxID = offerPaymentTxID;
|
||||
}
|
||||
|
||||
// getters
|
||||
public String getAccountID()
|
||||
{
|
||||
return accountID;
|
||||
}
|
||||
|
||||
public String getMessageID()
|
||||
{
|
||||
return messageID;
|
||||
}
|
||||
|
||||
public UUID getUid()
|
||||
{
|
||||
return uid;
|
||||
}
|
||||
|
||||
public double getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public double getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
|
||||
public double getMinAmount()
|
||||
{
|
||||
return minAmount;
|
||||
}
|
||||
|
||||
public Direction getDirection()
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
|
||||
public BankAccountType.BankAccountTypeEnum getBankAccountTypeEnum()
|
||||
{
|
||||
return bankAccountTypeEnum;
|
||||
}
|
||||
|
||||
public Currency getCurrency()
|
||||
{
|
||||
return currency;
|
||||
}
|
||||
|
||||
public Locale getBankAccountCountryLocale()
|
||||
{
|
||||
return bankAccountCountryLocale;
|
||||
}
|
||||
|
||||
public List<Locale> getAcceptedCountryLocales()
|
||||
{
|
||||
return acceptedCountryLocales;
|
||||
}
|
||||
|
||||
public List<Locale> getAcceptedLanguageLocales()
|
||||
{
|
||||
return acceptedLanguageLocales;
|
||||
}
|
||||
|
||||
public double getVolume()
|
||||
|
@ -45,85 +129,9 @@ public class Offer
|
|||
return price * minAmount;
|
||||
}
|
||||
|
||||
public UUID getUid()
|
||||
public String getOfferPaymentTxID()
|
||||
{
|
||||
return uid;
|
||||
return offerPaymentTxID;
|
||||
}
|
||||
|
||||
public void setUid(UUID uid)
|
||||
{
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public Direction getDirection()
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(Direction direction)
|
||||
{
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public double getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(double price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public double getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(double amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public double getMinAmount()
|
||||
{
|
||||
return minAmount;
|
||||
}
|
||||
|
||||
public void setMinAmount(double minAmount)
|
||||
{
|
||||
this.minAmount = minAmount;
|
||||
}
|
||||
|
||||
public Currency getCurrency()
|
||||
{
|
||||
return currency;
|
||||
}
|
||||
|
||||
public void setCurrency(Currency currency)
|
||||
{
|
||||
this.currency = currency;
|
||||
}
|
||||
|
||||
|
||||
public OfferConstraints getOfferConstraints()
|
||||
{
|
||||
return offerConstraints;
|
||||
}
|
||||
|
||||
public void setOfferConstraints(OfferConstraints offerConstraints)
|
||||
{
|
||||
this.offerConstraints = offerConstraints;
|
||||
}
|
||||
|
||||
|
||||
public User getOfferer()
|
||||
{
|
||||
return offerer;
|
||||
}
|
||||
|
||||
public void setOfferer(User offerer)
|
||||
{
|
||||
this.offerer = offerer;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue