Skip to content

Commit

Permalink
chore: display unit price
Browse files Browse the repository at this point in the history
  • Loading branch information
asiaznik committed Jan 25, 2024
1 parent b366691 commit a617846
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions libs/withdraws/src/lib/withdraw-limits.tsx
Expand Up @@ -152,6 +152,12 @@ const GasPrice = ({

return (
<div className={classNames('flex flex-col items-end self-end')}>
<Tooltip description={t('The current gas price range')}>
<span>
{formatNumber(utils.formatUnits(basePrice, 'gwei'), 2)} -{' '}
{formatNumber(utils.formatUnits(maxPrice, 'gwei'), 2)} gwei / gas
</span>
</Tooltip>
<Tooltip
description={
<div className="flex flex-col gap-1">
Expand All @@ -164,19 +170,25 @@ const GasPrice = ({
</span>
)}
<span>
{bEther} ETH - {mEther} ETH
{gas.toString()} gas &times;{' '}
{formatNumber(utils.formatUnits(basePrice, 'gwei'), 2)} gwei ={' '}
{bEther} ETH
</span>
<span>
{gas.toString()} gas &times;{' '}
{formatNumber(utils.formatUnits(maxPrice, 'gwei'), 2)} gwei ={' '}
{mEther} ETH
</span>
</div>
}
>
<span className={classNames(expensiveClassNames)}>
{formatNumber(bGwei, 0)} gwei
<span className="text-xs"> - {formatNumber(mGwei, 0)} gwei</span>
<span className={classNames(expensiveClassNames, 'text-xs')}>
{formatNumber(bGwei, 0)} - {formatNumber(mGwei, 0)} gwei
</span>
</Tooltip>

<span className="text-muted text-xs">
~{formatNumber(bQUSD, 2)} qUSD - ~{formatNumber(mQUSD, 2)} qUSD
~{formatNumber(bQUSD, 2)} - {formatNumber(mQUSD, 2)} qUSD
</span>
</div>
);
Expand Down

0 comments on commit a617846

Please sign in to comment.