From 2f6b360bd398e5d98deef42dd94b765bb481e06f Mon Sep 17 00:00:00 2001 From: bigboydiamonds <57741810+bigboydiamonds@users.noreply.github.com> Date: Wed, 8 May 2024 11:41:31 -0700 Subject: [PATCH] Clean imports --- .../components/PortfolioTokenAsset.tsx | 1 - .../components/SingleNetworkPortfolio.tsx | 2 +- .../StateManagedSwap/SwapInputContainer.tsx | 2 -- .../components/buttons/MiniMaxButton.tsx | 35 ------------------- .../synapse-interface/utils/formatAmount.ts | 2 +- 5 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 packages/synapse-interface/components/buttons/MiniMaxButton.tsx diff --git a/packages/synapse-interface/components/Portfolio/components/PortfolioTokenAsset.tsx b/packages/synapse-interface/components/Portfolio/components/PortfolioTokenAsset.tsx index 171826c312..607034b855 100644 --- a/packages/synapse-interface/components/Portfolio/components/PortfolioTokenAsset.tsx +++ b/packages/synapse-interface/components/Portfolio/components/PortfolioTokenAsset.tsx @@ -14,7 +14,6 @@ import { useGasEstimator } from '@/utils/hooks/useGasEstimator' import GasIcon from '@/components/icons/GasIcon' import { trimTrailingZeroesAfterDecimal } from '@/utils/trimTrailingZeroesAfterDecimal' import { formatAmount } from '@/utils/formatAmount' -import { formatBigIntToString } from '@/utils/bigint/format' const handleFocusOnBridgeInput = () => { inputRef.current?.focus() diff --git a/packages/synapse-interface/components/Portfolio/components/SingleNetworkPortfolio.tsx b/packages/synapse-interface/components/Portfolio/components/SingleNetworkPortfolio.tsx index 978980e5d5..392edc169e 100644 --- a/packages/synapse-interface/components/Portfolio/components/SingleNetworkPortfolio.tsx +++ b/packages/synapse-interface/components/Portfolio/components/SingleNetworkPortfolio.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import React, { useEffect } from 'react' import { Address } from 'viem' import { useDispatch } from 'react-redux' import _, { isArray } from 'lodash' diff --git a/packages/synapse-interface/components/StateManagedSwap/SwapInputContainer.tsx b/packages/synapse-interface/components/StateManagedSwap/SwapInputContainer.tsx index 420e99cd13..df8c133126 100644 --- a/packages/synapse-interface/components/StateManagedSwap/SwapInputContainer.tsx +++ b/packages/synapse-interface/components/StateManagedSwap/SwapInputContainer.tsx @@ -1,8 +1,6 @@ import React, { useEffect, useState, useRef, useCallback, useMemo } from 'react' import { useDispatch } from 'react-redux' import { useAccount } from 'wagmi' - -import MiniMaxButton from '@/components/buttons/MiniMaxButton' import { TokenSelector } from '@/components/ui/TokenSelector' import { formatBigIntToString, stringToBigInt } from '@/utils/bigint/format' import { cleanNumberInput } from '@/utils/cleanNumberInput' diff --git a/packages/synapse-interface/components/buttons/MiniMaxButton.tsx b/packages/synapse-interface/components/buttons/MiniMaxButton.tsx deleted file mode 100644 index 4cfb7d793c..0000000000 --- a/packages/synapse-interface/components/buttons/MiniMaxButton.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { joinClassNames } from '@/utils/joinClassNames' - -type MaxButtonTypes = { - onClickBalance: () => void - isDisabled: boolean - isHidden: boolean -} - -export default function MaxButton({ - onClickBalance, - isDisabled, - isHidden, -}: MaxButtonTypes) { - const className = joinClassNames({ - space: 'px-4 py-1 -ml-1 mr-1 rounded', - background: 'bg-zinc-100 dark:bg-separator', - border: 'border border-zinc-200 dark:border-transparent', - hover: 'enabled:hover:border-zinc-400 enabled:hover:dark:border-zinc-500', - disabled: 'disabled:opacity-60 disabled:cursor-default', - }) - - if (isHidden) { - return null - } else { - return ( - - ) - } -} diff --git a/packages/synapse-interface/utils/formatAmount.ts b/packages/synapse-interface/utils/formatAmount.ts index 19f9c36d54..3f881cee4b 100644 --- a/packages/synapse-interface/utils/formatAmount.ts +++ b/packages/synapse-interface/utils/formatAmount.ts @@ -27,7 +27,7 @@ export const formatAmount = ( const fullAmount = options?.fullAmount ?? false const standardDigits = options?.standardDigits ?? 4 const useCompactNotation = options?.useCompactNotation ?? true - const compactDigits = options?.compactDigits ?? useCompactNotation ? 2 : 0 + const compactDigits = options?.compactDigits ?? (useCompactNotation ? 2 : 0) const minimumAmount = options?.minimumAmount ?? 0.0001 const locales = 'en-UK'