feat(contractor): integrate payment-method and bank-account hooks into PaymentMethod#2303
feat(contractor): integrate payment-method and bank-account hooks into PaymentMethod#2303serikjensen wants to merge 3 commits into
Conversation
|
@cursoragent you should be able to bring this one up to date with main. The PRs that is based on for the useContractorBankAccount and payment method hooks have been merged so you should be able to base the integration off of that |
|
The format check failed on commit What I did to fix it:
The latest commit on the branch is now |
…Form hook Migrate the Contractor PaymentMethod component from its monolithic inline-form pattern to the hook-based architecture. - Add useContractorPaymentMethodForm: a single headless hook for the combined payment-type + bank-account form, with value-aware excludeFields (Check hides and de-requires the bank fields) per the useContractorDetailsForm precedent. - Rewrite PaymentMethod.tsx to BaseBoundaries + thin Root + SDKFormProvider, preserving the event surface (CREATED / UPDATED / DONE) and masked-account behavior. - Harden pre-migration test coverage and add hook unit tests. - Export the hook, schema, error codes, and fields from src/index.ts. - Remove the now-unused PaymentTypeForm/BankAccountForm and inline schema. Co-authored-by: Cursor <cursoragent@cursor.com>
0f70708 to
3c26a1e
Compare


Summary
PaymentMethodcomponent to composeuseContractorPaymentMethodFormanduseContractorBankAccountFormviacomposeSubmitHandler, replacing the oldPaymentTypeForm/BankAccountForminternals.Notes
useContractorBankAccountForm) and feat(contractor): add useContractorPaymentMethodForm hook #2302 (useContractorPaymentMethodForm). Because it targetsmain, it currently shows those hooks' code as well; once feat(contractor): add useContractorBankAccountForm hook #2301 and feat(contractor): add useContractorPaymentMethodForm hook #2302 merge, rebase this branch onmainand the diff will narrow to the integration changes.Test plan
PaymentMethodcomponent + both hook test suites pass (26/26)npm run deriveregenerates API report + docsMade with Cursor