Add getAmountAsLong to TradeModel

This commit is contained in:
chimp1984 2021-11-03 13:42:06 +01:00
parent 863a52077d
commit 12aadf9ab8
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3
3 changed files with 14 additions and 2 deletions

View file

@ -65,6 +65,8 @@ public abstract class TradeModel implements Tradable, Model {
public abstract TradePhase getTradePhase();
public abstract long getAmountAsLong();
///////////////////////////////////////////////////////////////////////////////////////////
// Tradable implementation

View file

@ -306,7 +306,6 @@ public abstract class Trade extends TradeModel {
@Getter
@Setter
private String payoutTxId;
@Getter
@Setter
private long amountAsLong;
@Setter
@ -729,6 +728,12 @@ public abstract class Trade extends TradeModel {
return isWithdrawn();
}
@Override
public long getAmountAsLong() {
return amountAsLong;
}
///////////////////////////////////////////////////////////////////////////////////////////
// Abstract
///////////////////////////////////////////////////////////////////////////////////////////

View file

@ -70,7 +70,7 @@ public abstract class BsqSwapTrade extends TradeModel {
}
}
@Getter
private final long amountAsLong;
@Getter
private final long txFeePerVbyte;
@ -180,6 +180,11 @@ public abstract class BsqSwapTrade extends TradeModel {
return state.getTradePhase();
}
@Override
public long getAmountAsLong() {
return amountAsLong;
}
///////////////////////////////////////////////////////////////////////////////////////////
// Setters