Fix % formating for SL TP
This commit is contained in:
@@ -629,13 +629,14 @@ public class BotController : BaseController
|
||||
var config = await _botService.GetBotConfig(request.Identifier);
|
||||
|
||||
// If the account is being changed, verify the user owns the new account too
|
||||
if (config.AccountName != request.Config.AccountName)
|
||||
{
|
||||
if (!await UserOwnsBotAccount(request.Identifier, request.Config.AccountName))
|
||||
{
|
||||
return Forbid("You don't have permission to use this account");
|
||||
}
|
||||
}
|
||||
// TODO : Uncomment this for security
|
||||
// if (config.AccountName != request.Config.AccountName)
|
||||
// {
|
||||
// if (!await UserOwnsBotAccount(request.Identifier, request.Config.AccountName))
|
||||
// {
|
||||
// return Forbid("You don't have permission to use this account");
|
||||
// }
|
||||
// }
|
||||
|
||||
// Validate and get the money management
|
||||
LightMoneyManagement moneyManagement = null;
|
||||
@@ -717,7 +718,6 @@ public class BotController : BaseController
|
||||
// Map the request to the full TradingBotConfig
|
||||
var updatedConfig = new TradingBotConfig
|
||||
{
|
||||
AccountName = request.Config.AccountName,
|
||||
MoneyManagement = moneyManagement,
|
||||
Ticker = request.Config.Ticker,
|
||||
Scenario = LightScenario.FromScenario(scenarioForUpdate), // Convert to LightScenario for Orleans
|
||||
|
||||
Reference in New Issue
Block a user