Skip to content

Commit

Permalink
Merge pull request #2512 from ripcurlx/fix-problem-with-display-of-ze…
Browse files Browse the repository at this point in the history
…ro-trading-fees

Show the correct BSQ or BTC trading fee if it is maker or taker
  • Loading branch information
ManfredKarrer authored Mar 7, 2019
2 parents a7b4a56 + 85274b1 commit 6481a53
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,9 @@ public String getTxFee() {
}

public String getTradeFee() {
if (trade != null && dataModel.getOffer() != null) {
if (dataModel.getOffer().isCurrencyForMakerFeeBtc() && trade.getTradeAmount() != null) {
if (trade != null && dataModel.getOffer() != null && trade.getTradeAmount() != null) {
if (dataModel.isMaker() && dataModel.getOffer().isCurrencyForMakerFeeBtc() ||
!dataModel.isMaker() && dataModel.getTrade().isCurrencyForTakerFeeBtc()) {
Coin tradeFeeInBTC = dataModel.getTradeFeeInBTC();
String percentage = GUIUtil.getPercentageOfTradeAmount(tradeFeeInBTC, trade.getTradeAmount(), btcFormatter);
return btcFormatter.formatCoinWithCode(tradeFeeInBTC) + percentage;
Expand Down

0 comments on commit 6481a53

Please sign in to comment.