Refactor user settings management to remove IsGmxEnabled and DefaultExchange from updatable fields, introducing GmxSlippage instead. Update UserController, UserService, and related DTOs to reflect these changes, ensuring proper handling of user settings. Adjust database schema and migrations to accommodate the new GmxSlippage property, enhancing user customization options for trading configurations.
This commit is contained in:
@@ -359,8 +359,10 @@ public class UserService : IUserService
|
||||
if (settings.MaxTxnGasFeePerPosition.HasValue)
|
||||
user.MaxTxnGasFeePerPosition = settings.MaxTxnGasFeePerPosition.Value;
|
||||
|
||||
if (settings.IsGmxEnabled.HasValue)
|
||||
user.IsGmxEnabled = settings.IsGmxEnabled.Value;
|
||||
// Note: IsGmxEnabled is not updatable via settings endpoint - managed internally
|
||||
|
||||
if (settings.GmxSlippage.HasValue)
|
||||
user.GmxSlippage = settings.GmxSlippage.Value;
|
||||
|
||||
if (settings.MinimumConfidence.HasValue)
|
||||
user.MinimumConfidence = settings.MinimumConfidence.Value;
|
||||
@@ -374,8 +376,7 @@ public class UserService : IUserService
|
||||
if (settings.AllowSignalTrendOverride.HasValue)
|
||||
user.AllowSignalTrendOverride = settings.AllowSignalTrendOverride.Value;
|
||||
|
||||
if (settings.DefaultExchange.HasValue)
|
||||
user.DefaultExchange = settings.DefaultExchange.Value;
|
||||
// Note: DefaultExchange is not updatable via settings endpoint - managed internally
|
||||
|
||||
await _userRepository.SaveOrUpdateUserAsync(user);
|
||||
return user;
|
||||
|
||||
Reference in New Issue
Block a user