diff --git a/cashaddress/convert.py b/cashaddress/convert.py index 12bb758..b2235b5 100644 --- a/cashaddress/convert.py +++ b/cashaddress/convert.py @@ -106,11 +106,11 @@ def _cash_string(address_string): decoded = b32decode(base32string) if not verify_checksum(prefix, decoded): raise InvalidAddress('Bad cash address checksum') - converted = convertbits(decoded, 5, 8) + converted = convertbits(decoded[:-8], 5, 8, False) version = Address._address_type('cash', converted[0])[0] if prefix == Address.TESTNET_PREFIX: version += '-TESTNET' - payload = converted[1:-6] + payload = converted[1:] return Address(version, payload, prefix)