From 3f756d554a0c8a54ab110acb04a97ed1b3ef636d Mon Sep 17 00:00:00 2001 From: lwYeo Date: Mon, 9 Aug 2021 21:48:15 +0800 Subject: [PATCH] Fix summary formatting issue in Web API --- Crypto LP Compounder/Compounder.cs | 4 ++-- Crypto LP Compounder/Crypto LP Compounder.csproj | 2 +- Crypto LP Compounder/Program.cs | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Crypto LP Compounder/Compounder.cs b/Crypto LP Compounder/Compounder.cs index ed4d807..5cba02b 100644 --- a/Crypto LP Compounder/Compounder.cs +++ b/Crypto LP Compounder/Compounder.cs @@ -71,11 +71,11 @@ string[] ICompounder.Summary return new[] { $"Current APR: {_Farm.CurrentAPR.Value.ToString(_Farm.CurrentAPR.Value < 1000 ? "n3" : "n0")} {_Farm.CurrentAPR.Symbol}" + $" ({_Farm.CurrentDeposit.FiatValue.Value * (_Farm.CurrentAPR.Value / 100):n2} {_Farm.CurrentDeposit.FiatValue.Symbol} /" + - $" ({_Farm.CurrentDeposit.ChainValue.Value * (_Farm.CurrentAPR.Value / 100):n2} {_Farm.CurrentDeposit.ChainValue.Symbol})" + $" {_Farm.CurrentDeposit.ChainValue.Value * (_Farm.CurrentAPR.Value / 100):n2} {_Farm.CurrentDeposit.ChainValue.Symbol})" , $"Optimal APY: {_Farm.OptimalAPY.Value.ToString(_Farm.OptimalAPY.Value < 1000 ? "n3" : "n0")} {_Farm.OptimalAPY.Symbol}" + $" ({_Farm.CurrentDeposit.FiatValue.Value * (_Farm.OptimalAPY.Value / 100):n2} {_Farm.CurrentDeposit.FiatValue.Symbol} /" + - $" ({_Farm.CurrentDeposit.ChainValue.Value * (_Farm.OptimalAPY.Value / 100):n2} {_Farm.CurrentDeposit.ChainValue.Symbol})" + + $" {_Farm.CurrentDeposit.ChainValue.Value * (_Farm.OptimalAPY.Value / 100):n2} {_Farm.CurrentDeposit.ChainValue.Symbol})" + $" ({_Farm.OptimalCompoundsPerYear} compounds per year)" , $"Next compound in {(_NextLoopTime - DateTimeOffset.Now).TotalDays:n0} d" + diff --git a/Crypto LP Compounder/Crypto LP Compounder.csproj b/Crypto LP Compounder/Crypto LP Compounder.csproj index d87fc7f..6b34a4c 100644 --- a/Crypto LP Compounder/Crypto LP Compounder.csproj +++ b/Crypto LP Compounder/Crypto LP Compounder.csproj @@ -9,7 +9,7 @@ Copyright © lwYeo 2021 lwYeo@github lwYeo - 0.1.6 + 0.1.7 GitHub https://github.com/lwYeo/CryptoLP_Compounder Crypto LP Compounder diff --git a/Crypto LP Compounder/Program.cs b/Crypto LP Compounder/Program.cs index ff45dfc..e7f1e91 100644 --- a/Crypto LP Compounder/Program.cs +++ b/Crypto LP Compounder/Program.cs @@ -140,6 +140,8 @@ private static async Task Main(string[] args) _IsTerminate = true; _IsPause = true; + await FlushConsoleLogsAsync(); + LogLineConsole(); LogLineConsole(t.Exception.Message);