Skip to content

Commit

Permalink
fix: crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Dec 2, 2024
1 parent 2be8902 commit e6d17ea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/vaults-v3/components/details/RewardsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ export function RewardsTab(props: {currentVault: TYDaemonVault; hasStakingReward
className={'w-full md:w-1/3'}
legend={
<div className={'flex items-center justify-between'}>
<p>{`${formatAmount(vaultData.stakedEarned.normalized, 6)} ${rewardTokenBalance.symbol || (props.currentVault.staking.rewards || [])[0].symbol || ''} available to claim`}</p>
<p>{`${formatAmount(vaultData.stakedEarned.normalized, 6)} ${rewardTokenBalance.symbol || (props.currentVault.staking.rewards || [])[0]?.symbol || ''} available to claim`}</p>
<p>{`${formatCounterValue(vaultData.stakedEarned.normalized, rewardTokenPrice.normalized)}`}</p>
</div>
}
Expand Down
14 changes: 7 additions & 7 deletions apps/vaults-v3/components/details/VaultActionsTabsWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ export function VaultDetailsTab(props: {
{props.tab.label === 'Boost' && toBigInt(props.unstakedBalance?.raw) > 0n ? (
<span className={'absolute -right-3 -top-1 z-10 flex size-2.5'}>
<span
className={'bg-primary absolute inline-flex size-full animate-ping rounded-full opacity-75'}
className={'absolute inline-flex size-full animate-ping rounded-full bg-primary opacity-75'}
/>
<span className={'bg-primary relative inline-flex size-2.5 rounded-full'} />
<span className={'relative inline-flex size-2.5 rounded-full bg-primary'} />
</span>
) : null}
</p>
Expand Down Expand Up @@ -493,7 +493,7 @@ export function VaultActionsTabsWrapper({currentVault}: {currentVault: TYDaemonV
<div
aria-label={'Migration Warning'}
className={'col-span-12 mt-10'}>
<div className={'text-neutral-0 w-full rounded-3xl bg-neutral-900 p-6'}>
<div className={'w-full rounded-3xl bg-neutral-900 p-6 text-neutral-0'}>
<b className={'text-lg'}>{'Looks like this is an old vault.'}</b>
<p className={'mt-2'}>
{
Expand All @@ -511,7 +511,7 @@ export function VaultActionsTabsWrapper({currentVault}: {currentVault: TYDaemonV
<div
aria-label={'Deprecation Warning'}
className={'col-span-12 mt-10'}>
<div className={'text-neutral-0 w-full rounded-3xl bg-neutral-900 p-6'}>
<div className={'w-full rounded-3xl bg-neutral-900 p-6 text-neutral-0'}>
<b className={'text-lg'}>{'This Vault is no longer supported (oh no).'}</b>
<p className={'mt-2'}>
{
Expand All @@ -526,7 +526,7 @@ export function VaultActionsTabsWrapper({currentVault}: {currentVault: TYDaemonV
<div
aria-label={'Migration Warning'}
className={'col-span-12 mt-10'}>
<div className={'text-neutral-0 w-full rounded-3xl bg-neutral-900 p-6'}>
<div className={'w-full rounded-3xl bg-neutral-900 p-6 text-neutral-0'}>
<b className={'text-lg'}>{'Oh look, an important message for you to read!'}</b>
<p
className={'mt-2'}
Expand Down Expand Up @@ -635,7 +635,7 @@ export function VaultActionsTabsWrapper({currentVault}: {currentVault: TYDaemonV
<VaultDetailsQuickActionsFrom />
<VaultDetailsQuickActionsSwitch />
<VaultDetailsQuickActionsTo />
<div className={'md:w-42 md:min-w-42 w-full space-y-0 md:space-y-2'}>
<div className={'w-full space-y-0 md:w-42 md:min-w-42 md:space-y-2'}>
<p className={'hidden text-base md:inline'}>&nbsp;</p>
<div>
<VaultDetailsQuickActionsButtons currentVault={currentVault} />
Expand All @@ -652,7 +652,7 @@ export function VaultActionsTabsWrapper({currentVault}: {currentVault: TYDaemonV
</div>
</div>
)}
{currentTab.value !== 3 && (
{currentTab.value !== 3 && currentVault.staking.rewards && (
<Fragment>
<div className={'relative flex w-full flex-row items-center justify-between px-4 pt-4 md:px-8'}>
<VaultRewardsTabs
Expand Down
3 changes: 2 additions & 1 deletion apps/vaults/components/details/VaultActionsTabsWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ export function VaultActionsTabsWrapper({currentVault}: {currentVault: TYDaemonV
toAddress(currentVault.address) === toAddress(`0xad17a225074191d5c8a37b50fda1ae278a2ee6a2`) ||
toAddress(currentVault.address) === toAddress(`0x65343f414ffd6c97b0f6add33d16f6845ac22bac`) ||
toAddress(currentVault.address) === toAddress(`0xfaee21d0f0af88ee72bb6d68e54a90e6ec2616de`);

return (
<>
{currentVault?.migration?.available && (
Expand Down Expand Up @@ -340,7 +341,7 @@ export function VaultActionsTabsWrapper({currentVault}: {currentVault: TYDaemonV
</div>
</div>
)}
{currentTab.value !== 3 && (
{currentTab.value !== 3 && currentVault.staking.rewards && (
<Fragment>
<div className={'relative flex w-full flex-row items-center justify-between px-4 pt-4 md:px-8'}>
<VaultRewardsTabs
Expand Down

0 comments on commit e6d17ea

Please sign in to comment.