Skip to content

Commit

Permalink
fix(rewards): decimals issues (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzschoff authored Mar 26, 2024
1 parent 450131e commit b161012
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion liquidity/ui/src/components/Rewards/Rewards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export const Rewards = ({
address={item.distributorAddress}
readOnly={readOnly}
total={item.total}
decimals={item.decimals}
/>
))}
</Tbody>
Expand Down
8 changes: 3 additions & 5 deletions liquidity/ui/src/components/Rewards/RewardsRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ interface RewardsRowInterface {
address: string;
readOnly: boolean;
total: number;
decimals: number;
}

export const RewardsRow = ({
Expand All @@ -31,7 +30,6 @@ export const RewardsRow = ({
address,
readOnly,
total,
decimals,
}: RewardsRowInterface) => {
const { accountId, collateralSymbol, poolId } = useParams();

Expand Down Expand Up @@ -111,13 +109,13 @@ export const RewardsRow = ({
<Amount value={wei(claimableAmount)} />
{` ${symbol}`}
</Text>
{lifetimeClaimed > 0 ? (
{lifetimeClaimed > 0 && (
<Text color="gray.500" fontSize="12px" fontFamily="heading" lineHeight="16px">
<Tooltip label="Total claimed over lifetime">Lifetime: &nbsp;</Tooltip>
<Amount value={wei(lifetimeClaimed.toString(), decimals, true)} />
<Amount value={wei(lifetimeClaimed.toString(), 18, true)} />
{symbol}
</Text>
) : null}
)}
</Fade>
</Td>
{!readOnly && (
Expand Down

0 comments on commit b161012

Please sign in to comment.