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

Transfer history pagination API call #418

Open
manuelwedler opened this issue May 20, 2020 · 1 comment
Open

Transfer history pagination API call #418

manuelwedler opened this issue May 20, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@manuelwedler
Copy link
Contributor

manuelwedler commented May 20, 2020

Currently the pagination of the transfer history happens in the frontend. All payment events are queried and then filtered.

Only the events that are displayed should be queried from the backend by using the limit and offset parameters.

@manuelwedler manuelwedler added the enhancement New feature or request label May 20, 2020
@manuelwedler manuelwedler added this to the Product Backlog milestone May 20, 2020
@manuelwedler manuelwedler added the help wanted Extra attention is needed label Jun 12, 2020
@manuelwedler
Copy link
Contributor Author

manuelwedler commented Jun 12, 2020

I tried to implement this in different ways. The issue is the search functionality that filters the history by a user input. The filtering has to be done in the frontend at the moment, as the current API implementation does not allow a filtering as we would need it. That means that to apply the filtering correctly we need to query more events than are displayed. Every solution I could think of gets overly complicated or has some tradeoffs.

We need a change in the API to implement this properly. I think there are two good solutions to this problem now:

  1. We only allow to filter the page by an address. So putting WETH into the search filter would not work anymore but the user could use the autocomplete to set the address of WETH. By that way there can't be more than one token or payment partner address that matches the search filter. For this solution Query all payments with a specific payment partner raiden#6283 would need to get implemented.

  2. We change the /payments endpoint to allow filtering for multiple token and payment partner addresses. Now we could get all token and contact addresses that match the search filter and send them in our query.

For both proposed solutions it would be good to have a way to get the total number of payment events that exist for the queried token and payment partner address. So we would know what limit and offset parameters to apply for getting the newest payment events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant