Skip to content

Commit

Permalink
remove util we don't need anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
artursapek committed Oct 21, 2024
1 parent cdb672c commit 12da662
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 33 deletions.
24 changes: 0 additions & 24 deletions wormhole-connect/src/utils/amount.ts

This file was deleted.

14 changes: 5 additions & 9 deletions wormhole-connect/src/views/v2/Bridge/Routes/SingleRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {

import type { RouteData } from 'config/routes';
import type { RootState } from 'store';
import { formatAmount } from 'utils/amount';
import { toFixedDecimals } from 'utils/balance';
import { TokenConfig } from 'config/types';
import FastestRoute from 'icons/FastestRoute';
Expand Down Expand Up @@ -355,14 +354,11 @@ const SingleRoute = (props: Props) => {
}, [quote]);

const receiveAmountTrunc = useMemo(() => {
return quote && destChain && destTokenConfig
? formatAmount(
destChain,
destTokenConfig,
quote.destinationToken.amount.amount,
6,
)
: undefined;
if (quote) {
amount.display(amount.truncate(quote.destinationToken.amount, 6));
} else {
return undefined;
}
}, [quote]);

const routeCardHeader = useMemo(() => {
Expand Down

0 comments on commit 12da662

Please sign in to comment.