Skip to content

[WEB3] Frontend: Integrate Freighter for withdraw Action #202#207

Merged
ogazboiz merged 2 commits intoLabsCrypt:mainfrom
CMI-James-OD:codex/issue-202-withdraw-freighter-flowfi
Feb 26, 2026
Merged

[WEB3] Frontend: Integrate Freighter for withdraw Action #202#207
ogazboiz merged 2 commits intoLabsCrypt:mainfrom
CMI-James-OD:codex/issue-202-withdraw-freighter-flowfi

Conversation

@CMI-James
Copy link
Copy Markdown
Contributor

Description

Integrate the frontend Withdraw action with Freighter/Soroban transaction flow so recipients can claim funds from incoming streams with wallet signing.

Closes #202

Changes proposed

What were you told to do?

I was asked to:

  • implement withdraw transaction builder/wallet flow,
  • map the Withdraw UI action to signing/submission,
  • add success/error state handling and notifications.

What did I do?

Wired incoming Withdraw button to Soroban call path

Updated frontend/components/dashboard/dashboard-view.tsx:

  • imports withdrawFromStream from frontend/lib/soroban.ts,
  • adds handleIncomingWithdraw that:
    • calls Freighter/Soroban withdraw transaction,
    • shows toast loading/success/error states,
    • refreshes dashboard snapshot from backend after confirmation.

Extended IncomingStreams component for real withdraw callbacks

Updated frontend/components/IncomingStreams.tsx:

  • added onWithdraw(stream) prop,
  • added withdrawingStreamId prop for per-row loading state,
  • replaced mock simulated withdraw with callback-driven action.

Kept standalone incoming page compatible

Updated frontend/app/incoming/page.tsx to pass required onWithdraw prop to IncomingStreams.

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.
  • My commit messages styles matches our requested structure.
  • My code additions will fail neither code linting checks nor unit test.
  • I am only making changes to files I was requested to.

Screenshots / Testing Evidence

Validated with:

lint-staged hook passed on commit (frontend eslint task succeeded)
npm run build --workspace=frontend

Build currently fails in this environment due external Google Fonts fetch/network errors, unrelated to withdraw logic.

@ogazboiz ogazboiz merged commit 09113d9 into LabsCrypt:main Feb 26, 2026
0 of 3 checks passed
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.

[WEB3] Frontend: Integrate Freighter for withdraw Action

2 participants