Skip to content

Commit

Permalink
Fixed regression in get_transactions method pagination. (#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout authored Oct 10, 2023
1 parent 7f56968 commit de4afb2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].

## [Unreleased]

### Fixed

- tzkt: Fixed regression in `get_transactions` method pagination.

## [6.5.12] - 2023-09-15

### Fixed
Expand Down
7 changes: 5 additions & 2 deletions src/dipdup/datasources/tzkt/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,14 +629,17 @@ async def get_transactions(
params = self._get_request_params(
first_level=first_level,
last_level=last_level,
offset=offset,
# NOTE: This is intentional
offset=None,
limit=limit,
select=TRANSACTION_OPERATION_FIELDS,
values=True,
cursor=True,
sort='level',
status='applied',
)
# TODO: TzKT doesn't support sort+cr currently
if offset is not None:
params['id.gt'] = offset

if addresses and not code_hashes:
params[f'{field}.in'] = ','.join(addresses)
Expand Down
2 changes: 2 additions & 0 deletions src/dipdup/indexes/operation/matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ def match_operation_subgroup(
transaction = handler[2][-1]
if isinstance(transaction, OperationData):
id_list.append(transaction.id)
elif isinstance(transaction, Origination):
id_list.append(transaction.data.id)
elif isinstance(transaction, Transaction):
id_list.append(transaction.data.id)
else:
Expand Down

0 comments on commit de4afb2

Please sign in to comment.