Skip to content

Commit

Permalink
Limit shared GetBalance result to Exchange balances to prevent duplic…
Browse files Browse the repository at this point in the history
…ate asset balances
  • Loading branch information
JKorf committed Sep 29, 2024
1 parent 0553efe commit b528b78
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ async Task<ExchangeWebResult<IEnumerable<SharedBalance>>> IBalanceRestClient.Get
if (!result)
return result.AsExchangeResult<IEnumerable<SharedBalance>>(Exchange, null, default);

return result.AsExchangeResult<IEnumerable<SharedBalance>>(Exchange, SupportedTradingModes, result.Data.Select(x => new SharedBalance(x.Asset, x.Available ?? 0, x.Total)).ToArray());
return result.AsExchangeResult<IEnumerable<SharedBalance>>(Exchange, SupportedTradingModes, result.Data.Where(x => x.Type == WalletType.Exchange).Select(x => new SharedBalance(x.Asset, x.Available ?? 0, x.Total)).ToArray());
}

#endregion
Expand Down

0 comments on commit b528b78

Please sign in to comment.