Skip to content

Commit

Permalink
ETD-413-connectors-fee - after 2nd code review
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkyov committed Apr 14, 2022
1 parent b21b7ce commit 1b180ab
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public class XChangeApiTransaction {
BigDecimal price;
BigDecimal feeAmount;
String address;
Boolean logIgnoredFees;
@Builder.Default
boolean logIgnoredFees = true;

public static XChangeApiTransaction fromTrade(UserTrade trade) {
final Instrument instrument = trade.getInstrument();
Expand Down Expand Up @@ -112,12 +113,8 @@ public TransactionCluster toTransactionCluster() {
throw new DataValidationException("Unsupported type " + type.name());
}

if (isIgnoredFee) {
if(!logIgnoredFees) {
// ignore - Bittrex does not send any data for deposit fees because the deposit is free of charge.
} else {
if (isIgnoredFee && logIgnoredFees) {
cluster.setIgnoredFee(1, "Fee " + (feeCurrency != null ? feeCurrency.code() : "null") + " currency is not base or quote");
}
}
return cluster;
}
Expand Down

0 comments on commit 1b180ab

Please sign in to comment.