Display trade.txFee for BSQ swap trades

This commit is contained in:
ghubstan 2022-01-20 15:54:50 -03:00
parent 2e7346a695
commit b10cb119f2
No known key found for this signature in database
GPG Key ID: E35592D6800A861E

View File

@ -206,10 +206,15 @@ abstract class AbstractTradeListBuilder extends AbstractTableBuilder {
? formatToPercent(t.getOffer().getMarketPriceMargin())
: "N/A";
protected final Function<TradeInfo, Long> toMyMinerTxFee = (t) ->
isTaker.test(t)
protected final Function<TradeInfo, Long> 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<TradeInfo, Boolean, Long> toTradeFeeBsq = (t, isMyOffer) -> {
if (isMyOffer) {