From d02ad6f6449d42c344d3c299cbd9719970bff1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Huber=20D=C3=B6nni?= Date: Fri, 6 Oct 2017 16:33:54 +0200 Subject: [PATCH] Fix compilation errors References #28 --- SmartTrade/TradeService.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/SmartTrade/TradeService.cs b/SmartTrade/TradeService.cs index 07e73f1..7a7caba 100644 --- a/SmartTrade/TradeService.cs +++ b/SmartTrade/TradeService.cs @@ -262,7 +262,7 @@ private DateTime GetStart(List transactions) if (secondAmount > 0) { - Info("Amount to trade is {0} {1}.", secondCurrency, secondAmount); + Info("Amount to trade is {0} {1}.", this.Settings.SecondCurrency, secondAmount); // When we trade fiat on Bitstamp, the fee is calculated as implemented in // UnitCostAveragingCalculator.GetFee. We always want to sell a bit less than calculated @@ -280,7 +280,12 @@ private DateTime GetStart(List transactions) this.Settings.LastTradeTime = result.DateTime; firstBalance += result.Amount; var bought = result.Amount * result.Price; - popup.Update(this, Resource.String.BoughtPopup, secondCurrency, bought, firstCurrency); + popup.Update( + this, + Resource.String.BoughtPopup, + this.Settings.SecondCurrency, + bought, + this.Settings.FirstCurrency); start = result.DateTime; secondAmount = bought + calculator.GetFee(bought); @@ -293,7 +298,12 @@ private DateTime GetStart(List transactions) this.Settings.LastTradeTime = result.DateTime; firstBalance -= result.Amount; var sold = result.Amount * result.Price; - popup.Update(this, Resource.String.SoldPopup, secondCurrency, sold, firstCurrency); + popup.Update( + this, + Resource.String.SoldPopup, + this.Settings.SecondCurrency, + sold, + this.Settings.FirstCurrency); start = result.DateTime; secondAmount = sold - calculator.GetFee(sold); @@ -310,7 +320,8 @@ private DateTime GetStart(List transactions) } this.Settings.RetryIntervalMilliseconds = MinRetryIntervalMilliseconds; - var nextTradeTime = calculator.GetNextTime(start, buy ? secondBalance : firstBalance * ticker.Bid) - DateTime.UtcNow; + var nextTradeTime = + calculator.GetNextTime(start, buy ? secondBalance : firstBalance * ticker.Bid) - DateTime.UtcNow; if (!nextTradeTime.HasValue) {