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

fix: display self-stake forecast #1981

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions apps/staking/src/components/OracleIntegrityStaking/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -986,10 +986,14 @@ const doSort = (
}
}
case SortOption.SelfStakeAscending: {
return Number(a.selfStake - b.selfStake);
return Number(
a.selfStake + a.selfStakeDelta - b.selfStake - b.selfStakeDelta,
);
}
case SortOption.SelfStakeDescending: {
return Number(b.selfStake - a.selfStake);
return Number(
b.selfStake + b.selfStakeDelta - a.selfStake - a.selfStakeDelta,
);
}
}
};
Expand Down Expand Up @@ -1195,7 +1199,9 @@ const Publisher = ({
<div className="flex flex-row items-center gap-2">
<dt className="font-semibold">{"Publisher's Stake:"}</dt>
<dd>
<Tokens>{publisher.selfStake}</Tokens>
<Tokens>
{publisher.selfStake + publisher.selfStakeDelta}
</Tokens>
</dd>
</div>
)}
Expand Down Expand Up @@ -1247,7 +1253,7 @@ const Publisher = ({
</PublisherName>
</PublisherTableCell>
<PublisherTableCell className="text-center">
<Tokens>{publisher.selfStake}</Tokens>
<Tokens>{publisher.selfStake + publisher.selfStakeDelta}</Tokens>
</PublisherTableCell>
</>
)}
Expand Down Expand Up @@ -1554,7 +1560,7 @@ const NewApy = ({
}
: {
isSelf: false,
selfStake: publisher.selfStake,
selfStake: publisher.selfStake + publisher.selfStakeDelta,
poolUtilization:
publisher.poolUtilization +
publisher.poolUtilizationDelta +
Expand Down
Loading