revert hexutil.Decode (#665)

Co-authored-by: Jonas Theis <4181434+jonastheis@users.noreply.github.com>
This commit is contained in:
HAOYUatHZ 2024-07-23 11:06:24 +08:00 committed by GitHub
parent 22d9de3d46
commit 127ace6083
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,10 +64,6 @@ func Decode(input string) ([]byte, error) {
if !has0xPrefix(input) {
return nil, ErrMissingPrefix
}
// better compatible with odd size string
if len(input)%2 != 0 {
input = "0x0" + input[2:]
}
b, err := hex.DecodeString(input[2:])
if err != nil {
err = mapError(err)