trades are now processed when confirmed
This commit is contained in:
parent
52175ef642
commit
f1e9c672e1
1 changed files with 22 additions and 2 deletions
24
Program.cs
24
Program.cs
|
@ -435,8 +435,28 @@ public static class Program
|
||||||
}
|
}
|
||||||
} while (!confirm);
|
} while (!confirm);
|
||||||
Console.ResetColor();
|
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 = "")
|
static void AcceptAllTrades(string user = "")
|
||||||
|
|
Loading…
Reference in a new issue