Skip to content

feat(employee-portal): add vesting escrow claim section#301

Open
Majormaxx wants to merge 1 commit intoGildado:mainfrom
Majormaxx:feat/employee-vesting-claim-portal
Open

feat(employee-portal): add vesting escrow claim section#301
Majormaxx wants to merge 1 commit intoGildado:mainfrom
Majormaxx:feat/employee-vesting-claim-portal

Conversation

@Majormaxx
Copy link
Copy Markdown

Summary

  • Adds VestingClaimSection component to EmployeePortal.tsx that fetches the employee's live claimable balance from the vesting_escrow Soroban contract via rpc.Server.simulateTransaction() on get_claimable_amount()
  • Claim button is disabled when the claimable amount is zero or the wallet is disconnected; enabled with the employee's accrued balance shown in real time
  • On click, the claim transaction is simulated and signed via useSorobanContract (which internally uses useWalletSigning) before on-chain submission and confirmation polling
  • On confirmed success, triggers notifySuccess and immediately refreshes the claimable balance
  • Claim history section lists completed claims sourced from the backend event indexer via claimService.getEmployeeClaims

Test plan

  • Connect a wallet — the "Vested Token Claim" card should appear and show claimable balance
  • With zero claimable amount, the Claim Tokens button is disabled
  • With a non-zero claimable amount, the button is enabled and triggers the wallet signing flow
  • After a successful claim, the claimable amount updates to 0 and a success notification appears
  • If no VITE_VESTING_ESCROW_CONTRACT_ID is set, the section renders nothing (safe no-op)
  • Claim history rows appear for any status: 'claimed' records from the backend

Closes #156

Extends EmployeePortal with VestingClaimSection that:
- Simulates get_claimable_amount() on the vesting_escrow contract via
  Soroban RPC to show the employee's live claimable balance
- Disables the Claim button when nothing is vested or wallet is
  disconnected
- Submits the claim() transaction via useSorobanContract (simulate →
  sign via useWalletSigning → submit → poll for confirmation)
- Refreshes the claimable balance and notifies on-chain success
- Lists past claimed balances as a Claim History section

Closes Gildado#156
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 24, 2026

@Majormaxx 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! 🚀

Learn more about application limits

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#083: Employee Payout Claim Portal Integration

1 participant