[Frontend] Stop stripping non-digits from stream IDs before BigInt conversion in batch claim
Overview & Background
Batch claim converts stream IDs with BigInt(item.stream.id.replace(/\D/g, "") || "0") (frontend/src/components/dashboard/BatchClaimDrawer.tsx:19), throwing away every non-digit. If stream.id is a UUID or any non-purely-numeric identifier, this silently produces 0n or a truncated wrong number and the batch withdrawal is submitted against wrong/nonexistent stream IDs. The codebase already acknowledges both ID shapes: useStreams.ts:42-48 distinguishes on-chain streamId from database UUID id, and dashboard-view.tsx:424 guards links with /^\d+$/.test(stream.id). There is no validation or user-visible error before the transaction is built — a financial-operation correctness bug.
Technical Specification & Architecture
- Use the numeric on-chain
streamIdfield explicitly (e.g.BigInt(stream.streamId)). - Validate
^\d+$first and skip/flag invalid rows with a user-visible error instead of coercing to0n. - Disable submission when any selected row has an invalid ID.
Target Files
frontend/src/components/dashboard/BatchClaimDrawer.tsx
Acceptance Criteria
- [ ] Batch claim never submits
0nor truncated IDs. - [ ] Invalid rows surface a clear error and block submission.
- [ ] Tests cover UUID-shaped IDs and mixed-validity selections.
@Thobadd has applied to work on this issue as part of the Stellar Wave Program's 11th wave.
Hi maintainer,
I'd like to take a shot at this issue. I went through the checkout flow and looked at the XLM checkout modal component. I can see exactly what's happening when a user rejects the transaction in Freighter — the promise gets rejected, but there's no catch around it. The modal just sits there in its loading state, leaving the user staring at a spinner with no feedback. Since rejecting a transaction is a normal thing to do, the app shouldn't freeze.
My plan is to wrap the Freighter signing call in a try/catch and specifically detect the rejection case. From what I've seen with the Freighter API, user rejection usually comes back as an error containing something like "User declined" or "User rejected the request." I'll check for that pattern to distinguish an intentional rejection from a real failure like a network issue. On rejection, I'll reset the modal's loading state so the UI doesn't freeze and surface a friendly toast like "Transaction rejected in Freighter. No funds were sent." For genuine errors, I'll keep a separate message so we don't conflate the two.
A couple of things I want to get right: first, the loading state needs to be reset in a finally block so we never leave the button disabled if something unexpected throws. Second, I'll make sure the toast component matches the pattern already used in the codebase rather than introducing a new one. I'll also manually verify the flow by rejecting in the Freighter extension to confirm the modal returns to a usable state.
I've contributed to a few React/TypeScript projects before and I'm comfortable with error-handling patterns like this. I'll keep the PR scoped to just this component, and the PR description will include the required closing tag as requested. Happy to adjust the message copy if you have a preferred tone. Let me know if you'd like me to proceed or if there's anything else you want covered in scope.
Thanks
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Thobadd to this issue.
@xeron-droid has applied to work on this issue as part of the Stellar Wave Program's 11th wave.
i can solve asap
ℹ️ Repo Maintainers: To accept this application, review their application or assign @xeron-droid to this issue.
Congratulations, @xeron-droid! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.
🧑💻 @xeron-droid: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
This issue has been completed by @xeron-droid as part of the Stellar Wave Program's 11th Wave 🥳
😎 @xeron-droid: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.