Skip to content

Conversation

@jribbink
Copy link
Contributor

@jribbink jribbink commented Dec 9, 2025

Closes #2715

Adds useFund hook that wraps @onflow/payments client for creating funding sessions. Follows existing React Query mutation patterns.

  • Add @onflow/payments as dependency
  • Create useFund hook with full TypeScript support
  • Export from hooks index
  • Add unit tests

Adds useFund hook that wraps @onflow/payments client for creating
funding sessions. Follows existing React Query mutation patterns.

- Add @onflow/payments as dependency
- Create useFund hook with full TypeScript support
- Export from hooks index
- Add unit tests
@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2025

⚠️ No Changeset found

Latest commit: 039f143

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Dec 9, 2025

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

Project Deployment Review Updated (UTC)
react-sdk-demo Ready Ready Preview, Comment Dec 16, 2025 4:22pm

@jribbink jribbink changed the title feat(react-sdk): add useFund hook for funding sessions Add useFund hook for funding sessions Dec 11, 2025
- Change providers type from FundingProvider[] to FundingProviderFactory[]
- Update test mocks to use factory functions
- Fix payments package tsconfig.json to correctly generate types
- Fix error assertion in tests to match wrapped error message
Base automatically changed from jribbink/relay-integration to feature/fund December 16, 2025 05:41
Resolved conflicts by:
- Moving funding hooks (useFund, useFundingCapabilities, usePaymentsClient) to packages/react-core
- Added PaymentsClientContext to react-core/src/core/context.ts
- Updated hooks to use TestProvider instead of FlowProvider in tests
- Added @onflow/payments dependency to react-core package
- Updated react-sdk to depend on both @onflow/react-core and @onflow/payments
@jribbink jribbink marked this pull request as ready for review December 16, 2025 15:51
@jribbink jribbink requested a review from a team as a code owner December 16, 2025 15:51
This method aggregates capabilities from all configured funding providers,
enabling the useFundingCapabilities hook to work correctly.
Remove try/catch error handling to let errors propagate naturally.
@github-actions
Copy link
Contributor

📦 Changeset Required

This PR appears to modify package code but doesn't include a changeset.

A changeset helps track version changes and generate release notes.

To add a changeset:

npm run changeset

To skip this check (if no version bump is needed):

Add the skip-changeset label to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants