fix(vesting): surface all schedules per recipient in UI (#303) - Vest…#317
Merged
zachyo merged 1 commit intoJun 30, 2026
Merged
Conversation
… - VestingSection/PersonalDashboard: fetch schedule count then load all schedules in parallel; store as VestingScheduleInfo[] instead of a single nullable value - VestingCard: show 'Schedule N of M' badge when scheduleCount > 1 - ClaimVesting: iterate 0..count, render one ScheduleCard per schedule, each with its own progress bar and Claim button passing the correct index to release() - VestingForm (release + revoke): add optional Schedule Index field so admins can target any schedule per recipient - useSoroban: expose fetchVestingScheduleCount and thread scheduleIndex through fetchVestingSchedule - useTransactionSimulator: thread scheduleIndex through checkVestingRelease and checkVestingRevoke Closes soropad#303
|
@blockchainrafik Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #303
Summary
This PR updates the vesting UI to fully support multiple vesting schedules per recipient.
Although the vesting contract has supported indexed schedules since Wave 5 (#40), the frontend always assumed a single schedule (
index = 0). As a result, recipients with multiple grants (for example, follow-on allocations after a completed vesting period) could only view and claim their first schedule.The UI now discovers every schedule for a recipient using
get_schedule_count()and renders each schedule independently, ensuring all vesting grants are visible and claimable.Problem
The vesting contract stores schedules using
(Address, index)and exposes:get_schedule_count(recipient)get_schedule(recipient, index)release(recipient, index)revoke(recipient, index)The frontend ignored these indexed APIs and always operated on the default schedule (
index = 0).This caused several issues:
Changes
ClaimVesting.tsx
fetchScheduleCount()when looking up a recipient.0..count-1) in parallel.scheduleIndextobuildReleaseTx().PersonalDashboard.tsx
with:
VestingSection.tsx
vestingSchedules.VestingCardper schedule instead of assuming a single schedule.VestingCard.tsx
to distinguish multiple vesting grants.
VestingForm.tsx
Adds an optional Schedule Index field to both:
This allows administrators to target a specific schedule for a recipient.
useSoroban.ts
fetchVestingScheduleCount().scheduleIndex?: numberthroughfetchVestingSchedule().useTransactionSimulator.ts
scheduleIndex?: numberthrough:checkVestingRelease()checkVestingRevoke()The underlying simulator already supported indexed schedules; this change exposes that functionality through the hook.
Result
After these changes:
0.The UI is now fully aligned with the indexed vesting functionality already supported by the smart contract.