Skip to content

Commit d91d17d

Browse files
authored
HitBTC: allow OnGetDepositHistoryAsync() for all currencies (#489)
* HitBTC: allow OnGetDepositHistoryAsync() for all currencies - handles when currency param is null, allowing the return of all currencies w/o filtering - marked currency param as nullable in preparation for future C# 8 conversion on this file (even though it will throw one additional warning for now) * Update ExchangeHitbtcAPI.cs * Update ExchangeHitbtcAPI.cs
1 parent 37d3229 commit d91d17d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ExchangeSharp/API/Exchanges/Hitbtc/ExchangeHitbtcAPI.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
MIT LICENSE
33
44
Copyright 2017 Digital Ruby, LLC - http://www.digitalruby.com
@@ -384,7 +384,7 @@ protected override async Task<ExchangeDepositDetails> OnGetDepositAddressAsync(s
384384
/// </summary>
385385
/// <param name="currency"></param>
386386
/// <returns></returns>
387-
protected override async Task<IEnumerable<ExchangeTransaction>> OnGetDepositHistoryAsync(string currency)
387+
protected override async Task<IEnumerable<ExchangeTransaction>> OnGetDepositHistoryAsync(string? currency)
388388
{
389389
List<ExchangeTransaction> transactions = new List<ExchangeTransaction>();
390390
// [ {"id": "6a2fb54d-7466-490c-b3a6-95d8c882f7f7","index": 20400458,"currency": "ETH","amount": "38.616700000000000000000000","fee": "0.000880000000000000000000", "address": "0xfaEF4bE10dDF50B68c220c9ab19381e20B8EEB2B", "hash": "eece4c17994798939cea9f6a72ee12faa55a7ce44860cfb95c7ed71c89522fe8","status": "pending","type": "payout", "createdAt": "2017-05-18T18:05:36.957Z", "updatedAt": "2017-05-18T19:21:05.370Z" }, ... ]
@@ -393,7 +393,7 @@ protected override async Task<IEnumerable<ExchangeTransaction>> OnGetDepositHist
393393
{
394394
foreach (JToken token in result)
395395
{
396-
if (token["currency"].ToStringInvariant().Equals(currency))
396+
if (string.IsNullOrWhiteSpace(currency) || token["currency"].ToStringInvariant().Equals(currency))
397397
{
398398
ExchangeTransaction transaction = new ExchangeTransaction
399399
{

0 commit comments

Comments
 (0)