From a94d2242824e8748353c48b264fec50d8cf4ac48 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Sun, 4 Jun 2017 14:58:52 -0400 Subject: [PATCH] fix #15, thanks @bontibon --- Program.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Program.cs b/Program.cs index c15872d..3dca05d 100644 --- a/Program.cs +++ b/Program.cs @@ -596,7 +596,9 @@ namespace SteamGuard } } Console.WriteLine("Retrieving trade confirmations..."); - var trades = account.FetchConfirmations(); + var tradesTask = account.FetchConfirmationsAsync(); + tradesTask.Wait(); + var trades = tradesTask.Result; var tradeActions = new TradeAction[trades.Length]; for (var i = 0; i < tradeActions.Length; i++) { @@ -743,7 +745,9 @@ namespace SteamGuard if (Verbose) Console.WriteLine("Refeshing Session..."); account.RefreshSession(); if (Verbose) Console.WriteLine("Fetching Confirmations..."); - Confirmation[] confirmations = account.FetchConfirmations(); + var tradesTask = account.FetchConfirmationsAsync(); + tradesTask.Wait(); + Confirmation[] confirmations = tradesTask.Result; if (Verbose) Console.WriteLine("Accepting Confirmations..."); account.AcceptMultipleConfirmations(confirmations); break; @@ -755,7 +759,9 @@ namespace SteamGuard if (Verbose) Console.WriteLine("Refeshing Session..."); account.RefreshSession(); if (Verbose) Console.WriteLine("Fetching Confirmations..."); - Confirmation[] confirmations = account.FetchConfirmations(); + var tradesTask = account.FetchConfirmationsAsync(); + tradesTask.Wait(); + Confirmation[] confirmations = tradesTask.Result; if (Verbose) Console.WriteLine("Accepting Confirmations..."); account.AcceptMultipleConfirmations(confirmations); }