Skip to content

Commit

Permalink
Merge pull request #34 from pvyhnal-generalbytes/transactions-fees-cl…
Browse files Browse the repository at this point in the history
…ient

transactions fees api support in Client
  • Loading branch information
generalbytes authored Feb 11, 2020
2 parents e7fcc0a + fde2c70 commit 3b9bd24
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,19 @@ public TxFeesInfo getRecommendedTransactionFeesPerByte() {
return null;
}

@Override
public TxFees getTransactionFees(List<String> txHashes) {
try {
final TxFeesResponse response = api.getTransactionFees(txHashes);
if (response != null && response.isSuccess() && response.getData() != null) {
return response.getData();
}
} catch (Throwable t) {
t.printStackTrace();
}
return null;
}

@Override
public RiskLevel getTransactionRiskLevel(String txHash) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ public interface IClient {
List<AmountsPair> convertAmounts(List<AmountsPair> amountsPairs);
TxFeesInfo getRecommendedTransactionFeesPerByte();

TxFees getTransactionFees(List<String> txHashes);

public RiskLevel getTransactionRiskLevel(String txHash);

public enum RiskLevel {
Expand Down

0 comments on commit 3b9bd24

Please sign in to comment.