Skip to content

feat(wallet/dashboard): show negative value for vested staking #6838

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function getTransactionAmountForTimelocked(

if (isTimelockedStaking) {
const { totalStakedAmount } = getStakeDetailsFromEvents(events);
return totalStakedAmount;
return -BigInt(totalStakedAmount);
} else if (isTimelockedUnstaking) {
const { totalUnstakeAmount } = getUnstakeDetailsFromEvents(events);
return totalUnstakeAmount;
Expand Down
36 changes: 17 additions & 19 deletions apps/wallet-dashboard/app/(protected)/staking/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,29 +259,27 @@ function StakingDashboardPage(): React.JSX.Element {
)}
</Panel>
) : (
<div className="flex h-[270px] p-lg">
<div className="flex h-[270px] py-lg">
<StartStaking />
</div>
)}
{hasAvailableVestedStaking && supplyIncreaseVestingEnabled && (
<div className="px-lg">
<Panel bgColor="bg-secondary-90 dark:bg-secondary-10">
<div className="py-sm">
<Title
title="Available Vested Staking"
subtitle="In progress vested staking"
trailingElement={
<Button
onClick={() => router.push('/vesting')}
size={ButtonSize.Small}
type={ButtonType.Outlined}
text="View"
/>
}
/>
</div>
</Panel>
</div>
<Panel bgColor="bg-secondary-90 dark:bg-secondary-10">
<div className="py-sm">
<Title
title="Available Vested Staking"
subtitle="In progress vested staking"
trailingElement={
<Button
onClick={() => router.push('/vesting')}
size={ButtonSize.Small}
type={ButtonType.Outlined}
text="View"
/>
}
/>
</div>
</Panel>
)}
</div>
</div>
Expand Down
Loading