diff --git a/internal/helper/sdk/bech32.go b/internal/helper/sdk/bech32.go index 3a0e146..0e9e314 100644 --- a/internal/helper/sdk/bech32.go +++ b/internal/helper/sdk/bech32.go @@ -335,10 +335,7 @@ func ConvertBits(data []byte, fromBits, toBits uint8, pad bool) ([]byte, error) // The number of bytes to next extract is the minimum of // remFromBits and remToBits. - toExtract := remFromBits - if remToBits < toExtract { - toExtract = remToBits - } + toExtract := min(remToBits, remFromBits) // Add the next bits to nextByte, shifting the already // added bits to the left.