From f1e9c672e1d738d8d76902b04e96f81df62d1fe5 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Fri, 26 Aug 2016 20:07:15 -0400 Subject: [PATCH] trades are now processed when confirmed --- Program.cs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Program.cs b/Program.cs index 6fbac53..b8e6621 100644 --- a/Program.cs +++ b/Program.cs @@ -435,8 +435,28 @@ public static class Program } } while (!confirm); Console.ResetColor(); - - + Console.WriteLine(); + Console.WriteLine("Processing..."); + for (var t = 0; t < trades.Length; t++) + { + switch (tradeActions[t]) + { + case TradeAction.Accept: + if (Verbose) Console.WriteLine($"Accepting {trades[t].Description}..."); + account.AcceptConfirmation(trades[t]); + break; + case TradeAction.Deny: + if (Verbose) Console.WriteLine($"Denying {trades[t].Description}..."); + account.AcceptConfirmation(trades[t]); + break; + case TradeAction.Ignore: + if (Verbose) Console.WriteLine($"Ignoring {trades[t].Description}..."); + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + Console.WriteLine("Done."); } static void AcceptAllTrades(string user = "")