Skip to content

Commit

Permalink
Merge pull request Uniswap#432 from ianlapham/ui-updates
Browse files Browse the repository at this point in the history
Ui updates
  • Loading branch information
ianlapham authored Aug 29, 2019
2 parents 65e9629 + cdc0b40 commit 0f20788
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/CurrencyInputPanel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -428,6 +429,8 @@ function CurrencySelectModal({ isOpen, onDismiss, onTokenSelect, allBalances })

const allTokens = useAllTokenDetails()

const { account } = useWeb3Context()

// BigNumber.js instance
const ethPrice = useUSDPrice()

Expand Down Expand Up @@ -553,8 +556,10 @@ function CurrencySelectModal({ isOpen, onDismiss, onTokenSelect, allBalances })
<TokenRowRight>
{balance ? (
<TokenRowBalance>{balance && (balance > 0 || balance === '<0.0001') ? balance : '-'}</TokenRowBalance>
) : (
) : account ? (
<SpinnerWrapper src={Circle} alt="loader" />
) : (
'-'
)}
<TokenRowUsd>
{usdBalance ? (usdBalance.lt(0.01) ? '<$0.01' : '$' + formatToUsd(usdBalance)) : ''}
Expand Down

0 comments on commit 0f20788

Please sign in to comment.