diff --git a/pkg/vm/json_test.go b/pkg/vm/json_test.go index f5f85695c..fd3f87860 100644 --- a/pkg/vm/json_test.go +++ b/pkg/vm/json_test.go @@ -454,8 +454,6 @@ func decodeBytes(data []byte) ([]byte, error) { } func decodeHex(s string) ([]byte, error) { - if strings.HasPrefix(s, "0x") { - s = s[2:] - } + s = strings.TrimPrefix(s, "0x") return hex.DecodeString(s) }