mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Rename getAmount to getAmountAsLong in Trade
This commit is contained in:
parent
05de48b9e0
commit
863a52077d
@ -78,7 +78,7 @@ public class BsqSwapCalculation {
|
||||
}
|
||||
|
||||
public static Coin getBuyersBtcPayoutValue(BsqSwapTrade trade, int buyersVBytesSize, long buyerTradeFee) {
|
||||
return getBuyersBtcPayoutValue(trade.getAmount(), trade.getTxFeePerVbyte(), buyersVBytesSize, buyerTradeFee);
|
||||
return getBuyersBtcPayoutValue(trade.getAmountAsLong(), trade.getTxFeePerVbyte(), buyersVBytesSize, buyerTradeFee);
|
||||
}
|
||||
|
||||
public static Coin getBuyersBtcPayoutValue(long btcTradeAmount,
|
||||
@ -123,7 +123,7 @@ public class BsqSwapCalculation {
|
||||
|
||||
// Seller
|
||||
public static Coin getSellersBtcInputValue(BsqSwapTrade trade, int sellersTxSize, long sellersTradeFee) {
|
||||
return getSellersBtcInputValue(trade.getAmount(), trade.getTxFeePerVbyte(), sellersTxSize, sellersTradeFee);
|
||||
return getSellersBtcInputValue(trade.getAmountAsLong(), trade.getTxFeePerVbyte(), sellersTxSize, sellersTradeFee);
|
||||
}
|
||||
|
||||
public static Coin getSellersBtcInputValue(long btcTradeAmount,
|
||||
|
@ -71,7 +71,7 @@ public abstract class BsqSwapTrade extends TradeModel {
|
||||
}
|
||||
|
||||
@Getter
|
||||
private final long amount;
|
||||
private final long amountAsLong;
|
||||
@Getter
|
||||
private final long txFeePerVbyte;
|
||||
@Getter
|
||||
@ -112,7 +112,7 @@ public abstract class BsqSwapTrade extends TradeModel {
|
||||
State state,
|
||||
@Nullable String txId) {
|
||||
super(uid, offer, takeOfferDate, tradingPeerNodeAddress, errorMessage);
|
||||
this.amount = amount.value;
|
||||
this.amountAsLong = amount.value;
|
||||
this.txFeePerVbyte = txFeePerVbyte;
|
||||
this.makerFee = makerFee;
|
||||
this.takerFee = takerFee;
|
||||
@ -133,7 +133,7 @@ public abstract class BsqSwapTrade extends TradeModel {
|
||||
protobuf.BsqSwapTrade.Builder builder = protobuf.BsqSwapTrade.newBuilder()
|
||||
.setUid(uid)
|
||||
.setOffer(offer.toProtoMessage())
|
||||
.setAmount(amount)
|
||||
.setAmount(amountAsLong)
|
||||
.setTakeOfferDate(takeOfferDate)
|
||||
.setMiningFeePerByte(txFeePerVbyte)
|
||||
.setMakerFee(makerFee)
|
||||
@ -222,7 +222,7 @@ public abstract class BsqSwapTrade extends TradeModel {
|
||||
public Volume getVolume() {
|
||||
if (volume == null) {
|
||||
try {
|
||||
volume = getPrice().getVolumeByAmount(Coin.valueOf(amount));
|
||||
volume = getPrice().getVolumeByAmount(Coin.valueOf(amountAsLong));
|
||||
} catch (Throwable e) {
|
||||
log.error(e.toString());
|
||||
return null;
|
||||
|
@ -42,7 +42,7 @@ public class SendBuyersBsqSwapRequest extends SendBsqSwapMessageTask {
|
||||
protocolModel.getOfferId(),
|
||||
protocolModel.getMyNodeAddress(),
|
||||
protocolModel.getPubKeyRing(),
|
||||
trade.getAmount(),
|
||||
trade.getAmountAsLong(),
|
||||
trade.getTxFeePerVbyte(),
|
||||
trade.getMakerFee(),
|
||||
trade.getTakerFee(),
|
||||
|
@ -56,7 +56,7 @@ public abstract class SellerCreatesAndSignsTx extends BsqSwapTask {
|
||||
long txFeePerVbyte = trade.getTxFeePerVbyte();
|
||||
Tuple2<List<RawTransactionInput>, Coin> btcInputsAndChange = BsqSwapCalculation.getSellersBtcInputsAndChange(
|
||||
protocolModel.getBtcWalletService(),
|
||||
trade.getAmount(),
|
||||
trade.getAmountAsLong(),
|
||||
txFeePerVbyte,
|
||||
sellersTradeFee);
|
||||
List<RawTransactionInput> sellersBtcInputs = btcInputsAndChange.first;
|
||||
|
@ -42,7 +42,7 @@ public class SendSellersBsqSwapRequest extends SendBsqSwapMessageTask {
|
||||
protocolModel.getOfferId(),
|
||||
protocolModel.getMyNodeAddress(),
|
||||
protocolModel.getPubKeyRing(),
|
||||
trade.getAmount(),
|
||||
trade.getAmountAsLong(),
|
||||
trade.getTxFeePerVbyte(),
|
||||
trade.getMakerFee(),
|
||||
trade.getTakerFee(),
|
||||
|
@ -119,7 +119,7 @@ public final class TradeStatistics3 implements ProcessOncePersistableNetworkPayl
|
||||
Offer offer = checkNotNull(bsqSwapTrade.getOffer());
|
||||
return new TradeStatistics3(offer.getCurrencyCode(),
|
||||
bsqSwapTrade.getPrice().getValue(),
|
||||
bsqSwapTrade.getAmount(),
|
||||
bsqSwapTrade.getAmountAsLong(),
|
||||
offer.getPaymentMethod().getId(),
|
||||
bsqSwapTrade.getTakeOfferDate(),
|
||||
null,
|
||||
|
@ -119,7 +119,7 @@ public class BsqTradeDetailsWindow extends Overlay<BsqTradeDetailsWindow> {
|
||||
String plus = " (+ ";
|
||||
String minerFeePostFix = Res.get("tradeDetailsWindow.txFee") + ")";
|
||||
String tradeFeePostFix = Res.get("shared.tradeFee") + ")";
|
||||
String btcAmount = formatter.formatCoinWithCode(bsqSwapTrade.getAmount());
|
||||
String btcAmount = formatter.formatCoinWithCode(bsqSwapTrade.getAmountAsLong());
|
||||
String bsqAmount = VolumeUtil.formatVolumeWithCode(bsqSwapTrade.getVolume());
|
||||
if (tradeManager.isBuyer(offer)) {
|
||||
addConfirmationLabelLabel(gridPane, rowIndex, offerType,
|
||||
|
@ -67,7 +67,7 @@ class CompletedBsqSwapsViewModel extends ActivatableWithDataModel<CompletedBsqSw
|
||||
if (item == null)
|
||||
return "";
|
||||
|
||||
return btcFormatter.formatCoin(Coin.valueOf(item.getBsqSwapTrade().getAmount()));
|
||||
return btcFormatter.formatCoin(Coin.valueOf(item.getBsqSwapTrade().getAmountAsLong()));
|
||||
}
|
||||
|
||||
String getPrice(CompletedBsqSwapsListItem item) {
|
||||
|
Loading…
Reference in New Issue
Block a user