Skip to content

frontend: Implement Multi-Beneficiary Form Controls & Allocation Validation in Plan Creation & Editing #1031

Description

@ONEONUORA

Problem Description

In frontend/components/plans/CreateInheritancePlanPanel.tsx and EditInheritancePlanPanel.tsx, the UI allows users to add multiple beneficiaries, set their allocation percentages, wallet addresses, and off-ramp anchor options. However, when submitting the form to plansAPI.createPlan, only the first beneficiary's name (beneficiaries[0]?.name) is transmitted, while all other beneficiaries, basis point allocations (allocation_bps), wallet addresses, and fiat anchor configs are discarded.

Missing Functionality & Specs

  • Update CreateInheritancePlanPanel.tsx and EditInheritancePlanPanel.tsx to map the full list of beneficiaries into PlanBeneficiaryRequest[].
  • Enforce strict allocation validation in basis points (100% = 10,000 bps) before form submission.
  • Pass beneficiary wallet addresses, fiat anchor IDs, and daily fiat limits to both backend API requests and on-chain contract parameters.
  • Provide clear error messaging if allocations do not equal 10,000 bps or if wallet addresses fail Stellar public key validation.

Affected Files

  • frontend/components/plans/CreateInheritancePlanPanel.tsx
  • frontend/components/plans/EditInheritancePlanPanel.tsx
  • frontend/app/lib/api/plans.ts
  • frontend/app/lib/api/inheritance.ts

Activity

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

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions