diff --git a/src/chia-dotnet/TradeManager.cs b/src/chia-dotnet/TradeManager.cs index 257c9aee..132b67bb 100644 --- a/src/chia-dotnet/TradeManager.cs +++ b/src/chia-dotnet/TradeManager.cs @@ -79,17 +79,11 @@ public async Task> GetOffers(int start, int end, bool e var response = await WalletProxy.SendMessage("get_all_offers", data, cancellationToken).ConfigureAwait(false); - var rTemp = new - { - response.offers, - response.success, - response.trade_records - }; - - var tradeRecords = Converters.ToObject((rTemp.trade_records as object).ToJson()); - var offers = Converters.ToObject((rTemp.offers as object).ToJson()); + // need to explicitly decalre these two types to cast away any dynamicness + TradeRecord[] tradeRecords = Converters.ToObject(response.trade_records); + string[] offers = Converters.ToObject(response.offers); - var zipped = offers!.Zip(tradeRecords!); + var zipped = offers.Zip(tradeRecords); return from zip in zipped select new OfferRecord()