Commit 0f20788c authored by Ian Lapham's avatar Ian Lapham Committed by GitHub

Merge pull request #432 from ianlapham/ui-updates

Ui updates
parents 65e96296 cdc0b407
...@@ -3,6 +3,7 @@ import { Link } from 'react-router-dom' ...@@ -3,6 +3,7 @@ import { Link } from 'react-router-dom'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { ethers } from 'ethers' import { ethers } from 'ethers'
import { BigNumber } from '@uniswap/sdk' import { BigNumber } from '@uniswap/sdk'
import { useWeb3Context } from 'web3-react'
import styled from 'styled-components' import styled from 'styled-components'
import escapeStringRegex from 'escape-string-regexp' import escapeStringRegex from 'escape-string-regexp'
import { darken } from 'polished' import { darken } from 'polished'
...@@ -428,6 +429,8 @@ function CurrencySelectModal({ isOpen, onDismiss, onTokenSelect, allBalances }) ...@@ -428,6 +429,8 @@ function CurrencySelectModal({ isOpen, onDismiss, onTokenSelect, allBalances })
const allTokens = useAllTokenDetails() const allTokens = useAllTokenDetails()
const { account } = useWeb3Context()
// BigNumber.js instance // BigNumber.js instance
const ethPrice = useUSDPrice() const ethPrice = useUSDPrice()
...@@ -553,8 +556,10 @@ function CurrencySelectModal({ isOpen, onDismiss, onTokenSelect, allBalances }) ...@@ -553,8 +556,10 @@ function CurrencySelectModal({ isOpen, onDismiss, onTokenSelect, allBalances })
<TokenRowRight> <TokenRowRight>
{balance ? ( {balance ? (
<TokenRowBalance>{balance && (balance > 0 || balance === '<0.0001') ? balance : '-'}</TokenRowBalance> <TokenRowBalance>{balance && (balance > 0 || balance === '<0.0001') ? balance : '-'}</TokenRowBalance>
) : ( ) : account ? (
<SpinnerWrapper src={Circle} alt="loader" /> <SpinnerWrapper src={Circle} alt="loader" />
) : (
'-'
)} )}
<TokenRowUsd> <TokenRowUsd>
{usdBalance ? (usdBalance.lt(0.01) ? '<$0.01' : '$' + formatToUsd(usdBalance)) : ''} {usdBalance ? (usdBalance.lt(0.01) ? '<$0.01' : '$' + formatToUsd(usdBalance)) : ''}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment