Skip to content

Commit

Permalink
fix: get vesting data (#1264)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsimao authored Jun 2, 2023
1 parent 869efa9 commit f178d58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/hooks/api/use-get-vesting-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const getVestingData = async (accountId: AccountId): Promise<VestingData> => {
const schedules = await window.bridge.api.query.vesting.vestingSchedules(accountId);

const schedule = schedules[0];
const isClaimable = !!schedule && currentBlockNumber > schedule.start + schedule.period;
const isClaimable = !!schedule && currentBlockNumber > schedule.start.toNumber() + schedule.period.toNumber();

return {
schedules,
Expand Down

2 comments on commit f178d58

@vercel
Copy link

@vercel vercel bot commented on f178d58 Jun 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on f178d58 Jun 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.