diff --git a/src/components/CurrencyInputPanel/index.js b/src/components/CurrencyInputPanel/index.js index 50ef3d0425..a5fb9b238d 100644 --- a/src/components/CurrencyInputPanel/index.js +++ b/src/components/CurrencyInputPanel/index.js @@ -3,6 +3,7 @@ import { Link } from 'react-router-dom' import { useTranslation } from 'react-i18next' import { ethers } from 'ethers' import { BigNumber } from '@uniswap/sdk' +import { useWeb3Context } from 'web3-react' import styled from 'styled-components' import escapeStringRegex from 'escape-string-regexp' import { darken } from 'polished' @@ -428,6 +429,8 @@ function CurrencySelectModal({ isOpen, onDismiss, onTokenSelect, allBalances }) const allTokens = useAllTokenDetails() + const { account } = useWeb3Context() + // BigNumber.js instance const ethPrice = useUSDPrice() @@ -553,8 +556,10 @@ function CurrencySelectModal({ isOpen, onDismiss, onTokenSelect, allBalances }) {balance ? ( {balance && (balance > 0 || balance === '<0.0001') ? balance : '-'} - ) : ( + ) : account ? ( + ) : ( + '-' )} {usdBalance ? (usdBalance.lt(0.01) ? '<$0.01' : '$' + formatToUsd(usdBalance)) : ''}