Skip to content

Commit 1b57d3e

Browse files
committed
fix: util issue
1 parent 03af280 commit 1b57d3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,8 @@ func GetHexString(data any) string {
431431
if reflect.TypeOf(data).Kind() == reflect.Float64 {
432432
result = fmt.Sprintf("%x", int64(data.(float64)))
433433
} else if reflect.TypeOf(data).Kind() == reflect.String {
434-
if result, ok := strings.CutPrefix(data.(string), "0x"); ok {
435-
} else {
434+
result, ok := strings.CutPrefix(data.(string), "0x")
435+
if !ok {
436436
result = data.(string)
437437
}
438438
} else {

0 commit comments

Comments
 (0)