Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check whether claim has started in claim #153

Merged
merged 9 commits into from
Mar 28, 2024

Conversation

Yolley
Copy link
Collaborator

@Yolley Yolley commented Mar 28, 2024

  • check whether unlock has begun before adding claimLocked ix in claim

const endVestingTs = args.endVestingTs.eqn(0) ? nowTs : args.endVestingTs;
const startVestingTs = args.startVestingTs.eqn(0) ? nowTs : args.startVestingTs;
if (endVestingTs.gt(startVestingTs) && endVestingTs.sub(startVestingTs).lt(args.unlockPeriod)) {
throw new Error("Unlock Period can not be less than total Vesting duration!");
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess you mean vice verse unlock period can't be longer than duration

Suggested change
throw new Error("Unlock Period can not be less than total Vesting duration!");
throw new Error("The unlock period cannot be longer than the total vesting duration!");

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Dam, you're right. 🌚

@Yolley Yolley merged commit ba69862 into v6 Mar 28, 2024
2 checks passed
@Yolley Yolley deleted the oleg/feature/optimise_claim_when_nothing_to_claim branch March 28, 2024 10:49
Copy link

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.

2 participants