From ce65a1b2cc2565e955dbc521a6309301f07d5c5a Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Thu, 28 Nov 2024 10:42:55 +0800 Subject: [PATCH] Update return type for SC_SPEC_TYPE_ADDRESS to Union[Address, str] --- stellar_contract_bindings/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stellar_contract_bindings/python.py b/stellar_contract_bindings/python.py index f40b909..212a21e 100644 --- a/stellar_contract_bindings/python.py +++ b/stellar_contract_bindings/python.py @@ -66,7 +66,7 @@ def to_py_type(td: xdr.SCSpecTypeDef): if t == xdr.SCSpecType.SC_SPEC_TYPE_SYMBOL: return "str" if t == xdr.SCSpecType.SC_SPEC_TYPE_ADDRESS: - return "Address" + return "Union[Address, str]" if t == xdr.SCSpecType.SC_SPEC_TYPE_OPTION: return f"Optional[{to_py_type(td.option.value_type)}]" if t == xdr.SCSpecType.SC_SPEC_TYPE_RESULT: