debug
This commit is contained in:
@ -1,11 +1,17 @@
|
||||
import pytest
|
||||
|
||||
from trc20wrapper.transactions import get_transaction_by_hash
|
||||
from trc20wrapper.transactions import get_transactions
|
||||
|
||||
HASH_ = "36ad0f7e042b6d95b22e3226cee5e61101712cc3d519ac5623da1ab3c42d49a9"
|
||||
ADDR = "TEqCBKLNfJsrYaiYXnSVDDx7QvhyWnH9gj"
|
||||
|
||||
|
||||
# @pytest.mark.asyncio
|
||||
# async def test_get_transaction_by_hash():
|
||||
# print(await get_transaction_by_hash(ADDR, HASH_))
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_transaction_by_hash():
|
||||
print(await get_transaction_by_hash(ADDR, HASH_))
|
||||
async def test_get_transactions():
|
||||
for tx in await get_transactions(ADDR):
|
||||
print(tx.amount, tx.time)
|
||||
|
||||
@ -54,7 +54,7 @@ async def get_transactions(
|
||||
params: dict = {"limit": limit}
|
||||
if only_confirmed:
|
||||
params["only_confirmed"] = "true"
|
||||
timeout = aiohttp.ClientTimeout(total=30)
|
||||
timeout = aiohttp.ClientTimeout(total=60)
|
||||
async with aiohttp.ClientSession(timeout=timeout) as s:
|
||||
async with s.get(url, params=params, timeout=timeout) as r:
|
||||
if r.status != 200:
|
||||
|
||||
Reference in New Issue
Block a user