Skip to content

Commit

Permalink
Added set_signature method to Transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNaif2018 committed Jan 31, 2023
1 parent b8d9fe5 commit 8761f36
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tronpy/async_tron.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ async def broadcast(self) -> AsyncTransactionRet:
"""Broadcast the transaction to TRON network."""
return AsyncTransactionRet(await self._client.broadcast(self), client=self._client, method=self._method)

def set_signature(self, signature: list) -> "AsyncTransaction":
"""set async transaction signature"""
self._signature = signature
return self

@property
def is_expired(self) -> bool:
return current_timestamp() >= self._raw_data['expiration']
Expand Down
5 changes: 5 additions & 0 deletions tronpy/tron.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ def broadcast(self) -> TransactionRet:
"""Broadcast the transaction to TRON network."""
return TransactionRet(self._client.broadcast(self), client=self._client, method=self._method)

def set_signature(self, signature: list) -> "Transaction":
"""set transaction signature"""
self._signature = signature
return self

@property
def is_expired(self) -> bool:
return current_timestamp() >= self._raw_data['expiration']
Expand Down

0 comments on commit 8761f36

Please sign in to comment.