Skip to content

fix(watcher): load every withdrawal token page - #29

Open
raondevbaek wants to merge 1 commit into
rosen-bridge:devfrom
raondevbaek:fix/watcher-withdrawal-pagination
Open

fix(watcher): load every withdrawal token page#29
raondevbaek wants to merge 1 commit into
rosen-bridge:devfrom
raondevbaek:fix/watcher-withdrawal-pagination

Conversation

@raondevbaek

Copy link
Copy Markdown

Fixes #10.

The Watcher withdrawal selector now fetches /address/assets pages until the reported total is reached, so tokens beyond the first 20 can be selected. It keeps SWR with a separate cache key for the complete list, advances offsets by the number of returned items, and rejects an unexpectedly empty page instead of looping or presenting a partial result.

Validation on current dev (83c4330), Node 25.9.0 and the repository's npm 11.6.2:

  • Nine tests pass: empty/single-page lists, 21/40/45 assets, server-limited page sizes, a later request failure, and an empty page before the reported total. Six of these fail with the original one-page loading behavior.
  • npm run bootstrap --workspace=@rosen-bridge/watcher-app and npm run type-check --workspace=@rosen-bridge/watcher-app pass.
  • npm run build --workspace=@rosen-bridge/watcher-app -- --webpack passes; formatting/lint checks pass for the changed files.
  • The built withdrawal screen was exercised against a local fake API: requests used offsets 0, 20, and 40; the selector displayed 45 options and successfully selected the last token. No live wallet or withdrawal was used.

I saw #27 already addresses this issue; this is an alternative with regression tests and completed build/UI validation. I'd like this submission considered for the issue's listed 500 RSN bounty.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
ui-guard Skipped Skipped Sep 9, 2026 11:42am UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – ui-guard September 9, 2026 11:42 Inactive
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.

Add pagination to Watcher withdrawal token select

1 participant