-
Notifications
You must be signed in to change notification settings - Fork 43
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
Draft: vp from network economics #6165
base: main
Are you sure you want to change the base?
Conversation
…/nns-dapp into get-network-economics-parameters
<IconErrorOutline /> | ||
</BannerIcon> | ||
</Banner> | ||
{#if nonNullish($startReducingVotingPowerAfterSecondsStore)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class="description" | ||
class:negative={isLosingRewards || isLosingRewardsSoon} | ||
data-tid="state-description" | ||
{#if nonNullish($startReducingVotingPowerAfterSecondsStore) && nonNullish($clearFollowingAfterSecondsStore)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
let isModalVisible = false; | ||
</script> | ||
|
||
<TestIdWrapper testId="losing-rewards-banner-component"> | ||
{#if nonNullish(mostInactiveNeuron)} | ||
<Banner title={getTitle(mostInactiveNeuron)} {text}> | ||
{#if nonNullish(mostInactiveNeuron) && nonNullish($startReducingVotingPowerAfterSecondsStore)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (isNeuronLosingRewards(neuron)) { | ||
// Skip the "missing rewards" tag when voting power economics not available | ||
if ( | ||
nonNullish(startReducingVotingPowerAfterSeconds) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}: { | ||
neuron: NeuronInfo; | ||
startReducingVotingPowerAfterSeconds: bigint | undefined; | ||
clearFollowingAfterSeconds: bigint | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* e.g. "Neuron will start losing rewards in 30 days" | ||
* If the voting power economics are not available, | ||
* we assume that the neuron is not losing rewards. */ | ||
export const shouldDisplayRewardLossNotification = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
secondsUntilLosingRewards(neuron) <= 0; | ||
/** If the voting power economics are not available, | ||
* we assume that the neuron is not losing rewards. */ | ||
export const isNeuronLosingRewards = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…/nns-dapp into get-network-economics-parameters
Motivation
Changes
Tests
Todos