Enhance user authentication by adding optional OwnerWalletAddress parameter in LoginRequest and UserService. Update UserController and related components to support the new wallet address functionality, ensuring better user profile management and validation in trading operations.
This commit is contained in:
@@ -45,7 +45,8 @@ public class PostgreSqlUserRepository : BaseRepositoryWithLogging, IUserReposito
|
||||
Name = u.Name,
|
||||
AgentName = u.AgentName,
|
||||
AvatarUrl = u.AvatarUrl,
|
||||
TelegramChannel = u.TelegramChannel
|
||||
TelegramChannel = u.TelegramChannel,
|
||||
OwnerWalletAddress = u.OwnerWalletAddress
|
||||
})
|
||||
.FirstOrDefaultAsync()
|
||||
.ConfigureAwait(false);
|
||||
@@ -93,7 +94,8 @@ public class PostgreSqlUserRepository : BaseRepositoryWithLogging, IUserReposito
|
||||
Name = u.Name,
|
||||
AgentName = u.AgentName,
|
||||
AvatarUrl = u.AvatarUrl,
|
||||
TelegramChannel = u.TelegramChannel
|
||||
TelegramChannel = u.TelegramChannel,
|
||||
OwnerWalletAddress = u.OwnerWalletAddress
|
||||
})
|
||||
.FirstOrDefaultAsync()
|
||||
.ConfigureAwait(false);
|
||||
@@ -208,7 +210,8 @@ public class PostgreSqlUserRepository : BaseRepositoryWithLogging, IUserReposito
|
||||
Name = u.Name,
|
||||
AgentName = u.AgentName,
|
||||
AvatarUrl = u.AvatarUrl,
|
||||
TelegramChannel = u.TelegramChannel
|
||||
TelegramChannel = u.TelegramChannel,
|
||||
OwnerWalletAddress = u.OwnerWalletAddress
|
||||
})
|
||||
.ToListAsync()
|
||||
.ConfigureAwait(false);
|
||||
@@ -249,6 +252,7 @@ public class PostgreSqlUserRepository : BaseRepositoryWithLogging, IUserReposito
|
||||
existingUser.AgentName = user.AgentName;
|
||||
existingUser.AvatarUrl = user.AvatarUrl;
|
||||
existingUser.TelegramChannel = user.TelegramChannel;
|
||||
existingUser.OwnerWalletAddress = user.OwnerWalletAddress;
|
||||
existingUser.IsAdmin = user.IsAdmin;
|
||||
|
||||
_context.Users.Update(existingUser);
|
||||
|
||||
Reference in New Issue
Block a user