Skip to content

Commit 219c098

Browse files
committed
fix
1 parent d0764af commit 219c098

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tronapi/trx.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ def get_transaction(self, transaction_id: str,
162162
'value': transaction_id
163163
})
164164

165-
if not response:
166-
raise TronError('Transaction not found')
165+
if 'txID' not in response:
166+
raise ValueError('Transaction not found')
167167

168168
return response
169169

@@ -268,7 +268,7 @@ def get_transactions_related(self, address, direction='all', limit=30, offset=0)
268268
},
269269
'limit': limit,
270270
'offset': offset
271-
})
271+
}, 'get')
272272

273273
if 'transaction' in response:
274274
return response['transaction']

0 commit comments

Comments
 (0)