Add buyer/seller dep & status-desc fields to TradeInfoV1Builder

This commit is contained in:
ghubstan 2022-01-16 16:42:34 -03:00
parent a53fee345f
commit 5c217793c8
No known key found for this signature in database
GPG key ID: E35592D6800A861E

View file

@ -46,6 +46,8 @@ public final class TradeInfoV1Builder {
private long tradeAmountAsLong;
private long tradePrice;
private long tradeVolume;
private long buyerDeposit;
private long sellerDeposit;
private String tradingPeerNodeAddress;
private String state;
private String phase;
@ -58,6 +60,7 @@ public final class TradeInfoV1Builder {
private boolean isWithdrawn;
private String contractAsJson;
private ContractInfo contract;
private String statusDescription;
public TradeInfoV1Builder withOffer(OfferInfo offer) {
this.offer = offer;
@ -129,6 +132,16 @@ public final class TradeInfoV1Builder {
return this;
}
public TradeInfoV1Builder withBuyerDeposit(long buyerDeposit) {
this.buyerDeposit = buyerDeposit;
return this;
}
public TradeInfoV1Builder withSellerDeposit(long sellerDeposit) {
this.sellerDeposit = sellerDeposit;
return this;
}
public TradeInfoV1Builder withTradePeriodState(String tradePeriodState) {
this.tradePeriodState = tradePeriodState;
return this;
@ -189,6 +202,12 @@ public final class TradeInfoV1Builder {
return this;
}
public TradeInfoV1Builder withStatusDescription(String statusDescription) {
this.statusDescription = statusDescription;
return this;
}
public TradeInfo build() {
return new TradeInfo(this);
}