diff --git a/BoosterManager/Handlers/MarketHandler.cs b/BoosterManager/Handlers/MarketHandler.cs index facab42..0a0c80b 100644 --- a/BoosterManager/Handlers/MarketHandler.cs +++ b/BoosterManager/Handlers/MarketHandler.cs @@ -31,11 +31,13 @@ internal static async Task GetValue(Bot bot, uint subtractFrom = 0) { return Strings.MarketListingsFetchFailed; } + var value = (listingsValue + bot.WalletBalance + bot.WalletBalanceDelayed) / 100.0; + if (subtractFrom != 0) { - return Commands.FormatBotResponse(bot, String.Format(Strings.AccountValueRemaining, String.Format("{0:#,#0.00}", subtractFrom - ((listingsValue + bot.WalletBalance) / 100.0)), bot.WalletCurrency.ToString())); + return Commands.FormatBotResponse(bot, String.Format(Strings.AccountValueRemaining, String.Format("{0:#,#0.00}", subtractFrom - value), bot.WalletCurrency.ToString())); } - return Commands.FormatBotResponse(bot, String.Format(Strings.AccountValue, String.Format("{0:#,#0.00}", (listingsValue + bot.WalletBalance) / 100.0), bot.WalletCurrency.ToString())); + return Commands.FormatBotResponse(bot, String.Format(Strings.AccountValue, String.Format("{0:#,#0.00}", value), bot.WalletCurrency.ToString())); } private static async Task GetMarketListingsValue(Bot bot) {