Skip to content

Commit

Permalink
Merge pull request #730 from ionicprotocol/feat/remove-op-native
Browse files Browse the repository at this point in the history
Hide + OP rewards from mode native pool
  • Loading branch information
rhlsthrm authored Oct 24, 2024
2 parents b138bf4 + d30e906 commit 6e55000
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 35 deletions.
70 changes: 36 additions & 34 deletions packages/ui/app/_components/markets/Rewards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,42 +98,44 @@ const Rewards = ({
%
</div>
))}
<div className="py-4">
{combinedRewards.map((rewards, index) => (
<div
className={`flex ${className ?? 'none'}`}
key={index}
>
<img
alt=""
className="size-4 rounded mr-1"
src={`/img/symbols/32/color/${REWARDS_TO_SYMBOL[poolChainId]?.[rewards?.rewardToken]?.toLowerCase()}.png`}
/>{' '}
+{' '}
{Number(formatEther(rewards.amount)).toLocaleString('en-US', {
maximumFractionDigits: 1
})}{' '}
{REWARDS_TO_SYMBOL[poolChainId][rewards.rewardToken]}
</div>
))}
{totalRewards > 0n && (
<div className="flex justify-center pt-1">
<button
className={`rounded-md bg-accent text-black py-1 px-3 uppercase truncate `}
onClick={claimRewards}
{(totalRewards > 0 || combinedRewards.length > 0) && (
<div className="py-4">
{combinedRewards.map((rewards, index) => (
<div
className={`flex ${className ?? 'none'}`}
key={index}
>
<ResultHandler
isLoading={isLoading}
height="20"
width="20"
color={'#000000'}
<img
alt=""
className="size-4 rounded mr-1"
src={`/img/symbols/32/color/${REWARDS_TO_SYMBOL[poolChainId]?.[rewards?.rewardToken]?.toLowerCase()}.png`}
/>{' '}
+{' '}
{Number(formatEther(rewards.amount)).toLocaleString('en-US', {
maximumFractionDigits: 1
})}{' '}
{REWARDS_TO_SYMBOL[poolChainId][rewards.rewardToken]}
</div>
))}
{totalRewards > 0n && (
<div className="flex justify-center pt-1">
<button
className={`rounded-md bg-accent text-black py-1 px-3 uppercase truncate `}
onClick={claimRewards}
>
Claim Rewards
</ResultHandler>
</button>
</div>
)}
</div>
<ResultHandler
isLoading={isLoading}
height="20"
width="20"
color={'#000000'}
>
Claim Rewards
</ResultHandler>
</button>
</div>
)}
</div>
)}
</>
);
};
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/app/_components/markets/SupplyPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default function SupplyPopover({
%
</span>
</div>
{isModeMarket && (
{isModeMarket && selectedPoolId !== '1' && (
<div className="flex items-center mt-1">
<img
src="/images/op-logo-red.svg"
Expand Down

0 comments on commit 6e55000

Please sign in to comment.