Closed Maharacha closed 2 years ago
The docstring is indeed outdated, it was changed to the more native representation bytes
. And it is not very intuitive to convert it first to be able to use it for create_signed_extrinsic()
, for backwards compatibility sake I will convert the type to a Union[str, bytes]
so both types can be used and internally converted.
Just like in:
The docstring is indeed outdated, it was changed to the more native representation
bytes
. And it is not very intuitive to convert it first to be able to use it forcreate_signed_extrinsic()
, for backwards compatibility sake I will convert the type to aUnion[str, bytes]
so both types can be used and internally converted.Just like in:
)
Sounds great!
https://github.com/polkascan/py-substrate-interface/blob/5119bcf87f9a07e570f0c5e9c1bedddf1db1d1fd/substrateinterface/base.py#L354 Sign method return bytes, but the docstring says
string
.I noticed this because https://github.com/polkascan/py-substrate-interface/blob/5119bcf87f9a07e570f0c5e9c1bedddf1db1d1fd/substrateinterface/base.py#L1755 requires
string
. So to make it work I have to convert the signature to hex string before creating the extrinsic,signature.hex()
I did not have to do this before, not sure when it started to fail though...