Problem
Both hooks/useVesting.ts and hooks/useAirdrop.ts return hardcoded mock data instead of querying the Soroban contracts:
// useVesting.ts
const mockSchedules: VestingSchedule[] = [ /* hardcoded */ ];
setTimeout(() => { setSchedules(mockSchedules); }, 800);
// useAirdrop.ts
const mockCampaigns: AirdropCampaign[] = [ /* hardcoded */ ];
setTimeout(() => { setCampaigns(mockCampaigns); }, 800);
Additionally, claimVested() and distributeCampaign() simulate work with setTimeout rather than submitting real transactions via ContractService.
Expected Fix
- Replace the mock
useEffect bodies with actual ContractService / Soroban RPC calls to fetch schedules and campaigns owned by the connected publicKey.
- Wire
claimVested(scheduleId) and distributeCampaign(campaignId) through ContractService, sign via Freighter, and submit the XDR to the network.
- Handle loading and error states from real async responses.
Notes
Problem
Both
hooks/useVesting.tsandhooks/useAirdrop.tsreturn hardcoded mock data instead of querying the Soroban contracts:Additionally,
claimVested()anddistributeCampaign()simulate work withsetTimeoutrather than submitting real transactions viaContractService.Expected Fix
useEffectbodies with actualContractService/ Soroban RPC calls to fetch schedules and campaigns owned by the connectedpublicKey.claimVested(scheduleId)anddistributeCampaign(campaignId)throughContractService, sign via Freighter, and submit the XDR to the network.Notes
ContractServiceclass inlib/contracts.tsis already wired fordeployToken,deployVesting, anddeployAirdrop— the pattern can be followed for read calls.