diff --git a/utils/bash/bash_commands.go b/utils/bash/bash_commands.go index 66762d020..28b50e7b7 100644 --- a/utils/bash/bash_commands.go +++ b/utils/bash/bash_commands.go @@ -344,8 +344,8 @@ func ExtractTxHash(output string) (string, error) { lines := strings.Split(output, "\n") for _, line := range lines { - if strings.HasPrefix(line, "txhash:") { - return strings.TrimSpace(strings.TrimPrefix(line, "txhash:")), nil + if after, ok := strings.CutPrefix(line, "txhash:"); ok { + return strings.TrimSpace(after), nil } }