https://t.me/+DOylgFv1jyJlNzM0
Description
The stream detail page does not expose a withdraw action for recipients. This issue adds a Withdraw button visible only to the stream's recipient when there is a non-zero claimable amount. Clicking it calls POST /streams/:id/withdraw, feeds the returned txHash into the existing TransactionTracker component, and handles success/error states gracefully.
Acceptance Criteria
Files to Touch
src/app/streams/[id]/page.tsx — add Withdraw button and handler
src/hooks/useWithdrawStream.ts — mutation hook wrapping the API call
src/lib/api/streams.ts — add withdrawStream(id) API helper
src/components/TransactionTracker.tsx — confirm it accepts txHash prop (no change expected)
https://t.me/+DOylgFv1jyJlNzM0
Description
The stream detail page does not expose a withdraw action for recipients. This issue adds a Withdraw button visible only to the stream's recipient when there is a non-zero claimable amount. Clicking it calls
POST /streams/:id/withdraw, feeds the returnedtxHashinto the existingTransactionTrackercomponent, and handles success/error states gracefully.Acceptance Criteria
connectedWallet === stream.recipientandclaimableAmount > 0POST /api/v1/streams/:id/withdraw; button shows loading spinner during the requestTransactionTrackeris rendered with the returnedtxHash; claimable amount resets to 0 optimisticallyFiles to Touch
src/app/streams/[id]/page.tsx— add Withdraw button and handlersrc/hooks/useWithdrawStream.ts— mutation hook wrapping the API callsrc/lib/api/streams.ts— addwithdrawStream(id)API helpersrc/components/TransactionTracker.tsx— confirm it acceptstxHashprop (no change expected)