We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5f8655 commit 8974c24Copy full SHA for 8974c24
tronapi/trx.py
@@ -65,10 +65,13 @@ def get_block(self, block: Any = None):
65
if_number={'url': '/wallet/getblockbynum', 'field': 'num'},
66
)
67
68
- response = self.tron.manager.request(method['url'], {
+ result = self.tron.manager.request(method['url'], {
69
method['field']: block
70
})
71
- return response
+
72
+ if result:
73
+ return result
74
+ return ValueError("The call to {method['url']} did not return a value.")
75
76
def get_transaction_count_by_blocknum(self, num: int):
77
"""Query transaction's count on a specified block by height
0 commit comments