Skip to content

Commit

Permalink
style: react imports
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtiti committed Aug 16, 2024
1 parent bd61638 commit 8e276bd
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/AddNetworkButton.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useState } from 'react';
import { styled, Button } from '@mui/material';
import { useTranslation } from 'next-i18next';
import { useConnectModal } from '@rainbow-me/rainbowkit';
import { useAccount } from 'wagmi';
import { useRouter } from 'next/router';
import Image from 'next/image';
import { useState } from 'react';

import { useCustomTheme, useData } from '~/hooks';
import { addNetwork } from '~/utils';
Expand Down
1 change: 0 additions & 1 deletion src/components/TVL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const TVL = () => {

<STableBody>
{tvl
//FIXME: Use bignumber here
.sort((a, b) => parseFloat(b.amountUsd) - parseFloat(a.amountUsd))
.map((token, index) => (
<STableBodyRow key={index}>
Expand Down
1 change: 0 additions & 1 deletion src/containers/Tokens/TokensTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const TokensTable = ({ tvl }: TotalValueLockedProps) => {

<STableBody>
{tvl
//FIXME: Use bignumber here
.sort((a, b) => parseFloat(b.amountUsd) - parseFloat(a.amountUsd))
.map((token: TvlData, index) => (
<STableBodyRow key={index}>
Expand Down
1 change: 0 additions & 1 deletion src/utils/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const formatTimestampToDate = (timestamp: number): string => {
};

export function formatDataNumber(input: string | number, formatDecimal = 3, currency?: boolean, compact?: boolean) {
//FIXME: use bignumber here to avoid floating point issues
const res: number = Number.parseFloat(input.toString());

if (res === 0 || isNaN(res)) return `${currency ? '$0' : '0'}`;
Expand Down

0 comments on commit 8e276bd

Please sign in to comment.