Skip to content

Commit

Permalink
Clean
Browse files Browse the repository at this point in the history
  • Loading branch information
bigboydiamonds committed May 6, 2024
1 parent cc9f96d commit bc5eca7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import React, { useCallback } from 'react'
import { zeroAddress } from 'viem'
import { isNumber, isNull } from 'lodash'
import { isNumber } from 'lodash'
import Image from 'next/image'
import { useAppDispatch } from '@/store/hooks'
import {
setFromChainId,
setFromToken,
updateFromValue,
} from '@/slices/bridge/reducer'
import { setFromChainId, setFromToken } from '@/slices/bridge/reducer'
import { Token } from '@/utils/types'
import { inputRef } from '../../StateManagedBridge/InputContainer'
import { useBridgeState } from '@/slices/bridge/hooks'
Expand All @@ -17,8 +13,6 @@ import { getParsedBalance } from '@/utils/getParsedBalance'
import { useGasEstimator } from '@/utils/hooks/useGasEstimator'
import GasIcon from '@/components/icons/GasIcon'
import { trimTrailingZeroesAfterDecimal } from '@/utils/trimTrailingZeroesAfterDecimal'
import toast from 'react-hot-toast'
import { formatBigIntToString } from '@/utils/bigint/format'

const handleFocusOnBridgeInput = () => {
inputRef.current?.focus()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { isNull, isNumber } from 'lodash'
import toast from 'react-hot-toast'
import React, { useEffect, useState, useCallback, useMemo } from 'react'
import { useAccount } from 'wagmi'
import { zeroAddress } from 'viem'
import { useAppDispatch } from '@/store/hooks'
import {
initialState,
Expand All @@ -24,15 +23,13 @@ import { CHAINS_BY_ID } from '@/constants/chains'
import { useFromChainListArray } from './hooks/useFromChainListArray'
import { useBridgeState } from '@/slices/bridge/hooks'
import { usePortfolioState } from '@/slices/portfolio/hooks'
import { TokenAndBalance } from '@/utils/actions/fetchPortfolioBalances'
import { BridgeSectionContainer } from '@/components/ui/BridgeSectionContainer'
import { BridgeAmountContainer } from '@/components/ui/BridgeAmountContainer'
import { useFromTokenListArray } from './hooks/useFromTokenListArray'
import MiniMaxButton from '../buttons/MiniMaxButton'
import { AvailableBalance } from './AvailableBalance'
import { useGasEstimator } from '../../utils/hooks/useGasEstimator'
import { getParsedBalance } from '@/utils/getParsedBalance'
import { fetchGasData } from '@/slices/gasDataSlice'

export const inputRef = React.createRef<HTMLInputElement>()

Expand Down Expand Up @@ -162,7 +159,7 @@ export const InputContainer = () => {
{hasMounted && isConnected && (
<MiniMaxButton
onClickBalance={onMaxBalance}
isDisabled={!balance || balance === 0n ? true : false}
isDisabled={!balance || balance === 0n}
isHidden={!isConnected || !hasValidSelections}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const SwapInputContainer = () => {
{hasMounted && isConnected && (
<MiniMaxButton
onClickBalance={onMaxBalance}
isDisabled={!balance || balance === 0n ? true : false}
isDisabled={!balance || balance === 0n}
isHidden={false}
/>
)}
Expand Down

0 comments on commit bc5eca7

Please sign in to comment.