Issue printing global state creator address (FIXED)

On creation, I do: App.globalPut( Bytes("kyc_account"), Txn.sender() )

When I try to read the address:

value = item["value"]
value_to_format = value['bytes']
print(value_to_format)

This prints: vE+qntOzXXbhO7MCTnvqTfEtk4aqhYlUeqM4pCLXKdI=

print(encoding.is_valid_address(value_to_format)) 

This prints False

results = base64.b64decode(value_to_format)
print(results)
print(encoding.is_valid_address(results))

This prints:

b'\xbcO\xaa\x9e\xd3\xb3]v\xe1;\xb3\x02N{\xeaM\xf1-\x93\x86\xaa\x85\x89Tz\xa38\xa4"\xd7)\xd2'
False

When I print the global state formatted:

Global state: {'kyc_account': 'vE+qntOzXXbhO7MCTnvqTfEtk4aqhYlUeqM4pCLXKdI='}

I want to print this address in 58byte version, like we usually see them.

The KYC account is a multisig, so that might be the issue, but aside from that, I have no idea what is going on.

EDIT: I fixed the problem like so:

base_64_decoded_address = base64.b64decode(value['bytes'])
formatted_value = encoding.encode_address(base_64_decoded_address)
1 Like