-
Notifications
You must be signed in to change notification settings - Fork 133
Add useFund hook for funding sessions
#2737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/fund
Are you sure you want to change the base?
Conversation
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
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
useFund hook for funding sessions
- 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
… jribbink/fund-react-hook
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
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.
📦 Changeset RequiredThis 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 changesetTo skip this check (if no version bump is needed):Add the |
Closes #2715
Adds useFund hook that wraps @onflow/payments client for creating funding sessions. Follows existing React Query mutation patterns.