Skip to content

Commit

Permalink
change publick recover logic, use hex (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhiran authored Nov 7, 2024
1 parent b1610ad commit 8a446c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ func (s *httpServer) owner(sigStr string, o any) (common.Address, error) {
}
h := crypto.Keccak256Hash(reqJson)

if a, err := s.recoverOwner(sigStr+"27", h); err == nil {
if a, err := s.recoverOwner(sigStr+"1b", h); err == nil {
slog.Info("recover owner with 27 success")
return a, nil
}
return s.recoverOwner(sigStr+"28", h)
return s.recoverOwner(sigStr+"1c", h)
}

func (s *httpServer) recoverOwner(sigStr string, h common.Hash) (common.Address, error) {
Expand Down

0 comments on commit 8a446c0

Please sign in to comment.