Fix address whitelist check

This commit is contained in:
2025-08-15 22:25:59 +07:00
parent 994fd5d9a6
commit e73af1dd3a

View File

@@ -54,7 +54,7 @@ public class UserService : IUserService
$"Message not good : {message} - Address : {address} - User : {name} - Signature : {signature}"); $"Message not good : {message} - Address : {address} - User : {name} - Signature : {signature}");
} }
if (!_authorizedAddresses.Contains(recoveredAddress.ToLower())) if (!_authorizedAddresses.Any(a => string.Equals(a, recoveredAddress, StringComparison.OrdinalIgnoreCase)))
{ {
_logger.LogWarning($"Address {recoveredAddress} not authorized"); _logger.LogWarning($"Address {recoveredAddress} not authorized");
throw new Exception("Address not authorized"); throw new Exception("Address not authorized");