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

feat: add dynamic unbound period #990

Merged
merged 4 commits into from
Aug 19, 2024
Merged

Conversation

euharrison
Copy link
Contributor

Closes #973

Add dynamic unbound period

Screenshot 2024-08-09 at 14 50 52

@euharrison euharrison requested review from mateuszjasiuk, pedrorezende and emccorson and removed request for mateuszjasiuk August 9, 2024 17:51
unbondingPeriodInEpochs,
minEpochDuration,
}: EpochInfo): number => {
const duration = unbondingPeriodInEpochs * minEpochDuration;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could someone confirm if this calculation is correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did some calculation these last days using and it looks correct :)

@@ -141,6 +152,9 @@ const Unstake = (): JSX.Element => {
return "";
})();

const unboundPeriod =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Small thing: could we change instances of unboundPeriod to unbondPeriod for consistency, and rename getUboundingPeriod to getUnbondingPeriod? Might be a little more clear, matching the definition in EpochInfo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ops, yes, thanks! done :)

Copy link
Collaborator

@jurevans jurevans left a comment

Choose a reason for hiding this comment

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

LGTM!

@euharrison euharrison merged commit a431c59 into main Aug 19, 2024
8 checks passed
@euharrison euharrison deleted the feat/dynamic-unbound-period branch August 19, 2024 15:01
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.

Namadillo: Unbonding period in Unstake screen is hardcoded
2 participants