We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03af280 commit 1b57d3eCopy full SHA for 1b57d3e
util/util.go
@@ -431,8 +431,8 @@ func GetHexString(data any) string {
431
if reflect.TypeOf(data).Kind() == reflect.Float64 {
432
result = fmt.Sprintf("%x", int64(data.(float64)))
433
} else if reflect.TypeOf(data).Kind() == reflect.String {
434
- if result, ok := strings.CutPrefix(data.(string), "0x"); ok {
435
- } else {
+ result, ok := strings.CutPrefix(data.(string), "0x")
+ if !ok {
436
result = data.(string)
437
}
438
} else {
0 commit comments