feat: integrate frontend plans with live API - #1049
Merged
ONEONUORA merged 4 commits intoAug 23, 2026
Merged
Conversation
Contributor
|
@JoyLight00 |
Contributor
Author
Done Boss |
anonfedora
added a commit
to anonfedora/InheritX
that referenced
this pull request
Aug 23, 2026
…ate plan update call Rebased fix/beneficiary-allocation-validation-1031 onto upstream/master to pick up Fracverse#1049 (wire frontend plans to the live API) and Fracverse#1052 (wallet-signed pings), which landed after this branch was created. Fracverse#1049 changed EditPlanPage.handleSaved to persist the panel's callback value via plansAPI.updatePlan(planId, updated) a second time, passing the full Plan object as if it were an UpdatePlanRequest. That no longer type-checks now that UpdatePlanRequest is a proper DTO, and it was always redundant: EditInheritancePlanPanel already calls plansAPI.updatePlan itself and hands the backend-confirmed plan back via onSaved. The page now just syncs local state with that result.
ONEONUORA
pushed a commit
that referenced
this pull request
Aug 24, 2026
…alidation (#1053) * fix(frontend): map full beneficiary list and enforce bps allocation validation CreateInheritancePlanPanel and EditInheritancePlanPanel only transmitted beneficiaries[0]?.name to the backend, silently dropping every other beneficiary's wallet address, allocation, and fiat off-ramp config. Separately, plansAPI.createPlan/updatePlan sent a request shape (title, fee, net_amount, bank_account_number, two_fa_code, ...) that never matched the real backend's Plan/UpdatePlanRequest contract at all. - plans.ts / inheritance.ts: CreatePlanRequest/UpdatePlanRequest now mirror the backend's actual Plan/UpdatePlanRequest structs (owner, token, amount, beneficiaries: PlanBeneficiaryRequest[], grace_period, earn_yield, yield_rate_bps); added the missing updatePlan() to inheritance.ts. - New BeneficiaryAllocationRow component centralizes beneficiary row UI, strict basis-point validation (must total exactly 10,000 bps), Stellar StrKey address validation, duplicate-address detection, and fiat anchor/daily-limit encoding shared by both panels. - Both panels now build and submit the full beneficiary list, surface clear per-field and total-allocation error messages, and correctly round-trip the backend's PlanResponse back into the UI. - Updated MSW mocks/tests to match the corrected contract. Closes #1031 * fix(frontend): rebase onto upstream live-API integration, drop duplicate plan update call Rebased fix/beneficiary-allocation-validation-1031 onto upstream/master to pick up #1049 (wire frontend plans to the live API) and #1052 (wallet-signed pings), which landed after this branch was created. #1049 changed EditPlanPage.handleSaved to persist the panel's callback value via plansAPI.updatePlan(planId, updated) a second time, passing the full Plan object as if it were an UpdatePlanRequest. That no longer type-checks now that UpdatePlanRequest is a proper DTO, and it was always redundant: EditInheritancePlanPanel already calls plansAPI.updatePlan itself and hands the backend-confirmed plan back via onSaved. The page now just syncs local state with that result.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces direct
localStoragemock-store usage in the frontend plan and KYC workflows with live backend API integration.Changes
NEXT_PUBLIC_USE_MOCK_DATA.useApiQuery.GET /api/kyc/status.GET /api/plans/{id}route.NEXT_PUBLIC_USE_MOCK_DATA=true.Configuration
Set
NEXT_PUBLIC_USE_MOCK_DATA=trueto use the local demo store.Validation
git diff --checkpassed.cargois unavailable in the container.Closes #1032