desktop-wallet icon indicating copy to clipboard operation
desktop-wallet copied to clipboard

Add pagination to Namespaces view (only a fixed 100 namespaces will show)

Open cryptoBeliever opened this issue 4 years ago • 4 comments

  1. Create over 20 namespaces for one account.
  2. Go go to namespaces view.

Result: Only 20 namespaces is presented. Expected result: All namespaces should be presented.

It's because wallet is using request without pagination: /namespaces?ownerAddress=

cryptoBeliever avatar Dec 24 '20 20:12 cryptoBeliever

Now pageSize was changed to 100. So first 100 transactions is presented. Still if someone have above 100 namespaces then only 100 will be presented. I will mark it as enhancement proposition because it's very unlikely that someone will have above 100 namespaces.

cryptoBeliever avatar Feb 02 '21 21:02 cryptoBeliever

That's completely right! To make the pagination to be work, we maybe need to know total count of namespaces not limited by number per page on PageResponse. Anybody take this problem on rest side?

boldchains avatar Feb 03 '21 17:02 boldchains

we don't have the total count for any of the pagination endpoint on rest. this is intended by design. Catapult-rest should be a light weight rest-api server and should not to expensive aggregation / scan jobs. @james-lin71 we had this discussion already, and the decision was not to use count.

rg911 avatar Feb 03 '21 17:02 rg911

Seems like this is the best effort we can do at the moment and that the issue was already discussed internally. I'd like to close this issue, and add it to Known Issues list.

coiki avatar Jun 07 '21 07:06 coiki