Skip to content

Commit

Permalink
Merge pull request #129 from martinkyov/feature/ETD-413-connectors-fe…
Browse files Browse the repository at this point in the history
…e-in-the-3rd-curren

Feature/etd 413 connectors fee in the 3rd curren
  • Loading branch information
generalbytes authored Apr 14, 2022
2 parents c9f4b31 + a73b7cd commit 7489e6a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
projectVersion=4.2.36
projectVersion=4.2.37
pf4jVersion=3.4.0
xchangeVersion=5.0.13
requiredEverytradeVersion=>=20210427
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public class XChangeApiTransaction {
BigDecimal price;
BigDecimal feeAmount;
String address;
@Builder.Default
boolean logIgnoredFees = true;

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

if (isIgnoredFee) {
if (isIgnoredFee && logIgnoredFees) {
cluster.setIgnoredFee(1, "Fee " + (feeCurrency != null ? feeCurrency.code() : "null") + " currency is not base or quote");
}
return cluster;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ protected List<TransactionCluster> bittrexDepositsToCluster(List<BittrexDepositH
.quote(null)
.originalAmount(d.getQuantity())
.address(d.getCryptoAddress())
.logIgnoredFees(false)
.build();
return xchangeApiTransaction.toTransactionCluster();
} catch (Exception e) {
Expand Down

0 comments on commit 7489e6a

Please sign in to comment.