Skip to content

Commit b8a1a93

Browse files
Update pkg/ethrpc/service/service.go
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 84c7e65 commit b8a1a93

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pkg/ethrpc/service/service.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,13 @@ func (*ethService) Syncing(_ context.Context) bool {
214214
// checkWhitelist authorizes a transaction sender against the registration
215215
// whitelist.
216216
func (s *ethService) checkWhitelist(ctx context.Context, from common.Address) error {
217-
whitelisted, err := s.whitelist.IsWhitelisted(ctx, from.Hex())
217+
addr := strings.ToLower(from.Hex())
218+
whitelisted, err := s.whitelist.IsWhitelisted(ctx, addr)
218219
if err != nil {
219220
return apperr.DependencyError(err, "whitelist check")
220221
}
221222
if !whitelisted {
222-
return apperr.ForbiddenError(nil, fmt.Sprintf("sender not whitelisted: %s", from.Hex()))
223+
return apperr.ForbiddenError(nil, fmt.Sprintf("sender not whitelisted: %s", addr))
223224
}
224225
return nil
225226
}

0 commit comments

Comments
 (0)