Skip to content

Commit

Permalink
Merge pull request #221 from reservoirprotocol/pedro/relay-4522-conve…
Browse files Browse the repository at this point in the history
…rsion-rate-is-a-bit-hard-to-understand-when-it-is

Reduce Swap Conversion rate from 5 decimals to 2
  • Loading branch information
pedromcunha authored Aug 14, 2024
2 parents 2c1df8c + 98bf004 commit d972188
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-clocks-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@reservoir0x/relay-kit-ui': patch
---

Reduce swap conversion rate from 5 decimals to 2 decimals
4 changes: 2 additions & 2 deletions packages/ui/src/components/widgets/FeeBreakdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ const FeeBreakdown: FC<Props> = ({
{rateMode === 'input' ? (
<Text style="subtitle2">
1 {fromToken?.symbol} ={' '}
{formatNumber(Number(swapRate) / 1, 5, compactSwapRate)}{' '}
{formatNumber(Number(swapRate) / 1, 2, compactSwapRate)}{' '}
{toToken?.symbol}
</Text>
) : (
<Text style="subtitle2">
1 {toToken?.symbol} ={' '}
{formatNumber(1 / Number(swapRate), 5, compactSwapRate)}{' '}
{formatNumber(1 / Number(swapRate), 2, compactSwapRate)}{' '}
{fromToken?.symbol}
</Text>
)}
Expand Down

0 comments on commit d972188

Please sign in to comment.