multi: fix non-constant input of fmt.Errorf

Fixed multiple cases in which a non-constact string variable was used as a
format string for fmt.Errorf.
This commit is contained in:
Boris Nagaev
2025-08-19 14:52:28 -03:00
parent f3d52ba7a8
commit 612ad7da27
5 changed files with 10 additions and 7 deletions

View File

@@ -76,7 +76,8 @@ func decodeBech32(bech string) (string, []byte, error) {
moreInfo = fmt.Sprintf("Expected %v, got %v.",
expected, checksum)
}
return "", nil, fmt.Errorf("checksum failed. " + moreInfo)
return "", nil, fmt.Errorf("checksum failed. %s", moreInfo)
}
// We exclude the last 6 bytes, which is the checksum.