diff --git a/pytonapi/async_tonapi/methods/accounts.py b/pytonapi/async_tonapi/methods/accounts.py index 5196c5a..b05ed4f 100644 --- a/pytonapi/async_tonapi/methods/accounts.py +++ b/pytonapi/async_tonapi/methods/accounts.py @@ -118,7 +118,7 @@ async def get_jettons_history( """ method = f"v2/accounts/{account_id}/jettons/history" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt if subject_only: params["subject_only"] = "true" @@ -158,7 +158,7 @@ async def get_jettons_history_by_jetton( """ method = f"v2/accounts/{account_id}/jettons/{jetton_id}/history" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt if subject_only: params["subject_only"] = "true" @@ -264,7 +264,7 @@ async def get_events( """ method = f"v2/accounts/{account_id}/events" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt if subject_only: params["subject_only"] = "true" @@ -338,7 +338,7 @@ async def get_nft_history( """ method = f"v2/accounts/{account_id}/nfts/history" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt if subject_only: params["subject_only"] = "true" diff --git a/pytonapi/async_tonapi/methods/inscriptions.py b/pytonapi/async_tonapi/methods/inscriptions.py index 75ab4e0..66097e9 100644 --- a/pytonapi/async_tonapi/methods/inscriptions.py +++ b/pytonapi/async_tonapi/methods/inscriptions.py @@ -44,7 +44,7 @@ async def get_inscription_history( """ method = f"v2/experimental/accounts/{account_id}/inscriptions/history" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt headers = {"Accept-Language": accept_language} response = await self._get(method=method, params=params, headers=headers) @@ -70,7 +70,7 @@ async def get_inscription_history_by_ticker( """ method = f"v2/experimental/accounts/{account_id}/inscriptions/{ticker}/history" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt headers = {"Accept-Language": accept_language} response = await self._get(method=method, params=params, headers=headers) diff --git a/pytonapi/async_tonapi/methods/nft.py b/pytonapi/async_tonapi/methods/nft.py index f8e3c8c..9bd36c6 100644 --- a/pytonapi/async_tonapi/methods/nft.py +++ b/pytonapi/async_tonapi/methods/nft.py @@ -124,7 +124,7 @@ async def get_nft_history( """ method = f"v2/nfts/{account_id}/history" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt if subject_only: params["subject_only"] = "true" diff --git a/pytonapi/tonapi/methods/accounts.py b/pytonapi/tonapi/methods/accounts.py index 8bde7b5..ebb2828 100644 --- a/pytonapi/tonapi/methods/accounts.py +++ b/pytonapi/tonapi/methods/accounts.py @@ -118,7 +118,7 @@ def get_jettons_history( """ method = f"v2/accounts/{account_id}/jettons/history" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt if subject_only: params["subject_only"] = "true" @@ -158,7 +158,7 @@ def get_jettons_history_by_jetton( """ method = f"v2/accounts/{account_id}/jettons/{jetton_id}/history" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt if subject_only: params["subject_only"] = "true" @@ -264,7 +264,7 @@ def get_events( """ method = f"v2/accounts/{account_id}/events" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt if subject_only: params["subject_only"] = "true" @@ -338,7 +338,7 @@ def get_nft_history( """ method = f"v2/accounts/{account_id}/nfts/history" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt if subject_only: params["subject_only"] = "true" diff --git a/pytonapi/tonapi/methods/blockchain.py b/pytonapi/tonapi/methods/blockchain.py index 845c97f..65ad156 100644 --- a/pytonapi/tonapi/methods/blockchain.py +++ b/pytonapi/tonapi/methods/blockchain.py @@ -197,8 +197,8 @@ def get_account_transactions( """ method = f"v2/blockchain/accounts/{account_id}/transactions" params = {"limit": limit} - if before_lt: params["before_lt"] = before_lt # noqa E701 - if after_lt: params["after_lt"] = after_lt # noqa E701 + if before_lt is not None: params["before_lt"] = before_lt # noqa E701 + if after_lt is not None: params["after_lt"] = after_lt # noqa E701 response = self._get(method=method, params=params) return Transactions(**response) diff --git a/pytonapi/tonapi/methods/inscriptions.py b/pytonapi/tonapi/methods/inscriptions.py index eb4a2eb..9405f00 100644 --- a/pytonapi/tonapi/methods/inscriptions.py +++ b/pytonapi/tonapi/methods/inscriptions.py @@ -44,7 +44,7 @@ def get_inscription_history( """ method = f"v2/experimental/accounts/{account_id}/inscriptions/history" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt headers = {"Accept-Language": accept_language} response = self._get(method=method, params=params, headers=headers) @@ -70,7 +70,7 @@ def get_inscription_history_by_ticker( """ method = f"v2/experimental/accounts/{account_id}/inscriptions/{ticker}/history" params = {"limit": limit} - if before_lt: + if before_lt is not None: params["before_lt"] = before_lt headers = {"Accept-Language": accept_language} response = self._get(method=method, params=params, headers=headers) diff --git a/pytonapi/tonapi/methods/nft.py b/pytonapi/tonapi/methods/nft.py index 0f11ba9..2da3ed6 100644 --- a/pytonapi/tonapi/methods/nft.py +++ b/pytonapi/tonapi/methods/nft.py @@ -120,7 +120,7 @@ def get_nft_history( """ method = f"v2/nfts/{account_id}/history" params = {"limit": limit} - if before_lt: params["before_lt"] = before_lt # noqa:E701 + if before_lt is not None: params["before_lt"] = before_lt # noqa:E701 if subject_only: params["subject_only"] = "true" # noqa:E701 if start_date: params["start_date"] = start_date # noqa:E701 if end_date: params["end_date"] = end_date # noqa:E701