Skip to content

Commit de4afb2

Browse files
Fixed regression in get_transactions method pagination. (#867)
1 parent 7f56968 commit de4afb2

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

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

7+
## [Unreleased]
8+
9+
### Fixed
10+
11+
- tzkt: Fixed regression in `get_transactions` method pagination.
12+
713
## [6.5.12] - 2023-09-15
814

915
### Fixed

src/dipdup/datasources/tzkt/datasource.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,14 +629,17 @@ async def get_transactions(
629629
params = self._get_request_params(
630630
first_level=first_level,
631631
last_level=last_level,
632-
offset=offset,
632+
# NOTE: This is intentional
633+
offset=None,
633634
limit=limit,
634635
select=TRANSACTION_OPERATION_FIELDS,
635636
values=True,
636-
cursor=True,
637637
sort='level',
638638
status='applied',
639639
)
640+
# TODO: TzKT doesn't support sort+cr currently
641+
if offset is not None:
642+
params['id.gt'] = offset
640643

641644
if addresses and not code_hashes:
642645
params[f'{field}.in'] = ','.join(addresses)

src/dipdup/indexes/operation/matcher.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ def match_operation_subgroup(
204204
transaction = handler[2][-1]
205205
if isinstance(transaction, OperationData):
206206
id_list.append(transaction.id)
207+
elif isinstance(transaction, Origination):
208+
id_list.append(transaction.data.id)
207209
elif isinstance(transaction, Transaction):
208210
id_list.append(transaction.data.id)
209211
else:

0 commit comments

Comments
 (0)