From 478471ee8112cb9f874e28aea76978a6c0f78016 Mon Sep 17 00:00:00 2001 From: crt Date: Mon, 26 Jun 2017 23:37:24 +0200 Subject: [PATCH] Cast fixed --- PoloniexApi.Net/TradingTools/Trading.cs | 2 +- PoloniexApi.Net/WalletTools/Wallet.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PoloniexApi.Net/TradingTools/Trading.cs b/PoloniexApi.Net/TradingTools/Trading.cs index 793e21f..e33762d 100644 --- a/PoloniexApi.Net/TradingTools/Trading.cs +++ b/PoloniexApi.Net/TradingTools/Trading.cs @@ -23,7 +23,7 @@ private IList GetOpenOrders(CurrencyPair currencyPair) }; var data = PostData>("returnOpenOrders", postData); - return data.Any() ? data.ToList() : new List(); + return data.Any() ? data.Select(x => (IOrder)x).ToList() : new List(); } private IList GetTrades(CurrencyPair currencyPair, DateTime startTime, DateTime endTime) diff --git a/PoloniexApi.Net/WalletTools/Wallet.cs b/PoloniexApi.Net/WalletTools/Wallet.cs index 7b921d9..b580c5e 100644 --- a/PoloniexApi.Net/WalletTools/Wallet.cs +++ b/PoloniexApi.Net/WalletTools/Wallet.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Runtime.CompilerServices; using System.Threading.Tasks; @@ -19,7 +20,8 @@ private IDictionary GetBalances() var postData = new Dictionary(); var data = PostData>("returnCompleteBalances", postData); - return data; + var result = data.ToDictionary(k => k.Key, v => v.Value as IBalance); + return result; } private IDictionary GetDepositAddresses()