Skip to content

Commit

Permalink
Update return type for SC_SPEC_TYPE_ADDRESS to Union[Address, str]
Browse files Browse the repository at this point in the history
  • Loading branch information
overcat committed Nov 28, 2024
1 parent 8a960d3 commit ce65a1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stellar_contract_bindings/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ce65a1b

Please sign in to comment.