From b10cb119f2309c787da787590be6fdb9fcdf9d35 Mon Sep 17 00:00:00 2001 From: ghubstan <36207203+ghubstan@users.noreply.github.com> Date: Thu, 20 Jan 2022 15:54:50 -0300 Subject: [PATCH] Display trade.txFee for BSQ swap trades --- .../bisq/cli/table/builder/AbstractTradeListBuilder.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cli/src/main/java/bisq/cli/table/builder/AbstractTradeListBuilder.java b/cli/src/main/java/bisq/cli/table/builder/AbstractTradeListBuilder.java index dd09d1e8f9..79059ae496 100644 --- a/cli/src/main/java/bisq/cli/table/builder/AbstractTradeListBuilder.java +++ b/cli/src/main/java/bisq/cli/table/builder/AbstractTradeListBuilder.java @@ -206,10 +206,15 @@ abstract class AbstractTradeListBuilder extends AbstractTableBuilder { ? formatToPercent(t.getOffer().getMarketPriceMargin()) : "N/A"; - protected final Function toMyMinerTxFee = (t) -> - isTaker.test(t) + protected final Function toMyMinerTxFee = (t) -> { + if (isBsqSwapTrade.test(t)) { + return t.getTxFeeAsLong(); // TODO What is trader's 'share' of tx-fee? + } else { + return isTaker.test(t) ? t.getTxFeeAsLong() : t.getOffer().getTxFee(); + } + }; protected final BiFunction toTradeFeeBsq = (t, isMyOffer) -> { if (isMyOffer) {