from, to
This commit is contained in:
@ -8,3 +8,5 @@ class TransactionInfo:
|
|||||||
symbol: str
|
symbol: str
|
||||||
hash: str
|
hash: str
|
||||||
time: datetime
|
time: datetime
|
||||||
|
from_: str
|
||||||
|
to: str
|
||||||
|
|||||||
@ -33,4 +33,13 @@ async def get_transaction_by_hash(
|
|||||||
time_ = datetime.fromtimestamp(
|
time_ = datetime.fromtimestamp(
|
||||||
float(tx.get("block_timestamp", "")) / 1000
|
float(tx.get("block_timestamp", "")) / 1000
|
||||||
)
|
)
|
||||||
return TransactionInfo(symbol=symbol, amount=f, hash=hash_, time=time_)
|
from_ = tx.get("from", "")
|
||||||
|
to = tx.get("to", "")
|
||||||
|
return TransactionInfo(
|
||||||
|
symbol=symbol,
|
||||||
|
amount=f,
|
||||||
|
hash=hash_,
|
||||||
|
time=time_,
|
||||||
|
from_=from_,
|
||||||
|
to=to,
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user