Closed MioYvo closed 4 years ago
Sorry, as an HTTP client library, tronpy can't fix the json encoding/decoding bug in java-tron.
This is an upstream bug.
visible
is a parameter passed to JsonFormat
, every HTTP API has a visible
parameter.
Doc sucks. Code speaks.
PostParams params = PostParams.getPostParams(request);
BytesMessage.Builder build = BytesMessage.newBuilder();
JsonFormat.merge(params.getParams(), build, params.isVisible());
fillResponse(params.isVisible(), build.getValue(), response);
Thanks.
And for convenience, tronpy won't switch to non-visible
request.
A "visible" param to Tron.get_block
? Users can process the address format (to_base58check_address
) outside without getting an error. :|
Good point, will fix this now.
😁Published as v0.1.6. You can use pip install -U tronpy
to test the new API.
Python: 3.7 tronpy: 0.1.5 error:
I found only block
24223718
have problems. I've reported this to Tron offical telegram group, no reply yet.But:
tron.py:
"wallet/getblockbynum", "wallet/getblockbyid", "wallet/getnowblock" do not have the "visible" parameter now (maybe exists before) ref: https://developers.tron.network/reference#walletgetblockbynum