Skip to content
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

fix history events and txs pagination #1359

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edouardparis
Copy link
Member

The problem:
We display the button if the size of the list is a multiple of the page size. Otherwise, we assume that the user has reached a partial page, indicating they've reached the bottom. However, since we chose to include all transactions with the same block time on a single page (because it's not possible to order them by block index in the database, as we don't store the block index), this can cause the page size to exceed the set limit. As a result, the list size may not be a multiple of the page size.

The solution:
keep in the state if the last fetched page has a length inferior of the expected page size and do not display the button 'See more' then as we reached the bottom.

The problem:
We display the button if the size of the list is a multiple of the page
size. Otherwise, we assume that the user has reached a partial page,
indicating they've reached the bottom. However, since we chose to
include all transactions with the same block time on a single page
(because it's not possible to order them by block index in the database,
as we don't store the block index), this can cause the page size to
exceed the set limit. As a result, the list size may not be a multiple
of the page size.

The solution:
keep in the state if the last fetched page has a length inferior
of the expected page size and do not display the button 'See more'
then as we reached the bottom.
@jp1ac4
Copy link
Collaborator

jp1ac4 commented Sep 20, 2024

Perhaps it's not directly related to this PR, but when testing on my home page, I initially see one payment shown, and then I have to click "See more" four times before the remaining two payments appear and the button disappears. Would it be possible to filter the txs each time so that as soon as I click once on "See more", the remaining payments appear?

@edouardparis
Copy link
Member Author

#1359 (comment)
Why do you mean unrelated to this PR ? Do you have the same behavior on master ?

@jp1ac4
Copy link
Collaborator

jp1ac4 commented Sep 20, 2024

Sorry, I meant that it might be an existing issue that should be addressed in a different PR.

The behaviour is different on master: on the home page, when I click "See more" once, the button disappears and no new rows appear, whereas in this PR, I can click on "See more" more than once, and after the fourth click, two more payments appear.

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.

2 participants