feature: show earning and staking tokens
This commit is contained in:
@@ -36,13 +36,6 @@ export const Pool: FC<PoolProps> = ({ pool, balance }) => {
|
|||||||
|
|
||||||
const totalStaked = await getTotalStaked(provider, pool);
|
const totalStaked = await getTotalStaked(provider, pool);
|
||||||
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.info(
|
|
||||||
`Total Staked for ${pool.stakingToken.symbol} - ${
|
|
||||||
pool.earningToken.symbol
|
|
||||||
}: ${JSON.stringify(totalStaked)}`
|
|
||||||
);
|
|
||||||
|
|
||||||
const aprValue = getApr({
|
const aprValue = getApr({
|
||||||
rewardTokenPrice: earningPrice,
|
rewardTokenPrice: earningPrice,
|
||||||
stakingTokenPrice: stakingPrice,
|
stakingTokenPrice: stakingPrice,
|
||||||
@@ -75,14 +68,26 @@ export const Pool: FC<PoolProps> = ({ pool, balance }) => {
|
|||||||
zIndex: -1,
|
zIndex: -1,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<div className="relative w-24 h-24">
|
||||||
<img
|
<img
|
||||||
className="shadow-xl rounded-full w-24"
|
className="shadow-xl rounded-full w-24 absolute"
|
||||||
src={`https://pancakeswap.finance/images/tokens/${pool.earningToken.address["56"]}.svg`}
|
src={`https://pancakeswap.finance/images/tokens/${pool.earningToken.address["56"]}.svg`}
|
||||||
alt={`${pool.earningToken.symbol} icon`}
|
alt={`${pool.earningToken.symbol} icon`}
|
||||||
/>
|
/>
|
||||||
|
<img
|
||||||
|
className="shadow-xl rounded-full w-10 absolute bottom-0 right-0"
|
||||||
|
src={`https://pancakeswap.finance/images/tokens/${pool.stakingToken.address["56"]}.svg`}
|
||||||
|
alt={`${pool.earningToken.symbol} icon`}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div className="mt-4 p-2">
|
<div className="mt-4 p-2">
|
||||||
<p>
|
<p>
|
||||||
<span className="font-medium">Pool:</span> {pool.earningToken.symbol}
|
<span className="font-medium">Investir:</span>
|
||||||
|
{pool.stakingToken.symbol}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span className="font-medium">Receber:</span>
|
||||||
|
{pool.earningToken.symbol}
|
||||||
</p>
|
</p>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<span className="font-medium mr-1">Rendimento:</span>
|
<span className="font-medium mr-1">Rendimento:</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user