interledger-pay
interledger-pay copied to clipboard
Replace list grants request for rhyza
The wallet's grants list (both the plain and the paginated versions) still loads grants from Rafiki. Grants now live in Rhyza, so the list should come from Rhyza's admin grants API.
Rhyza filters by one wallet address per request and pages with a cursor. The wallet today queries all of the user's wallet addresses at once and uses page numbers with a total count. So we need to either adapt the backend to Rhyza's model or change how the grants page paginates.
Scope
- Load the user's grants from Rhyza for all of their wallet addresses, and keep the current filters (wallet address, state, sort order).
- Keep the ownership check: a user can only list grants for their own wallet addresses.
- Map Rhyza grants to the response the frontend expects, including access limits and intervals.
- Decide on pagination: switch the grants page to cursor-based, or keep page numbers and adapt the results in the backend.
- Remove the Rafiki list grants requests once nothing uses them.
Acceptance criteria
- The grants page shows the same grants as before for users with one or several wallet addresses.
- Filtering by wallet address and state, sorting, and moving between pages all work.
- Asking for grants on a wallet address the user doesn't own is rejected.