Skip to content

Feat/transaction history gap issue #1568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 25, 2025
Merged

Conversation

mirceahasegan
Copy link
Contributor

Context

Fetching a limited number of transactions from all addresses and displaying them aggregated could lead to gaps in the tx history when one transaction has been very active (i.e. 100 transactions in the past year, with 10 of them in the past day), and another transaction is less active (one transaction one year ago).
Fetching 10 per addres and aggregating the results will lead to a history of one transaction one year ago, and 10 transactions in the past day, having a gap of 90 transactions from the active address.

Proposed Solution

Update fetchInitialTransactions:

  • If there is a single address, it returns the most recent ones up to historicalTransactionsFetchLimit.
  • If there are more than one address, it returns all transaction from all addresses, one month back from the most recent transaction.

Important Changes Introduced

Fixed an issue with fetchSequentially which ignored the PagingOptions.page arg, leading to an infinite loop.
Removing the positional arg page is a breaking change.

Copy link
Member

@rhyslbw rhyslbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AngelCastilloB and others added 2 commits January 25, 2025 14:24
…equentially

fetchSequentially page was specified in 2 places (paging options and
a positional page parameter).
Calling it with `page` in PaginationOptions ignores the page, leading
to fetch of page: 1 infinitely.
Removed the positional `page` arg to avoid confusion, and use the
one from paginationOptions
@mirceahasegan mirceahasegan force-pushed the feat/transaction-history-gap-issue branch from b718bbb to f2a815f Compare January 25, 2025 13:24
@rhyslbw rhyslbw merged commit 4c3957a into master Jan 25, 2025
5 of 6 checks passed
@rhyslbw rhyslbw deleted the feat/transaction-history-gap-issue branch January 25, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants