diff --git a/tests/transactions.py b/tests/transactions.py index 060c9d4..265efc6 100644 --- a/tests/transactions.py +++ b/tests/transactions.py @@ -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) diff --git a/trc20wrapper/transactions.py b/trc20wrapper/transactions.py index a4ca036..284ad07 100644 --- a/trc20wrapper/transactions.py +++ b/trc20wrapper/transactions.py @@ -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: