Skip to content

Commit

Permalink
Transactions fullscan fix (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsereda authored Jul 11, 2023
1 parent 0c1d8da commit cfc5995
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/dipdup/datasources/tzkt/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ async def get_transactions(
TRANSACTION_OPERATION_FIELDS,
cursor=True,
status='applied',
sort='level',
)
if addresses and not code_hashes:
params[f'{field}.in'] = ','.join(addresses)
Expand Down Expand Up @@ -831,6 +832,7 @@ def _get_request_params(
limit: int | None = None,
select: tuple[str, ...] | None = None,
cursor: bool = False,
sort: str | None = None,
**kwargs: Any,
) -> dict[str, Any]:
params: dict[str, Any] = {
Expand All @@ -847,6 +849,13 @@ def _get_request_params(
params['offset'] = offset
if select:
params['select'] = ','.join(select)
if sort:
if sort.startswith('-'):
sort_param_name = 'sort.desc'
sort = sort[1:]
else:
sort_param_name = 'sort'
params[sort_param_name] = sort
return {
**params,
**kwargs,
Expand Down

0 comments on commit cfc5995

Please sign in to comment.