Commit 7d343dcf authored by Justin Domingue's avatar Justin Domingue Committed by GitHub

Revert "Merge branch 'main' of https://github.com/Uniswap/interface" (#2912)

This reverts commit bf7a40be, reversing
changes made to 097b8361.
parent bf7a40be
......@@ -8,33 +8,13 @@
"jsx": true
}
},
"ignorePatterns": ["node_modules/**/*"],
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": [
"src/types/v3",
"src/abis/types",
"src/locales/**/*.js",
"src/locales/**/en-US.po",
"src/state/data/generated.ts",
"node_modules",
"coverage",
"build",
"dist",
".DS_Store",
".env.local",
".env.development.local",
".env.test.local",
".env.production.local",
".idea/",
".vscode/",
"package-lock.json",
"yarn.lock"
],
"extends": [
"react-app",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
......
......@@ -11,6 +11,7 @@ on:
jobs:
run-linters:
name: Run linters
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
runs-on: ubuntu-latest
steps:
......@@ -38,15 +39,10 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run eslint w/ autofix
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
- name: Run linters
uses: wearerequired/lint-action@36c7e6689e80d785d27a22f71d970f3a3b4fcb70
with:
github_token: ${{ secrets.github_token }}
eslint: true
eslint_args: "-c .eslintrc.json"
eslint_extensions: js,jsx,ts,tsx,json
auto_fix: true
- name: Run eslint
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner }}
run: yarn eslint .
......@@ -74,7 +74,6 @@ class CustomizedBridge extends Eip1193Bridge {
}
// sets up the injected provider to be a mock ethereum provider with the given mnemonic/index
// eslint-disable-next-line no-undef
Cypress.Commands.overwrite('visit', (original, url, options) => {
return original(url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url, {
...options,
......
const linguiConfig = {
export default {
catalogs: [
{
path: '<rootDir>/src/locales/{locale}',
......@@ -52,5 +52,3 @@ const linguiConfig = {
runtimeConfigModule: ['@lingui/core', 'i18n'],
sourceLocale: 'en-US',
}
export default linguiConfig
......@@ -152,6 +152,12 @@
"bundle": "microbundle --tsconfig tsconfig.lib.json src/lib/index.tsx --format esm,cjs",
"cosmos": "open http://localhost:5000 && cross-env FAST_REFRESH=false cosmos"
},
"eslintConfig": {
"extends": "react-app",
"ignorePatterns": [
"node_modules"
]
},
"browserslist": {
"production": [
">0.2%",
......
......@@ -80,7 +80,7 @@ function ClaimSummary({ info: { recipient, uniAmountRaw } }: { info: ClaimTransa
)
}
function SubmitProposalTransactionSummary(_: { info: SubmitProposalTransactionInfo }) {
function SubmitProposalTransactionSummary({}: { info: SubmitProposalTransactionInfo }) {
return <Trans>Submit new proposal</Trans>
}
......@@ -147,13 +147,13 @@ function WrapSummary({ info: { currencyAmountRaw, unwrapped } }: { info: WrapTra
}
}
function DepositLiquidityStakingSummary(_: { info: DepositLiquidityStakingTransactionInfo }) {
function DepositLiquidityStakingSummary({}: { info: DepositLiquidityStakingTransactionInfo }) {
// not worth rendering the tokens since you can should no longer deposit liquidity in the staking contracts
// todo: deprecate and delete the code paths that allow this, show user more information
return <Trans>Deposit liquidity</Trans>
}
function WithdrawLiquidityStakingSummary(_: { info: WithdrawLiquidityStakingTransactionInfo }) {
function WithdrawLiquidityStakingSummary({}: { info: WithdrawLiquidityStakingTransactionInfo }) {
return <Trans>Withdraw deposited liquidity</Trans>
}
......
......@@ -10,7 +10,7 @@ import { injected, portis, walletlink } from '../../connectors'
import { SUPPORTED_WALLETS } from '../../constants/wallet'
import { useActiveWeb3React } from '../../hooks/web3'
import { clearAllTransactions } from '../../state/transactions/actions'
import { ExternalLink, LinkStyledButton, ThemedText } from '../../theme'
import { ExternalLink, LinkStyledButton, TYPE } from '../../theme'
import { shortenAddress } from '../../utils'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { ButtonSecondary } from '../Button'
......@@ -378,9 +378,9 @@ export default function AccountDetails({
{!!pendingTransactions.length || !!confirmedTransactions.length ? (
<LowerSection>
<AutoRow mb={'1rem'} style={{ justifyContent: 'space-between' }}>
<ThemedText.Body>
<TYPE.body>
<Trans>Recent Transactions</Trans>
</ThemedText.Body>
</TYPE.body>
<LinkStyledButton onClick={clearAllTransactionsCallback}>
<Trans>(clear all)</Trans>
</LinkStyledButton>
......@@ -390,9 +390,9 @@ export default function AccountDetails({
</LowerSection>
) : (
<LowerSection>
<ThemedText.Body color={theme.text1}>
<TYPE.body color={theme.text1}>
<Trans>Your transactions will appear here...</Trans>
</ThemedText.Body>
</TYPE.body>
</LowerSection>
)}
</>
......
import { Trans } from '@lingui/macro'
// eslint-disable-next-line no-restricted-imports
import { t } from '@lingui/macro'
import { t, Trans } from '@lingui/macro'
import { ReactNode, useCallback, useContext } from 'react'
import styled, { ThemeContext } from 'styled-components/macro'
import useENS from '../../hooks/useENS'
import { useActiveWeb3React } from '../../hooks/web3'
import { ExternalLink, ThemedText } from '../../theme'
import { ExternalLink, TYPE } from '../../theme'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { AutoColumn } from '../Column'
import { RowBetween } from '../Row'
......@@ -108,9 +107,9 @@ export default function AddressInputPanel({
<InputContainer>
<AutoColumn gap="md">
<RowBetween>
<ThemedText.Black color={theme.text2} fontWeight={500} fontSize={14}>
<TYPE.black color={theme.text2} fontWeight={500} fontSize={14}>
{label ?? <Trans>Recipient</Trans>}
</ThemedText.Black>
</TYPE.black>
{address && chainId && (
<ExternalLink
href={getExplorerLink(chainId, name ?? address, ExplorerDataType.ADDRESS)}
......
......@@ -4,7 +4,7 @@ import HoverInlineText from 'components/HoverInlineText'
import { useMemo } from 'react'
import useTheme from '../../hooks/useTheme'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { warningSeverity } from '../../utils/prices'
export function FiatValue({
......@@ -25,7 +25,7 @@ export function FiatValue({
}, [priceImpact, theme.green1, theme.red1, theme.text3, theme.yellow1])
return (
<ThemedText.Body fontSize={14} color={fiatValue ? theme.text2 : theme.text4}>
<TYPE.body fontSize={14} color={fiatValue ? theme.text2 : theme.text4}>
{fiatValue ? (
<Trans>
~$ <HoverInlineText text={fiatValue?.toSignificant(6, { groupSeparator: ',' })} />
......@@ -39,6 +39,6 @@ export function FiatValue({
(<Trans>{priceImpact.multiply(-1).toSignificant(3)}%</Trans>)
</span>
) : null}
</ThemedText.Body>
</TYPE.body>
)
}
......@@ -13,7 +13,7 @@ import { ReactComponent as DropDown } from '../../assets/images/dropdown.svg'
import useTheme from '../../hooks/useTheme'
import { useActiveWeb3React } from '../../hooks/web3'
import { useCurrencyBalance } from '../../state/wallet/hooks'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { ButtonGray } from '../Button'
import CurrencyLogo from '../CurrencyLogo'
import DoubleCurrencyLogo from '../DoubleLogo'
......@@ -212,9 +212,9 @@ export default function CurrencyInputPanel({
<FixedContainer>
<AutoColumn gap="sm" justify="center">
<Lock />
<ThemedText.Label fontSize="12px" textAlign="center" padding="0 12px">
<TYPE.label fontSize="12px" textAlign="center" padding="0 12px">
<Trans>The market price is outside your specified price range. Single-asset deposit only.</Trans>
</ThemedText.Label>
</TYPE.label>
</AutoColumn>
</FixedContainer>
)}
......@@ -271,7 +271,7 @@ export default function CurrencyInputPanel({
<RowBetween>
{account ? (
<RowFixed style={{ height: '17px' }}>
<ThemedText.Body
<TYPE.body
onClick={onMax}
color={theme.text2}
fontWeight={400}
......@@ -287,7 +287,7 @@ export default function CurrencyInputPanel({
</Trans>
)
) : null}
</ThemedText.Body>
</TYPE.body>
{showMaxButton && selectedCurrencyBalance ? (
<StyledBalanceMax onClick={onMax}>
<Trans>(Max)</Trans>
......
......@@ -4,7 +4,7 @@ import ReactGA from 'react-ga'
import styled from 'styled-components/macro'
import store, { AppState } from '../../state'
import { ExternalLink, ThemedText } from '../../theme'
import { ExternalLink, TYPE } from '../../theme'
import { userAgent } from '../../utils/userAgent'
import { AutoColumn } from '../Column'
import { AutoRow } from '../Row'
......@@ -47,8 +47,6 @@ type ErrorBoundaryState = {
error: Error | null
}
const IS_UNISWAP = window.location.hostname === 'app.uniswap.org'
export default class ErrorBoundary extends React.Component<unknown, ErrorBoundaryState> {
constructor(props: unknown) {
super(props)
......@@ -69,7 +67,6 @@ export default class ErrorBoundary extends React.Component<unknown, ErrorBoundar
render() {
const { error } = this.state
if (error !== null) {
const encodedBody = encodeURIComponent(issueBody(error))
return (
......@@ -77,41 +74,39 @@ export default class ErrorBoundary extends React.Component<unknown, ErrorBoundar
<BodyWrapper>
<AutoColumn gap={'md'}>
<SomethingWentWrongWrapper>
<ThemedText.Label fontSize={24} fontWeight={600}>
<TYPE.label fontSize={24} fontWeight={600}>
<Trans>Something went wrong</Trans>
</ThemedText.Label>
</TYPE.label>
</SomethingWentWrongWrapper>
<CodeBlockWrapper>
<code>
<ThemedText.Main fontSize={10}>{error.stack}</ThemedText.Main>
<TYPE.main fontSize={10}>{error.stack}</TYPE.main>
</code>
</CodeBlockWrapper>
{IS_UNISWAP ? (
<AutoRow>
<LinkWrapper>
<ExternalLink
id="create-github-issue-link"
href={`https://github.com/Uniswap/uniswap-interface/issues/new?assignees=&labels=bug&body=${encodedBody}&title=${encodeURIComponent(
`Crash report: \`${error.name}${error.message && `: ${error.message}`}\``
)}`}
target="_blank"
>
<ThemedText.Link fontSize={16}>
<Trans>Create an issue on GitHub</Trans>
<span></span>
</ThemedText.Link>
</ExternalLink>
</LinkWrapper>
<LinkWrapper>
<ExternalLink id="get-support-on-discord" href="https://discord.gg/FCfyBSbCU5" target="_blank">
<ThemedText.Link fontSize={16}>
<Trans>Get support on Discord</Trans>
<span></span>
</ThemedText.Link>
</ExternalLink>
</LinkWrapper>
</AutoRow>
) : null}
<AutoRow>
<LinkWrapper>
<ExternalLink
id="create-github-issue-link"
href={`https://github.com/Uniswap/uniswap-interface/issues/new?assignees=&labels=bug&body=${encodedBody}&title=${encodeURIComponent(
`Crash report: \`${error.name}${error.message && `: ${error.message}`}\``
)}`}
target="_blank"
>
<TYPE.link fontSize={16}>
<Trans>Create an issue on GitHub</Trans>
<span></span>
</TYPE.link>
</ExternalLink>
</LinkWrapper>
<LinkWrapper>
<ExternalLink id="get-support-on-discord" href="https://discord.gg/FCfyBSbCU5" target="_blank">
<TYPE.link fontSize={16}>
<Trans>Get support on Discord</Trans>
<span></span>
</TYPE.link>
</ExternalLink>
</LinkWrapper>
</AutoRow>
</AutoColumn>
</BodyWrapper>
</FallbackWrapper>
......@@ -126,7 +121,7 @@ function getRelevantState(): null | keyof AppState {
if (!path.startsWith('#/')) {
return null
}
const pieces = path.substring(2).split(/[/\\?]/)
const pieces = path.substring(2).split(/[\/\\?]/)
switch (pieces[0]) {
case 'swap':
return 'swap'
......
......@@ -6,12 +6,12 @@ import { useFeeTierDistribution } from 'hooks/useFeeTierDistribution'
import { PoolState } from 'hooks/usePools'
import React from 'react'
import styled from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
import { FeeTierPercentageBadge } from './FeeTierPercentageBadge'
import { FEE_AMOUNT_DETAIL } from './shared'
const ResponsiveText = styled(ThemedText.Label)`
const ResponsiveText = styled(TYPE.label)`
line-height: 16px;
font-size: 14px;
......@@ -37,9 +37,9 @@ export function FeeOption({ feeAmount, active, poolState, distributions, onClick
<ResponsiveText>
<Trans>{FEE_AMOUNT_DETAIL[feeAmount].label}%</Trans>
</ResponsiveText>
<ThemedText.Main fontWeight={400} fontSize="12px" textAlign="left">
<TYPE.main fontWeight={400} fontSize="12px" textAlign="left">
{FEE_AMOUNT_DETAIL[feeAmount].description}
</ThemedText.Main>
</TYPE.main>
</AutoColumn>
{distributions && (
......
......@@ -4,7 +4,7 @@ import Badge from 'components/Badge'
import { useFeeTierDistribution } from 'hooks/useFeeTierDistribution'
import { PoolState } from 'hooks/usePools'
import React from 'react'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
export function FeeTierPercentageBadge({
feeAmount,
......@@ -17,7 +17,7 @@ export function FeeTierPercentageBadge({
}) {
return (
<Badge>
<ThemedText.Label fontSize={10}>
<TYPE.label fontSize={10}>
{!distributions || poolState === PoolState.NOT_EXISTS || poolState === PoolState.INVALID ? (
<Trans>Not created</Trans>
) : distributions[feeAmount] !== undefined ? (
......@@ -25,7 +25,7 @@ export function FeeTierPercentageBadge({
) : (
<Trans>No data</Trans>
)}
</ThemedText.Label>
</TYPE.label>
</Badge>
)
}
......@@ -14,7 +14,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import ReactGA from 'react-ga'
import { Box } from 'rebass'
import styled, { keyframes } from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
import { FeeOption } from './FeeOption'
import { FeeTierPercentageBadge } from './FeeTierPercentageBadge'
......@@ -149,18 +149,18 @@ export default function FeeSelector({
<AutoColumn id="add-liquidity-selected-fee">
{!feeAmount ? (
<>
<ThemedText.Label>
<TYPE.label>
<Trans>Fee tier</Trans>
</ThemedText.Label>
<ThemedText.Main fontWeight={400} fontSize="12px" textAlign="left">
</TYPE.label>
<TYPE.main fontWeight={400} fontSize="12px" textAlign="left">
<Trans>The % you will earn in fees.</Trans>
</ThemedText.Main>
</TYPE.main>
</>
) : (
<>
<ThemedText.Label className="selected-fee-label">
<TYPE.label className="selected-fee-label">
<Trans>{FEE_AMOUNT_DETAIL[feeAmount].label}% fee tier</Trans>
</ThemedText.Label>
</TYPE.label>
<Box style={{ width: 'fit-content', marginTop: '8px' }} className="selected-fee-percentage">
{distributions && (
<FeeTierPercentageBadge
......
......@@ -6,7 +6,7 @@ import ms from 'ms.macro'
import { useEffect, useState } from 'react'
import { useBlockNumber } from 'state/application/hooks'
import styled, { keyframes } from 'styled-components/macro'
import { ExternalLink, ThemedText } from 'theme'
import { ExternalLink, TYPE } from 'theme'
import { ExplorerDataType, getExplorerLink } from 'utils/getExplorerLink'
import { ChainConnectivityWarning } from './ChainConnectivityWarning'
......@@ -25,7 +25,7 @@ const StyledPolling = styled.div<{ warning: boolean }>`
display: none;
`}
`
const StyledPollingNumber = styled(ThemedText.Small)<{ breathe: boolean; hovering: boolean }>`
const StyledPollingNumber = styled(TYPE.small)<{ breathe: boolean; hovering: boolean }>`
transition: opacity 0.25s ease;
opacity: ${({ breathe, hovering }) => (hovering ? 0.7 : breathe ? 1 : 0.5)};
:hover {
......
......@@ -14,7 +14,7 @@ import useUSDCPrice from '../../hooks/useUSDCPrice'
import { useActiveWeb3React } from '../../hooks/web3'
import { useTotalUniEarned } from '../../state/stake/hooks'
import { useAggregateUniBalance, useTokenBalance } from '../../state/wallet/hooks'
import { ExternalLink, StyledInternalLink, ThemedText, UniTokenAnimated } from '../../theme'
import { ExternalLink, StyledInternalLink, TYPE, UniTokenAnimated } from '../../theme'
import { computeUniCirculation } from '../../utils/computeUniCirculation'
import { AutoColumn } from '../Column'
import { Break, CardBGImage, CardNoise, CardSection, DataCard } from '../earn/styled'
......@@ -70,9 +70,9 @@ export default function UniBalanceContent({ setShowUniBalanceModal }: { setShowU
<CardNoise />
<CardSection gap="md">
<RowBetween>
<ThemedText.White color="white">
<TYPE.white color="white">
<Trans>Your UNI Breakdown</Trans>
</ThemedText.White>
</TYPE.white>
<StyledClose stroke="white" onClick={() => setShowUniBalanceModal(false)} />
</RowBetween>
</CardSection>
......@@ -82,29 +82,29 @@ export default function UniBalanceContent({ setShowUniBalanceModal }: { setShowU
<CardSection gap="sm">
<AutoColumn gap="md" justify="center">
<UniTokenAnimated width="48px" src={tokenLogo} />{' '}
<ThemedText.White fontSize={48} fontWeight={600} color="white">
<TYPE.white fontSize={48} fontWeight={600} color="white">
{total?.toFixed(2, { groupSeparator: ',' })}
</ThemedText.White>
</TYPE.white>
</AutoColumn>
<AutoColumn gap="md">
<RowBetween>
<ThemedText.White color="white">
<TYPE.white color="white">
<Trans>Balance:</Trans>
</ThemedText.White>
<ThemedText.White color="white">{uniBalance?.toFixed(2, { groupSeparator: ',' })}</ThemedText.White>
</TYPE.white>
<TYPE.white color="white">{uniBalance?.toFixed(2, { groupSeparator: ',' })}</TYPE.white>
</RowBetween>
<RowBetween>
<ThemedText.White color="white">
<TYPE.white color="white">
<Trans>Unclaimed:</Trans>
</ThemedText.White>
<ThemedText.White color="white">
</TYPE.white>
<TYPE.white color="white">
{uniToClaim?.toFixed(4, { groupSeparator: ',' })}{' '}
{uniToClaim && uniToClaim.greaterThan('0') && (
<StyledInternalLink onClick={() => setShowUniBalanceModal(false)} to="/uni">
<Trans>(claim)</Trans>
</StyledInternalLink>
)}
</ThemedText.White>
</TYPE.white>
</RowBetween>
</AutoColumn>
</CardSection>
......@@ -114,22 +114,22 @@ export default function UniBalanceContent({ setShowUniBalanceModal }: { setShowU
<CardSection gap="sm">
<AutoColumn gap="md">
<RowBetween>
<ThemedText.White color="white">
<TYPE.white color="white">
<Trans>UNI price:</Trans>
</ThemedText.White>
<ThemedText.White color="white">${uniPrice?.toFixed(2) ?? '-'}</ThemedText.White>
</TYPE.white>
<TYPE.white color="white">${uniPrice?.toFixed(2) ?? '-'}</TYPE.white>
</RowBetween>
<RowBetween>
<ThemedText.White color="white">
<TYPE.white color="white">
<Trans>UNI in circulation:</Trans>
</ThemedText.White>
<ThemedText.White color="white">{circulation?.toFixed(0, { groupSeparator: ',' })}</ThemedText.White>
</TYPE.white>
<TYPE.white color="white">{circulation?.toFixed(0, { groupSeparator: ',' })}</TYPE.white>
</RowBetween>
<RowBetween>
<ThemedText.White color="white">
<TYPE.white color="white">
<Trans>Total Supply</Trans>
</ThemedText.White>
<ThemedText.White color="white">{totalSupply?.toFixed(0, { groupSeparator: ',' })}</ThemedText.White>
</TYPE.white>
<TYPE.white color="white">{totalSupply?.toFixed(0, { groupSeparator: ',' })}</TYPE.white>
</RowBetween>
{uni && uni.chainId === 1 ? (
<ExternalLink href={`${infoLink}/token/${uni.address}`}>
......
......@@ -15,7 +15,7 @@ import styled from 'styled-components/macro'
import { ReactComponent as Logo } from '../../assets/svg/logo.svg'
import { useActiveWeb3React } from '../../hooks/web3'
import { ExternalLink, ThemedText } from '../../theme'
import { ExternalLink, TYPE } from '../../theme'
import ClaimModal from '../claim/ClaimModal'
import { CardNoise } from '../earn/styled'
import Menu from '../Menu'
......@@ -309,7 +309,7 @@ export default function Header() {
{availableClaim && !showClaimPopup && (
<UNIWrapper onClick={toggleClaimModal}>
<UNIAmount active={!!account && !availableClaim} style={{ pointerEvents: 'auto' }}>
<ThemedText.White padding="0 2px">
<TYPE.white padding="0 2px">
{claimTxn && !claimTxn?.receipt ? (
<Dots>
<Trans>Claiming UNI</Trans>
......@@ -317,7 +317,7 @@ export default function Header() {
) : (
<Trans>Claim UNI</Trans>
)}
</ThemedText.White>
</TYPE.white>
</UNIAmount>
<CardNoise />
</UNIWrapper>
......
import jazzicon from '@metamask/jazzicon'
import useENSAvatar from 'hooks/useENSAvatar'
import { useLayoutEffect, useMemo, useRef, useState } from 'react'
import { useEffect, useRef, useState } from 'react'
import styled from 'styled-components/macro'
import { useActiveWeb3React } from '../../hooks/web3'
......@@ -20,29 +20,27 @@ const StyledAvatar = styled.img`
`
export default function Identicon() {
const ref = useRef<HTMLDivElement>(null)
const { account } = useActiveWeb3React()
const { avatar } = useENSAvatar(account ?? undefined)
const [fetchable, setFetchable] = useState(true)
const icon = useMemo(() => account && jazzicon(16, parseInt(account.slice(2, 10), 16)), [account])
const iconRef = useRef<HTMLDivElement>(null)
useLayoutEffect(() => {
const current = iconRef.current
if (icon) {
useEffect(() => {
if ((!avatar || !fetchable) && account) {
const icon = jazzicon(16, parseInt(account?.slice(2, 10), 16))
const current = ref.current
current?.appendChild(icon)
return () => {
current?.removeChild(icon)
}
}
return
}, [icon, iconRef])
}, [account, avatar, fetchable])
return (
<StyledIdenticon>
{avatar && fetchable ? (
<StyledIdenticon ref={ref}>
{avatar && fetchable && (
<StyledAvatar alt="avatar" src={avatar} onError={() => setFetchable(false)}></StyledAvatar>
) : (
<span ref={iconRef} />
)}
</StyledIdenticon>
)
......
......@@ -6,7 +6,7 @@ import { AutoColumn } from 'components/Column'
import { ReactNode, useCallback, useEffect, useState } from 'react'
import { Minus, Plus } from 'react-feather'
import styled, { keyframes } from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
import { Input as NumericalInput } from '../NumericalInput'
......@@ -57,13 +57,13 @@ const StyledInput = styled(NumericalInput)<{ usePercent?: boolean }>`
`};
`
const InputTitle = styled(ThemedText.Small)`
const InputTitle = styled(TYPE.small)`
color: ${({ theme }) => theme.text2};
font-size: 12px;
font-weight: 500;
`
const ButtonLabel = styled(ThemedText.White)<{ disabled: boolean }>`
const ButtonLabel = styled(TYPE.white)<{ disabled: boolean }>`
color: ${({ theme, disabled }) => (disabled ? theme.text2 : theme.text1)} !important;
`
......
......@@ -37,7 +37,7 @@ export const Area = ({
.y0(yScale(0))(
series.filter((d) => {
const value = xScale(xValue(d))
return value > 0 && value <= window.innerWidth
return value > 0 && value <= innerWidth
}) as Iterable<[number, number]>
) ?? undefined
}
......
......@@ -14,7 +14,7 @@ import { batch } from 'react-redux'
import { Bound } from 'state/mint/v3/actions'
import styled from 'styled-components/macro'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { Chart } from './Chart'
import { useDensityChartData } from './hooks'
import { ZoomLevels } from './types'
......@@ -58,9 +58,9 @@ function InfoBox({ message, icon }: { message?: ReactNode; icon: ReactNode }) {
<ColumnCenter style={{ height: '100%', justifyContent: 'center' }}>
{icon}
{message && (
<ThemedText.MediumHeader padding={10} marginTop="20px" textAlign="center">
<TYPE.mediumHeader padding={10} marginTop="20px" textAlign="center">
{message}
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
)}
</ColumnCenter>
)
......
......@@ -5,7 +5,7 @@ import styled, { ThemeContext } from 'styled-components/macro'
import Circle from '../../assets/images/blue-loader.svg'
import { useActiveWeb3React } from '../../hooks/web3'
import { CloseIcon, CustomLightSpinner, ThemedText } from '../../theme'
import { CloseIcon, CustomLightSpinner, TYPE } from '../../theme'
import { ExternalLink } from '../../theme/components'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { AutoColumn, ColumnCenter } from '../Column'
......@@ -32,9 +32,9 @@ export function LoadingView({ children, onDismiss }: { children: any; onDismiss:
</ConfirmedIcon>
<AutoColumn gap="100px" justify={'center'}>
{children}
<ThemedText.SubHeader>
<TYPE.subHeader>
<Trans>Confirm this transaction in your wallet</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</AutoColumn>
</ConfirmOrLoadingWrapper>
)
......@@ -68,9 +68,9 @@ export function SubmittedView({
href={getExplorerLink(chainId, hash, ExplorerDataType.TRANSACTION)}
style={{ marginLeft: '4px' }}
>
<ThemedText.SubHeader>
<TYPE.subHeader>
<Trans>View transaction on Explorer</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</ExternalLink>
)}
</AutoColumn>
......
......@@ -10,7 +10,7 @@ import { useAppDispatch } from 'state/hooks'
import { resetMintState } from 'state/mint/actions'
import { resetMintState as resetMintV3State } from 'state/mint/v3/actions'
import styled from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
import Row, { RowBetween } from '../Row'
import SettingsTab from '../Settings'
......@@ -136,7 +136,7 @@ export function AddRemoveTabs({
>
<StyledArrowLeft stroke={theme.text2} />
</StyledHistoryLink>
<ThemedText.MediumHeader
<TYPE.mediumHeader
fontWeight={500}
fontSize={20}
style={{ flex: '1', margin: 'auto', textAlign: children ? 'start' : 'center' }}
......@@ -148,7 +148,7 @@ export function AddRemoveTabs({
) : (
<Trans>Remove Liquidity</Trans>
)}
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<Box style={{ marginRight: '.5rem' }}>{children}</Box>
<SettingsTab placeholderSlippage={defaultSlippage} />
</RowBetween>
......
......@@ -6,6 +6,7 @@ import ReactGA from 'react-ga'
import styled, { keyframes } from 'styled-components/macro'
import tokenLogo from '../../assets/images/token-logo.png'
import { ButtonPrimary } from '../../components/Button'
import { useActiveWeb3React } from '../../hooks/web3'
import {
useModalOpen,
......@@ -15,8 +16,7 @@ import {
} from '../../state/application/hooks'
import { ApplicationModal } from '../../state/application/reducer'
import { useUserHasAvailableClaim, useUserUnclaimedAmount } from '../../state/claim/hooks'
import { ThemedText } from '../../theme'
import { ButtonPrimary } from '../Button'
import { TYPE } from '../../theme'
import { AutoColumn } from '../Column'
import { CardBGImage, CardNoise } from '../earn/styled'
......@@ -98,10 +98,10 @@ export default function ClaimPopup() {
<StyledClose stroke="white" onClick={toggleShowClaimPopup} />
<AutoColumn style={{ padding: '2rem 0', zIndex: 10 }} justify="center">
<UniToken width="48px" src={tokenLogo} />{' '}
<ThemedText.White style={{ marginTop: '1rem' }} fontSize={36} fontWeight={600}>
<TYPE.white style={{ marginTop: '1rem' }} fontSize={36} fontWeight={600}>
{unclaimedAmount?.toFixed(0, { groupSeparator: ',' } ?? '-')} UNI
</ThemedText.White>
<ThemedText.White style={{ paddingTop: '1.25rem', textAlign: 'center' }} fontWeight={600} color="white">
</TYPE.white>
<TYPE.white style={{ paddingTop: '1.25rem', textAlign: 'center' }} fontWeight={600} color="white">
<span role="img" aria-label="party">
🎉
</span>{' '}
......@@ -109,12 +109,12 @@ export default function ClaimPopup() {
<span role="img" aria-label="party">
🎉
</span>
</ThemedText.White>
<ThemedText.SubHeader style={{ paddingTop: '0.5rem', textAlign: 'center' }} color="white">
</TYPE.white>
<TYPE.subHeader style={{ paddingTop: '0.5rem', textAlign: 'center' }} color="white">
<Trans>
Thanks for being part of the Uniswap community <Heart size={12} />
</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</AutoColumn>
<AutoColumn style={{ zIndex: 10 }} justify="center">
<ButtonPrimary padding="8px" $borderRadius="8px" width={'fit-content'} onClick={handleToggleSelfClaimModal}>
......
......@@ -4,8 +4,8 @@ import styled, { ThemeContext } from 'styled-components/macro'
import { useActiveWeb3React } from '../../hooks/web3'
import { useTransaction } from '../../state/transactions/hooks'
import { ThemedText } from '../../theme'
import { ExternalLink } from '../../theme'
import { TYPE } from '../../theme'
import { ExternalLink } from '../../theme/components'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { TransactionSummary } from '../AccountDetails/TransactionSummary'
import { AutoColumn } from '../Column'
......@@ -30,9 +30,9 @@ export default function TransactionPopup({ hash }: { hash: string }) {
{success ? <CheckCircle color={theme.green1} size={24} /> : <AlertCircle color={theme.red1} size={24} />}
</div>
<AutoColumn gap="8px">
<ThemedText.Body fontWeight={500}>
<TYPE.body fontWeight={500}>
<TransactionSummary info={tx.info} />
</ThemedText.Body>
</TYPE.body>
{chainId && (
<ExternalLink href={getExplorerLink(chainId, hash, ExplorerDataType.TRANSACTION)}>
View on Explorer
......
......@@ -14,7 +14,7 @@ import { useColor } from '../../hooks/useColor'
import { useTotalSupply } from '../../hooks/useTotalSupply'
import { useActiveWeb3React } from '../../hooks/web3'
import { useTokenBalance } from '../../state/wallet/hooks'
import { ExternalLink, ThemedText } from '../../theme'
import { ExternalLink, TYPE } from '../../theme'
import { currencyId } from '../../utils/currencyId'
import { unwrappedToken } from '../../utils/unwrappedToken'
import { ButtonEmpty, ButtonPrimary, ButtonSecondary } from '../Button'
......@@ -142,7 +142,7 @@ export function MinimalPositionCard({ pair, showUnwrapped = false, border }: Pos
</GreyCard>
) : (
<LightCard>
<ThemedText.SubHeader style={{ textAlign: 'center' }}>
<TYPE.subHeader style={{ textAlign: 'center' }}>
<span role="img" aria-label="wizard-icon">
⭐️
</span>{' '}
......@@ -150,7 +150,7 @@ export function MinimalPositionCard({ pair, showUnwrapped = false, border }: Pos
By adding liquidity you&apos;ll earn 0.3% of all trades on this pair proportional to your share of the
pool. Fees are added to the pool, accrue in real time and can be claimed by withdrawing your liquidity.
</Trans>{' '}
</ThemedText.SubHeader>
</TYPE.subHeader>
</LightCard>
)}
</>
......
......@@ -13,7 +13,7 @@ import JSBI from 'jsbi'
import { ReactNode, useCallback, useContext, useState } from 'react'
import { Bound } from 'state/mint/v3/actions'
import { ThemeContext } from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
import { formatTickPrice } from 'utils/formatTickPrice'
import { unwrappedToken } from 'utils/unwrappedToken'
......@@ -70,9 +70,9 @@ export const PositionPreview = ({
size={24}
margin={true}
/>
<ThemedText.Label ml="10px" fontSize="24px">
<TYPE.label ml="10px" fontSize="24px">
{currency0?.symbol} / {currency1?.symbol}
</ThemedText.Label>
</TYPE.label>
</RowFixed>
<RangeBadge removed={removed} inRange={inRange} />
</RowBetween>
......@@ -82,36 +82,36 @@ export const PositionPreview = ({
<RowBetween>
<RowFixed>
<CurrencyLogo currency={currency0} />
<ThemedText.Label ml="8px">{currency0?.symbol}</ThemedText.Label>
<TYPE.label ml="8px">{currency0?.symbol}</TYPE.label>
</RowFixed>
<RowFixed>
<ThemedText.Label mr="8px">{position.amount0.toSignificant(4)}</ThemedText.Label>
<TYPE.label mr="8px">{position.amount0.toSignificant(4)}</TYPE.label>
</RowFixed>
</RowBetween>
<RowBetween>
<RowFixed>
<CurrencyLogo currency={currency1} />
<ThemedText.Label ml="8px">{currency1?.symbol}</ThemedText.Label>
<TYPE.label ml="8px">{currency1?.symbol}</TYPE.label>
</RowFixed>
<RowFixed>
<ThemedText.Label mr="8px">{position.amount1.toSignificant(4)}</ThemedText.Label>
<TYPE.label mr="8px">{position.amount1.toSignificant(4)}</TYPE.label>
</RowFixed>
</RowBetween>
<Break />
<RowBetween>
<ThemedText.Label>
<TYPE.label>
<Trans>Fee Tier</Trans>
</ThemedText.Label>
<ThemedText.Label>
</TYPE.label>
<TYPE.label>
<Trans>{position?.pool?.fee / 10000}%</Trans>
</ThemedText.Label>
</TYPE.label>
</RowBetween>
</AutoColumn>
</LightCard>
<AutoColumn gap="md">
<RowBetween>
{title ? <ThemedText.Main>{title}</ThemedText.Main> : <div />}
{title ? <TYPE.main>{title}</TYPE.main> : <div />}
<RateToggle
currencyA={sorted ? currency0 : currency1}
currencyB={sorted ? currency1 : currency0}
......@@ -122,57 +122,57 @@ export const PositionPreview = ({
<RowBetween>
<LightCard width="48%" padding="8px">
<AutoColumn gap="4px" justify="center">
<ThemedText.Main fontSize="12px">
<TYPE.main fontSize="12px">
<Trans>Min Price</Trans>
</ThemedText.Main>
<ThemedText.MediumHeader textAlign="center">{`${formatTickPrice(
</TYPE.main>
<TYPE.mediumHeader textAlign="center">{`${formatTickPrice(
priceLower,
ticksAtLimit,
Bound.LOWER
)}`}</ThemedText.MediumHeader>
<ThemedText.Main textAlign="center" fontSize="12px">
)}`}</TYPE.mediumHeader>
<TYPE.main textAlign="center" fontSize="12px">
<Trans>
{quoteCurrency.symbol} per {baseCurrency.symbol}
</Trans>
</ThemedText.Main>
<ThemedText.Small textAlign="center" color={theme.text3} style={{ marginTop: '4px' }}>
</TYPE.main>
<TYPE.small textAlign="center" color={theme.text3} style={{ marginTop: '4px' }}>
<Trans>Your position will be 100% composed of {baseCurrency?.symbol} at this price</Trans>
</ThemedText.Small>
</TYPE.small>
</AutoColumn>
</LightCard>
<LightCard width="48%" padding="8px">
<AutoColumn gap="4px" justify="center">
<ThemedText.Main fontSize="12px">
<TYPE.main fontSize="12px">
<Trans>Max Price</Trans>
</ThemedText.Main>
<ThemedText.MediumHeader textAlign="center">{`${formatTickPrice(
</TYPE.main>
<TYPE.mediumHeader textAlign="center">{`${formatTickPrice(
priceUpper,
ticksAtLimit,
Bound.UPPER
)}`}</ThemedText.MediumHeader>
<ThemedText.Main textAlign="center" fontSize="12px">
)}`}</TYPE.mediumHeader>
<TYPE.main textAlign="center" fontSize="12px">
<Trans>
{quoteCurrency.symbol} per {baseCurrency.symbol}
</Trans>
</ThemedText.Main>
<ThemedText.Small textAlign="center" color={theme.text3} style={{ marginTop: '4px' }}>
</TYPE.main>
<TYPE.small textAlign="center" color={theme.text3} style={{ marginTop: '4px' }}>
<Trans>Your position will be 100% composed of {quoteCurrency?.symbol} at this price</Trans>
</ThemedText.Small>
</TYPE.small>
</AutoColumn>
</LightCard>
</RowBetween>
<LightCard padding="12px ">
<AutoColumn gap="4px" justify="center">
<ThemedText.Main fontSize="12px">
<TYPE.main fontSize="12px">
<Trans>Current price</Trans>
</ThemedText.Main>
<ThemedText.MediumHeader>{`${price.toSignificant(5)} `}</ThemedText.MediumHeader>
<ThemedText.Main textAlign="center" fontSize="12px">
</TYPE.main>
<TYPE.mediumHeader>{`${price.toSignificant(5)} `}</TYPE.mediumHeader>
<TYPE.main textAlign="center" fontSize="12px">
<Trans>
{quoteCurrency.symbol} per {baseCurrency.symbol}
</Trans>
</ThemedText.Main>
</TYPE.main>
</AutoColumn>
</LightCard>
</AutoColumn>
......
......@@ -5,7 +5,7 @@ import { useEffect, useRef } from 'react'
import { ArrowDown, Info, X } from 'react-feather'
import ReactGA from 'react-ga'
import styled from 'styled-components/macro'
import { ExternalLink, ThemedText } from 'theme'
import { ExternalLink, TYPE } from 'theme'
import { isMobile } from 'utils/userAgent'
import { useModalOpen, useTogglePrivacyPolicy } from '../../state/application/hooks'
......@@ -91,9 +91,9 @@ export function PrivacyPolicyModal() {
<Modal isOpen={open} onDismiss={() => toggle()}>
<AutoColumn gap="12px" ref={node as any}>
<RowBetween padding="1rem 1rem 0.5rem 1rem">
<ThemedText.MediumHeader>
<TYPE.mediumHeader>
<Trans>Legal & Privacy</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<HoverText onClick={() => toggle()}>
<X size={24} />
</HoverText>
......@@ -122,9 +122,9 @@ export function PrivacyPolicy() {
<RowBetween>
<AutoRow gap="4px">
<Info size={20} />
<ThemedText.Main fontSize={14} color={'primaryText1'}>
<TYPE.main fontSize={14} color={'primaryText1'}>
<Trans>Uniswap Labs&apos; Terms of Service</Trans>
</ThemedText.Main>
</TYPE.main>
</AutoRow>
<StyledLinkOut size={20} />
</RowBetween>
......@@ -135,29 +135,29 @@ export function PrivacyPolicy() {
<RowBetween>
<AutoRow gap="4px">
<Info size={20} />
<ThemedText.Main fontSize={14} color={'primaryText1'}>
<TYPE.main fontSize={14} color={'primaryText1'}>
<Trans>Protocol Disclaimer</Trans>
</ThemedText.Main>
</TYPE.main>
</AutoRow>
<StyledLinkOut size={20} />
</RowBetween>
</ExternalLink>
</StyledExternalCard>
</AutoColumn>
<ThemedText.Main fontSize={14}>
<TYPE.main fontSize={14}>
<Trans>This app uses the following third-party APIs:</Trans>
</ThemedText.Main>
</TYPE.main>
<AutoColumn gap="12px">
{EXTERNAL_APIS.map(({ name, description }, i) => (
<DarkGreyCard key={i}>
<AutoColumn gap="8px">
<AutoRow gap="4px">
<Info size={18} />
<ThemedText.Main fontSize={14} color={'text1'}>
<TYPE.main fontSize={14} color={'text1'}>
{name}
</ThemedText.Main>
</TYPE.main>
</AutoRow>
<ThemedText.Main fontSize={14}>{description}</ThemedText.Main>
<TYPE.main fontSize={14}>{description}</TYPE.main>
</AutoColumn>
</DarkGreyCard>
))}
......
......@@ -2,7 +2,7 @@ import { useContext } from 'react'
import styled from 'styled-components/macro'
import { ThemeContext } from 'styled-components/macro'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { AutoColumn } from '../Column'
const Wrapper = styled(AutoColumn)`
......@@ -65,7 +65,7 @@ export default function ProgressCircles({ steps, disabled = false, ...rest }: Pr
<Circle confirmed={step} disabled={disabled || (!steps[i - 1] && i !== 0)}>
{step ? '' : i + 1 + '.'}
</Circle>
<ThemedText.Main color={theme.text4}>|</ThemedText.Main>
<TYPE.main color={theme.text4}>|</TYPE.main>
</CircleRow>
)
})}
......
......@@ -4,7 +4,7 @@ import { AutoRow } from 'components/Row'
import React from 'react'
import ReactGA from 'react-ga'
import styled from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
const Button = styled(ButtonOutlined).attrs(() => ({
padding: '8px',
......@@ -26,9 +26,9 @@ export default function PresetsButtons({ setFullRange }: { setFullRange: () => v
})
}}
>
<ThemedText.Body fontSize={12}>
<TYPE.body fontSize={12}>
<Trans>Full Range</Trans>
</ThemedText.Body>
</TYPE.body>
</Button>
</AutoRow>
)
......
......@@ -7,7 +7,7 @@ import Row, { AutoRow } from 'components/Row'
import { useTokenInfoFromActiveList } from 'hooks/useTokenInfoFromActiveList'
import { Box } from 'rebass'
import styled from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
import { ReactComponent as DotLine } from '../../assets/svg/dot_line.svg'
......@@ -93,9 +93,9 @@ function Route({ percent, path }: { percent: RoutingDiagramEntry['percent']; pat
<DotColor />
</DottedLine>
<OpaqueBadge>
<ThemedText.Small fontSize={12} style={{ wordBreak: 'normal' }}>
<TYPE.small fontSize={12} style={{ wordBreak: 'normal' }}>
{percent.toSignificant(2)}%
</ThemedText.Small>
</TYPE.small>
</OpaqueBadge>
<AutoRow gap="1px" width="100%" style={{ justifyContent: 'space-evenly', zIndex: 2 }}>
......@@ -116,7 +116,7 @@ function Pool({ currency0, currency1, feeAmount }: { currency0: Currency; curren
<Box margin="0 5px 0 10px">
<DoubleCurrencyLogo currency0={tokenInfo1} currency1={tokenInfo0} size={20} />
</Box>
<ThemedText.Small fontSize={12}>{feeAmount / 10000}%</ThemedText.Small>
<TYPE.small fontSize={12}>{feeAmount / 10000}%</TYPE.small>
</PoolBadge>
)
}
......@@ -3,7 +3,7 @@ import { Token } from '@uniswap/sdk-core'
import { ButtonPrimary } from 'components/Button'
import { AlertCircle, ArrowLeft } from 'react-feather'
import styled from 'styled-components/macro'
import { CloseIcon, ThemedText } from 'theme'
import { CloseIcon, TYPE } from 'theme'
import TokenImportCard from './TokenImportCard'
......@@ -22,7 +22,7 @@ const Button = styled(ButtonPrimary)`
const Content = styled.div`
padding: 1em;
`
const Copy = styled(ThemedText.Body)`
const Copy = styled(TYPE.body)`
text-align: center;
margin: 0 2em 1em !important;
font-weight: 400;
......@@ -51,9 +51,9 @@ const BlockedToken = ({ onBack, onDismiss, blockedTokens }: BlockedTokenProps) =
<Wrapper>
<Header>
{onBack ? <ArrowLeft style={{ cursor: 'pointer' }} onClick={onBack} /> : <div />}
<ThemedText.MediumHeader>
<TYPE.mediumHeader>
<Trans>Token not supported</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
{onDismiss ? <CloseIcon onClick={onDismiss} /> : <div />}
</Header>
<Icon />
......
......@@ -14,7 +14,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import { useCombinedActiveList } from '../../state/lists/hooks'
import { WrappedTokenInfo } from '../../state/lists/wrappedTokenInfo'
import { useCurrencyBalance } from '../../state/wallet/hooks'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { isTokenOnList } from '../../utils'
import Column from '../Column'
import CurrencyLogo from '../CurrencyLogo'
......@@ -135,13 +135,13 @@ function CurrencyRow({
<Text title={currency.name} fontWeight={500}>
{currency.symbol}
</Text>
<ThemedText.DarkGray ml="0px" fontSize={'12px'} fontWeight={300}>
<TYPE.darkGray ml="0px" fontSize={'12px'} fontWeight={300}>
{!currency.isNative && !isOnSelectedList && customAdded ? (
<Trans>{currency.name} • Added by user</Trans>
) : (
currency.name
)}
</ThemedText.DarkGray>
</TYPE.darkGray>
</Column>
<TokenTags currency={currency} />
{showCurrencyAmount && (
......@@ -167,9 +167,9 @@ function BreakLineComponent({ style }: { style: CSSProperties }) {
<RowBetween>
<RowFixed>
<TokenListLogoWrapper src={TokenListLogo} />
<ThemedText.Main ml="6px" fontSize="12px" color={theme.text1}>
<TYPE.main ml="6px" fontSize="12px" color={theme.text1}>
<Trans>Expanded results from inactive Token Lists</Trans>
</ThemedText.Main>
</TYPE.main>
</RowFixed>
<QuestionHelper
text={
......
......@@ -16,7 +16,7 @@ import styled from 'styled-components/macro'
import { ExtendedEther } from '../../constants/tokens'
import { useAllTokens, useIsUserAddedToken, useSearchInactiveTokenLists, useToken } from '../../hooks/Tokens'
import { useActiveWeb3React } from '../../hooks/web3'
import { ButtonText, CloseIcon, IconWrapper, ThemedText } from '../../theme'
import { ButtonText, CloseIcon, IconWrapper, TYPE } from '../../theme'
import { isAddress } from '../../utils'
import Column from '../Column'
import Row, { RowBetween, RowFixed } from '../Row'
......@@ -224,9 +224,9 @@ export function CurrencySearch({
</div>
) : (
<Column style={{ padding: '20px', height: '100%' }}>
<ThemedText.Main color={theme.text3} textAlign="center" mb="20px">
<TYPE.main color={theme.text3} textAlign="center" mb="20px">
<Trans>No results found.</Trans>
</ThemedText.Main>
</TYPE.main>
</Column>
)}
<Footer>
......@@ -236,9 +236,9 @@ export function CurrencySearch({
<IconWrapper size="16px" marginRight="6px" stroke={theme.primaryText1}>
<Edit />
</IconWrapper>
<ThemedText.Main color={theme.primaryText1}>
<TYPE.main color={theme.primaryText1}>
<Trans>Manage Token Lists</Trans>
</ThemedText.Main>
</TYPE.main>
</RowFixed>
</ButtonText>
</Row>
......
......@@ -16,9 +16,9 @@ import { useAppDispatch } from 'state/hooks'
import { enableList, removeList } from 'state/lists/actions'
import { useAllLists } from 'state/lists/hooks'
import styled from 'styled-components/macro'
import { CloseIcon, ThemedText } from 'theme'
import { CloseIcon, TYPE } from 'theme'
import { ExternalLink } from '../../theme'
import { ExternalLink } from '../../theme/components'
import { CurrencyModalView } from './CurrencySearchModal'
import { Checkbox, PaddedColumn, TextDot } from './styleds'
......@@ -81,9 +81,9 @@ export function ImportList({ listURL, list, setModalView, onDismiss }: ImportPro
<PaddedColumn gap="14px" style={{ width: '100%', flex: '1 1' }}>
<RowBetween>
<ArrowLeft style={{ cursor: 'pointer' }} onClick={() => setModalView(CurrencyModalView.manage)} />
<ThemedText.MediumHeader>
<TYPE.mediumHeader>
<Trans>Import List</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<CloseIcon onClick={onDismiss} />
</RowBetween>
</PaddedColumn>
......@@ -96,18 +96,18 @@ export function ImportList({ listURL, list, setModalView, onDismiss }: ImportPro
{list.logoURI && <ListLogo logoURI={list.logoURI} size="40px" />}
<AutoColumn gap="sm" style={{ marginLeft: '20px' }}>
<RowFixed>
<ThemedText.Body fontWeight={600} mr="6px">
<TYPE.body fontWeight={600} mr="6px">
{list.name}
</ThemedText.Body>
</TYPE.body>
<TextDot />
<ThemedText.Main fontSize={'16px'} ml="6px">
<TYPE.main fontSize={'16px'} ml="6px">
<Trans>{list.tokens.length} tokens</Trans>
</ThemedText.Main>
</TYPE.main>
</RowFixed>
<ExternalLink href={`https://tokenlists.org/token-list?url=${listURL}`}>
<ThemedText.Main fontSize={'12px'} color={theme.blue1}>
<TYPE.main fontSize={'12px'} color={theme.blue1}>
{listURL}
</ThemedText.Main>
</TYPE.main>
</ExternalLink>
</AutoColumn>
</RowFixed>
......@@ -116,22 +116,22 @@ export function ImportList({ listURL, list, setModalView, onDismiss }: ImportPro
<Card style={{ backgroundColor: transparentize(0.8, theme.red1) }}>
<AutoColumn justify="center" style={{ textAlign: 'center', gap: '16px', marginBottom: '12px' }}>
<AlertTriangle stroke={theme.red1} size={32} />
<ThemedText.Body fontWeight={500} fontSize={20} color={theme.red1}>
<TYPE.body fontWeight={500} fontSize={20} color={theme.red1}>
<Trans>Import at your own risk</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
<AutoColumn style={{ textAlign: 'center', gap: '16px', marginBottom: '12px' }}>
<ThemedText.Body fontWeight={500} color={theme.red1}>
<TYPE.body fontWeight={500} color={theme.red1}>
<Trans>
By adding this list you are implicitly trusting that the data is correct. Anyone can create a list,
including creating fake versions of existing lists and lists that claim to represent projects that do
not have one.
</Trans>
</ThemedText.Body>
<ThemedText.Body fontWeight={600} color={theme.red1}>
</TYPE.body>
<TYPE.body fontWeight={600} color={theme.red1}>
<Trans>If you purchase a token from this list, you may not be able to sell it back.</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
<AutoRow justify="center" style={{ cursor: 'pointer' }} onClick={() => setConfirmed(!confirmed)}>
<Checkbox
......@@ -140,9 +140,9 @@ export function ImportList({ listURL, list, setModalView, onDismiss }: ImportPro
checked={confirmed}
onChange={() => setConfirmed(!confirmed)}
/>
<ThemedText.Body ml="10px" fontSize="16px" color={theme.red1} fontWeight={500}>
<TYPE.body ml="10px" fontSize="16px" color={theme.red1} fontWeight={500}>
<Trans>I understand</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoRow>
</Card>
......@@ -156,9 +156,9 @@ export function ImportList({ listURL, list, setModalView, onDismiss }: ImportPro
<Trans>Import</Trans>
</ButtonPrimary>
{addError ? (
<ThemedText.Error title={addError} style={{ textOverflow: 'ellipsis', overflow: 'hidden' }} error>
<TYPE.error title={addError} style={{ textOverflow: 'ellipsis', overflow: 'hidden' }} error>
{addError}
</ThemedText.Error>
</TYPE.error>
) : null}
</AutoColumn>
{/* </Card> */}
......
......@@ -10,7 +10,7 @@ import useTheme from 'hooks/useTheme'
import { CSSProperties } from 'react'
import { CheckCircle } from 'react-feather'
import styled from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
import { WrappedTokenInfo } from '../../state/lists/wrappedTokenInfo'
......@@ -67,16 +67,16 @@ export default function ImportRow({
<CurrencyLogo currency={token} size={'24px'} style={{ opacity: dim ? '0.6' : '1' }} />
<AutoColumn gap="4px" style={{ opacity: dim ? '0.6' : '1' }}>
<AutoRow>
<ThemedText.Body fontWeight={500}>{token.symbol}</ThemedText.Body>
<ThemedText.DarkGray ml="8px" fontWeight={300}>
<TYPE.body fontWeight={500}>{token.symbol}</TYPE.body>
<TYPE.darkGray ml="8px" fontWeight={300}>
<NameOverflow title={token.name}>{token.name}</NameOverflow>
</ThemedText.DarkGray>
</TYPE.darkGray>
</AutoRow>
{list && list.logoURI && (
<RowFixed>
<ThemedText.Small mr="4px" color={theme.text3}>
<TYPE.small mr="4px" color={theme.text3}>
<Trans>via {list.name} </Trans>
</ThemedText.Small>
</TYPE.small>
<ListLogo logoURI={list.logoURI} size="12px" />
</RowFixed>
)}
......@@ -97,9 +97,9 @@ export default function ImportRow({
) : (
<RowFixed style={{ minWidth: 'fit-content' }}>
<CheckIcon />
<ThemedText.Main color={theme.green1}>
<TYPE.main color={theme.green1}>
<Trans>Active</Trans>
</ThemedText.Main>
</TYPE.main>
</RowFixed>
)}
</TokenSection>
......
......@@ -10,7 +10,7 @@ import useTheme from 'hooks/useTheme'
import { AlertCircle, ArrowLeft } from 'react-feather'
import { useAddUserToken } from 'state/user/hooks'
import styled from 'styled-components/macro'
import { CloseIcon, ThemedText } from 'theme'
import { CloseIcon, TYPE } from 'theme'
import BlockedToken from './BlockedToken'
import { PaddedColumn } from './styleds'
......@@ -47,9 +47,9 @@ export function ImportToken(props: ImportProps) {
<PaddedColumn gap="14px" style={{ width: '100%', flex: '1 1' }}>
<RowBetween>
{onBack ? <ArrowLeft style={{ cursor: 'pointer' }} onClick={onBack} /> : <div />}
<ThemedText.MediumHeader>
<TYPE.mediumHeader>
<Plural value={tokens.length} one="Import token" other="Import tokens" />
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
{onDismiss ? <CloseIcon onClick={onDismiss} /> : <div />}
</RowBetween>
</PaddedColumn>
......@@ -57,12 +57,12 @@ export function ImportToken(props: ImportProps) {
<AutoColumn gap="md" style={{ marginBottom: '32px', padding: '1rem' }}>
<AutoColumn justify="center" style={{ textAlign: 'center', gap: '16px', padding: '1rem' }}>
<AlertCircle size={48} stroke={theme.text2} strokeWidth={1} />
<ThemedText.Body fontWeight={400} fontSize={16}>
<TYPE.body fontWeight={400} fontSize={16}>
<Trans>
This token doesn&apos;t appear on the active token list(s). Make sure this is the token that you want to
trade.
</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
{tokens.map((token) => (
<TokenImportCard token={token} list={list} key={'import' + token.address} />
......
......@@ -18,7 +18,7 @@ import useTheme from '../../hooks/useTheme'
import useToggle from '../../hooks/useToggle'
import { acceptListUpdate, disableList, enableList, removeList } from '../../state/lists/actions'
import { useActiveListUrls, useAllLists, useIsListActive } from '../../state/lists/hooks'
import { ExternalLink, IconWrapper, LinkStyledButton, ThemedText } from '../../theme'
import { ExternalLink, IconWrapper, LinkStyledButton, TYPE } from '../../theme'
import listVersionLabel from '../../utils/listVersionLabel'
import { parseENSAddress } from '../../utils/parseENSAddress'
import uriToHttp from '../../utils/uriToHttp'
......@@ -75,7 +75,7 @@ const StyledTitleText = styled.div<{ active: boolean }>`
color: ${({ theme, active }) => (active ? theme.white : theme.text2)};
`
const StyledListUrlText = styled(ThemedText.Main)<{ active: boolean }>`
const StyledListUrlText = styled(TYPE.main)<{ active: boolean }>`
font-size: 12px;
color: ${({ theme, active }) => (active ? theme.white : theme.text2)};
`
......@@ -361,9 +361,9 @@ export function ManageLists({
/>
</Row>
{addError ? (
<ThemedText.Error title={addError} style={{ textOverflow: 'ellipsis', overflow: 'hidden' }} error>
<TYPE.error title={addError} style={{ textOverflow: 'ellipsis', overflow: 'hidden' }} error>
{addError}
</ThemedText.Error>
</TYPE.error>
) : null}
</PaddedColumn>
{tempList && (
......@@ -373,10 +373,10 @@ export function ManageLists({
<RowFixed>
{tempList.logoURI && <ListLogo logoURI={tempList.logoURI} size="40px" />}
<AutoColumn gap="4px" style={{ marginLeft: '20px' }}>
<ThemedText.Body fontWeight={600}>{tempList.name}</ThemedText.Body>
<ThemedText.Main fontSize={'12px'}>
<TYPE.body fontWeight={600}>{tempList.name}</TYPE.body>
<TYPE.main fontSize={'12px'}>
<Trans>{tempList.tokens.length} tokens</Trans>
</ThemedText.Main>
</TYPE.main>
</AutoColumn>
</RowFixed>
{isImported ? (
......@@ -384,9 +384,9 @@ export function ManageLists({
<IconWrapper stroke={theme.text2} size="16px" marginRight={'10px'}>
<CheckCircle />
</IconWrapper>
<ThemedText.Body color={theme.text2}>
<TYPE.body color={theme.text2}>
<Trans>Loaded</Trans>
</ThemedText.Body>
</TYPE.body>
</RowFixed>
) : (
<ButtonPrimary
......
......@@ -9,7 +9,7 @@ import { useActiveWeb3React } from 'hooks/web3'
import { RefObject, useCallback, useMemo, useRef, useState } from 'react'
import { useRemoveUserAddedToken, useUserAddedTokens } from 'state/user/hooks'
import styled from 'styled-components/macro'
import { ButtonText, ExternalLink, ExternalLinkIcon, ThemedText, TrashIcon } from 'theme'
import { ButtonText, ExternalLink, ExternalLinkIcon, TrashIcon, TYPE } from 'theme'
import { isAddress } from 'utils'
import useTheme from '../../hooks/useTheme'
......@@ -81,9 +81,9 @@ export default function ManageTokens({
<RowFixed>
<CurrencyLogo currency={token} size={'20px'} />
<ExternalLink href={getExplorerLink(chainId, token.address, ExplorerDataType.ADDRESS)}>
<ThemedText.Main ml={'10px'} fontWeight={600}>
<TYPE.main ml={'10px'} fontWeight={600}>
{token.symbol}
</ThemedText.Main>
</TYPE.main>
</ExternalLink>
</RowFixed>
<RowFixed>
......@@ -111,9 +111,9 @@ export default function ManageTokens({
/>
</Row>
{searchQuery !== '' && !isAddressSearch && (
<ThemedText.Error error={true}>
<TYPE.error error={true}>
<Trans>Enter valid token address</Trans>
</ThemedText.Error>
</TYPE.error>
)}
{searchToken && (
<Card backgroundColor={theme.bg2} padding="10px 0">
......@@ -129,14 +129,14 @@ export default function ManageTokens({
<Separator />
<PaddedColumn gap="lg" style={{ overflow: 'auto', marginBottom: '10px' }}>
<RowBetween>
<ThemedText.Main fontWeight={600}>
<TYPE.main fontWeight={600}>
<Trans>{userAddedTokens?.length} Custom Tokens</Trans>
</ThemedText.Main>
</TYPE.main>
{userAddedTokens.length > 0 && (
<ButtonText onClick={handleRemoveAll}>
<ThemedText.Blue>
<TYPE.blue>
<Trans>Clear all</Trans>
</ThemedText.Blue>
</TYPE.blue>
</ButtonText>
)}
</RowBetween>
......@@ -144,9 +144,9 @@ export default function ManageTokens({
</PaddedColumn>
</Column>
<Footer>
<ThemedText.DarkGray>
<TYPE.darkGray>
<Trans>Tip: Custom tokens are stored locally in your browser</Trans>
</ThemedText.DarkGray>
</TYPE.darkGray>
</Footer>
</Wrapper>
)
......
......@@ -10,7 +10,7 @@ import { useActiveWeb3React } from 'hooks/web3'
import { transparentize } from 'polished'
import { AlertCircle } from 'react-feather'
import styled, { useTheme } from 'styled-components/macro'
import { ExternalLink, ThemedText } from 'theme'
import { ExternalLink, TYPE } from 'theme'
import { ExplorerDataType, getExplorerLink } from 'utils/getExplorerLink'
const WarningWrapper = styled(Card)<{ highWarning: boolean }>`
......@@ -19,7 +19,7 @@ const WarningWrapper = styled(Card)<{ highWarning: boolean }>`
width: fit-content;
`
const AddressText = styled(ThemedText.Blue)`
const AddressText = styled(TYPE.blue)`
font-size: 12px;
word-break: break-all;
......@@ -39,12 +39,12 @@ const TokenImportCard = ({ list, token }: TokenImportCardProps) => {
<AutoColumn gap="10px" justify="center">
<CurrencyLogo currency={token} size={'32px'} />
<AutoColumn gap="4px" justify="center">
<ThemedText.Body ml="8px" mr="8px" fontWeight={500} fontSize={20}>
<TYPE.body ml="8px" mr="8px" fontWeight={500} fontSize={20}>
{token.symbol}
</ThemedText.Body>
<ThemedText.DarkGray fontWeight={400} fontSize={14}>
</TYPE.body>
<TYPE.darkGray fontWeight={400} fontSize={14}>
{token.name}
</ThemedText.DarkGray>
</TYPE.darkGray>
</AutoColumn>
{chainId && (
<ExternalLink href={getExplorerLink(chainId, token.address, ExplorerDataType.ADDRESS)}>
......@@ -54,17 +54,17 @@ const TokenImportCard = ({ list, token }: TokenImportCardProps) => {
{list !== undefined ? (
<RowFixed>
{list.logoURI && <ListLogo logoURI={list.logoURI} size="16px" />}
<ThemedText.Small ml="6px" fontSize={14} color={theme.text3}>
<TYPE.small ml="6px" fontSize={14} color={theme.text3}>
<Trans>via {list.name} token list</Trans>
</ThemedText.Small>
</TYPE.small>
</RowFixed>
) : (
<WarningWrapper $borderRadius="4px" padding="4px" highWarning={true}>
<RowFixed>
<AlertCircle stroke={theme.red1} size="10px" />
<ThemedText.Body color={theme.red1} ml="4px" fontSize="10px" fontWeight={500}>
<TYPE.body color={theme.red1} ml="4px" fontSize="10px" fontWeight={500}>
<Trans>Unknown Source</Trans>
</ThemedText.Body>
</TYPE.body>
</RowFixed>
</WarningWrapper>
)}
......
......@@ -13,7 +13,7 @@ import { useOnClickOutside } from '../../hooks/useOnClickOutside'
import { useModalOpen, useToggleSettingsMenu } from '../../state/application/hooks'
import { ApplicationModal } from '../../state/application/reducer'
import { useClientSideRouter, useExpertModeManager } from '../../state/user/hooks'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { ButtonError } from '../Button'
import { AutoColumn } from '../Column'
import Modal from '../Modal'
......@@ -203,9 +203,9 @@ export default function SettingsTab({ placeholderSlippage }: { placeholderSlippa
{chainId === SupportedChainId.MAINNET && (
<RowBetween>
<RowFixed>
<ThemedText.Black fontWeight={400} fontSize={14} color={theme.text2}>
<TYPE.black fontWeight={400} fontSize={14} color={theme.text2}>
<Trans>Auto Router</Trans>
</ThemedText.Black>
</TYPE.black>
<QuestionHelper
text={<Trans>Use the Uniswap Labs API to get better pricing through a more efficient route.</Trans>}
/>
......@@ -226,9 +226,9 @@ export default function SettingsTab({ placeholderSlippage }: { placeholderSlippa
<RowBetween>
<RowFixed>
<ThemedText.Black fontWeight={400} fontSize={14} color={theme.text2}>
<TYPE.black fontWeight={400} fontSize={14} color={theme.text2}>
<Trans>Expert Mode</Trans>
</ThemedText.Black>
</TYPE.black>
<QuestionHelper
text={
<Trans>Allow high price impact trades and skip the confirm screen. Use at your own risk.</Trans>
......
......@@ -5,9 +5,9 @@ import styled from 'styled-components/macro'
import { DEFAULT_LOCALE, LOCALE_LABEL, SupportedLocale } from '../../constants/locales'
import { navigatorLocale, useActiveLocale } from '../../hooks/useActiveLocale'
import { StyledInternalLink, ThemedText } from '../../theme'
import { StyledInternalLink, TYPE } from '../../theme'
const Container = styled(ThemedText.Small)`
const Container = styled(TYPE.small)`
opacity: 0.6;
:hover {
opacity: 1;
......
import { Trans } from '@lingui/macro'
import styled from 'styled-components/macro'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
const Wrapper = styled.button<{ isActive?: boolean; activeElement?: boolean }>`
border-radius: 20px;
......@@ -25,7 +25,7 @@ const ToggleElement = styled.span<{ isActive?: boolean; bgColor?: string }>`
}
`
const StatusText = styled(ThemedText.Main)<{ isActive?: boolean }>`
const StatusText = styled(TYPE.main)<{ isActive?: boolean }>`
margin: 0 10px;
width: 24px;
color: ${({ theme, isActive }) => (isActive ? theme.text1 : theme.text3)};
......
......@@ -13,7 +13,7 @@ import Circle from '../../assets/images/blue-loader.svg'
import MetaMaskLogo from '../../assets/images/metamask.png'
import { useActiveWeb3React } from '../../hooks/web3'
import { ExternalLink } from '../../theme'
import { CloseIcon, CustomLightSpinner } from '../../theme'
import { CloseIcon, CustomLightSpinner } from '../../theme/components'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { TransactionSummary } from '../AccountDetails/TransactionSummary'
import { ButtonLight, ButtonPrimary } from '../Button'
......@@ -284,11 +284,11 @@ function L2Content({
</Text>
</ExternalLink>
) : (
<div style={{ height: '17px' }} />
<div style={{ height: '17px' }}></div>
)}
<Text color={theme.text3} style={{ margin: '20px 0 0 0' }} fontSize={'14px'}>
{!secondsToConfirm ? (
<div style={{ height: '24px' }} />
<div style={{ height: '24px' }}></div>
) : (
<div>
<Trans>Transaction completed in </Trans>
......
......@@ -8,7 +8,7 @@ import { useContext, useState } from 'react'
import { useSetUserSlippageTolerance, useUserSlippageTolerance, useUserTransactionTTL } from 'state/user/hooks'
import styled, { ThemeContext } from 'styled-components/macro'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { AutoColumn } from '../Column'
import QuestionHelper from '../QuestionHelper'
import { RowBetween, RowFixed } from '../Row'
......@@ -160,9 +160,9 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
<AutoColumn gap="md">
<AutoColumn gap="sm">
<RowFixed>
<ThemedText.Black fontWeight={400} fontSize={14} color={theme.text2}>
<TYPE.black fontWeight={400} fontSize={14} color={theme.text2}>
<Trans>Slippage tolerance</Trans>
</ThemedText.Black>
</TYPE.black>
<QuestionHelper
text={
<Trans>Your transaction will revert if the price changes unfavorably by more than this percentage.</Trans>
......@@ -229,9 +229,9 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
{showCustomDeadlineRow && (
<AutoColumn gap="sm">
<RowFixed>
<ThemedText.Black fontSize={14} fontWeight={400} color={theme.text2}>
<TYPE.black fontSize={14} fontWeight={400} color={theme.text2}>
<Trans>Transaction deadline</Trans>
</ThemedText.Black>
</TYPE.black>
<QuestionHelper
text={<Trans>Your transaction will revert if it is pending for more than this period of time.</Trans>}
/>
......@@ -255,9 +255,9 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
color={deadlineError ? 'red' : ''}
/>
</OptionCustom>
<ThemedText.Body style={{ paddingLeft: '8px' }} fontSize={14}>
<TYPE.body style={{ paddingLeft: '8px' }} fontSize={14}>
<Trans>minutes</Trans>
</ThemedText.Body>
</TYPE.body>
</RowFixed>
</AutoColumn>
)}
......
......@@ -19,7 +19,7 @@ import { SUPPORTED_WALLETS } from '../../constants/wallet'
import usePrevious from '../../hooks/usePrevious'
import { useModalOpen, useWalletModalToggle } from '../../state/application/hooks'
import { ApplicationModal } from '../../state/application/reducer'
import { ExternalLink, ThemedText } from '../../theme'
import { ExternalLink, TYPE } from '../../theme'
import { isMobile } from '../../utils/userAgent'
import AccountDetails from '../AccountDetails'
import Card, { LightCard } from '../Card'
......@@ -344,9 +344,9 @@ export default function WalletModal({
<ArrowLeft />
</HoverText>
<Row justify="center">
<ThemedText.MediumHeader>
<TYPE.mediumHeader>
<Trans>Legal & Privacy</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
</Row>
</HeaderRow>
<PrivacyPolicy />
......@@ -392,23 +392,23 @@ export default function WalletModal({
<AutoColumn gap="16px">
<LightCard>
<AutoRow style={{ flexWrap: 'nowrap' }}>
<ThemedText.Black fontSize={14}>
<TYPE.black fontSize={14}>
<Trans>
By connecting a wallet, you agree to Uniswap Labs’{' '}
<ExternalLink href="https://uniswap.org/terms-of-service/">Terms of Service</ExternalLink> and
acknowledge that you have read and understand the Uniswap{' '}
<ExternalLink href="https://uniswap.org/disclaimer/">Protocol Disclaimer</ExternalLink>.
</Trans>
</ThemedText.Black>
</TYPE.black>
</AutoRow>
</LightCard>
<LinkCard padding=".5rem" $borderRadius=".75rem" onClick={() => setWalletView(WALLET_VIEWS.LEGAL)}>
<RowBetween>
<AutoRow gap="4px">
<Info size={20} />
<ThemedText.White fontSize={14}>
<TYPE.white fontSize={14}>
<Trans>How this app uses APIs</Trans>
</ThemedText.White>
</TYPE.white>
</AutoRow>
<ArrowRight size={16} />
</RowBetween>
......
......@@ -11,7 +11,7 @@ import useENS from '../../hooks/useENS'
import { useActiveWeb3React } from '../../hooks/web3'
import { useClaimCallback, useUserHasAvailableClaim, useUserUnclaimedAmount } from '../../state/claim/hooks'
import { useIsTransactionPending } from '../../state/transactions/hooks'
import { CloseIcon, CustomLightSpinner, ExternalLink, ThemedText, UniTokenAnimated } from '../../theme'
import { CloseIcon, CustomLightSpinner, ExternalLink, TYPE, UniTokenAnimated } from '../../theme'
import { shortenAddress } from '../../utils'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import AddressInputPanel from '../AddressInputPanel'
......@@ -105,29 +105,29 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole
<CardNoise />
<CardSection gap="md">
<RowBetween>
<ThemedText.White fontWeight={500}>
<TYPE.white fontWeight={500}>
<Trans>Claim UNI Token</Trans>
</ThemedText.White>
</TYPE.white>
<CloseIcon onClick={wrappedOnDismiss} style={{ zIndex: 99 }} stroke="white" />
</RowBetween>
<ThemedText.White fontWeight={700} fontSize={36}>
<TYPE.white fontWeight={700} fontSize={36}>
<Trans>{unclaimedAmount?.toFixed(0, { groupSeparator: ',' } ?? '-')} UNI</Trans>
</ThemedText.White>
</TYPE.white>
</CardSection>
<Break />
</ModalUpper>
<AutoColumn gap="md" style={{ padding: '1rem', paddingTop: '0' }} justify="center">
<ThemedText.SubHeader fontWeight={500}>
<TYPE.subHeader fontWeight={500}>
<Trans>
Enter an address to trigger a UNI claim. If the address has any claimable UNI it will be sent to them on
submission.
</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
<AddressInputPanel value={typed} onChange={handleRecipientType} />
{parsedAddress && !hasAvailableClaim && (
<ThemedText.Error error={true}>
<TYPE.error error={true}>
<Trans>Address has no available claim</Trans>
</ThemedText.Error>
</TYPE.error>
)}
<ButtonPrimary
disabled={!isAddress(parsedAddress ?? '') || !hasAvailableClaim}
......@@ -159,23 +159,23 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole
</ConfirmedIcon>
<AutoColumn gap="100px" justify={'center'}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.LargeHeader fontWeight={600} color="black">
<TYPE.largeHeader fontWeight={600} color="black">
{claimConfirmed ? <Trans>Claimed</Trans> : <Trans>Claiming</Trans>}
</ThemedText.LargeHeader>
</TYPE.largeHeader>
{!claimConfirmed && (
<Text fontSize={36} color={'#ff007a'} fontWeight={800}>
<Trans>{unclaimedAmount?.toFixed(0, { groupSeparator: ',' } ?? '-')} UNI</Trans>
</Text>
)}
{parsedAddress && (
<ThemedText.LargeHeader fontWeight={600} color="black">
<TYPE.largeHeader fontWeight={600} color="black">
<Trans>for {shortenAddress(parsedAddress)}</Trans>
</ThemedText.LargeHeader>
</TYPE.largeHeader>
)}
</AutoColumn>
{claimConfirmed && (
<>
<ThemedText.SubHeader fontWeight={500} color="black">
<TYPE.subHeader fontWeight={500} color="black">
<span role="img" aria-label="party-hat">
🎉{' '}
</span>
......@@ -183,13 +183,13 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole
<span role="img" aria-label="party-hat">
🎉
</span>
</ThemedText.SubHeader>
</TYPE.subHeader>
</>
)}
{attempting && !hash && (
<ThemedText.SubHeader color="black">
<TYPE.subHeader color="black">
<Trans>Confirm this transaction in your wallet</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
)}
{attempting && hash && !claimConfirmed && chainId && hash && (
<ExternalLink href={getExplorerLink(chainId, hash, ExplorerDataType.TRANSACTION)} style={{ zIndex: 99 }}>
......
......@@ -13,7 +13,7 @@ import { useModalOpen, useToggleSelfClaimModal } from '../../state/application/h
import { ApplicationModal } from '../../state/application/reducer'
import { useClaimCallback, useUserClaimData, useUserUnclaimedAmount } from '../../state/claim/hooks'
import { useUserHasSubmittedClaim } from '../../state/transactions/hooks'
import { CloseIcon, CustomLightSpinner, ExternalLink, ThemedText, UniTokenAnimated } from '../../theme'
import { CloseIcon, CustomLightSpinner, ExternalLink, TYPE, UniTokenAnimated } from '../../theme'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { ButtonPrimary } from '../Button'
import { AutoColumn, ColumnCenter } from '../Column'
......@@ -100,63 +100,63 @@ export default function ClaimModal() {
<CardNoise />
<CardSection gap="md">
<RowBetween>
<ThemedText.White fontWeight={500}>
<TYPE.white fontWeight={500}>
<Trans>Claim UNI</Trans>
</ThemedText.White>
</TYPE.white>
<CloseIcon onClick={toggleClaimModal} style={{ zIndex: 99 }} color="white" />
</RowBetween>
<ThemedText.White fontWeight={700} fontSize={36}>
<TYPE.white fontWeight={700} fontSize={36}>
<Trans>{unclaimedAmount?.toFixed(0, { groupSeparator: ',' } ?? '-')} UNI</Trans>
</ThemedText.White>
</TYPE.white>
</CardSection>
<Break />
<CardSection gap="sm">
{userClaimData?.flags?.isSOCKS && (
<RowBetween>
<ThemedText.SubHeader color="white">SOCKS</ThemedText.SubHeader>
<ThemedText.SubHeader color="white">
<TYPE.subHeader color="white">SOCKS</TYPE.subHeader>
<TYPE.subHeader color="white">
<Trans>{SOCKS_AMOUNT} UNI</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</RowBetween>
)}
{userClaimData?.flags?.isLP &&
unclaimedAmount &&
JSBI.greaterThanOrEqual(unclaimedAmount.quotient, nonLPAmount) && (
<RowBetween>
<ThemedText.SubHeader color="white">
<TYPE.subHeader color="white">
<Trans>Liquidity</Trans>
</ThemedText.SubHeader>
<ThemedText.SubHeader color="white">
</TYPE.subHeader>
<TYPE.subHeader color="white">
<Trans>
{unclaimedAmount
.subtract(CurrencyAmount.fromRawAmount(unclaimedAmount.currency, nonLPAmount))
.toFixed(0, { groupSeparator: ',' })}{' '}
UNI
</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</RowBetween>
)}
{userClaimData?.flags?.isUser && (
<RowBetween>
<ThemedText.SubHeader color="white">
<TYPE.subHeader color="white">
<Trans>User</Trans>
</ThemedText.SubHeader>
<ThemedText.SubHeader color="white">
</TYPE.subHeader>
<TYPE.subHeader color="white">
<Trans>{USER_AMOUNT} UNI</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</RowBetween>
)}
</CardSection>
</ModalUpper>
<AutoColumn gap="md" style={{ padding: '1rem', paddingTop: '0' }} justify="center">
<ThemedText.SubHeader fontWeight={500}>
<TYPE.subHeader fontWeight={500}>
<Trans>
As a member of the Uniswap community you may claim UNI to be used for voting and governance.
<br />
<br />
<ExternalLink href="https://uniswap.org/blog/uni">Read more about UNI</ExternalLink>
</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
<ButtonPrimary
disabled={!isAddress(account ?? '')}
padding="16px 16px"
......@@ -187,9 +187,9 @@ export default function ClaimModal() {
</ConfirmedIcon>
<AutoColumn gap="100px" justify={'center'}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.LargeHeader fontWeight={600} color="black">
<TYPE.largeHeader fontWeight={600} color="black">
{claimConfirmed ? <Trans>Claimed!</Trans> : <Trans>Claiming</Trans>}
</ThemedText.LargeHeader>
</TYPE.largeHeader>
{!claimConfirmed && (
<Text fontSize={36} color={'#ff007a'} fontWeight={800}>
<Trans>{unclaimedAmount?.toFixed(0, { groupSeparator: ',' } ?? '-')} UNI</Trans>
......@@ -198,7 +198,7 @@ export default function ClaimModal() {
</AutoColumn>
{claimConfirmed && (
<>
<ThemedText.SubHeader fontWeight={500} color="black">
<TYPE.subHeader fontWeight={500} color="black">
<Trans>
<span role="img" aria-label="party-hat">
🎉{' '}
......@@ -208,13 +208,13 @@ export default function ClaimModal() {
🎉
</span>
</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</>
)}
{attempting && !claimSubmitted && (
<ThemedText.SubHeader color="black">
<TYPE.subHeader color="black">
<Trans>Confirm this transaction in your wallet</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
)}
{attempting && claimSubmitted && !claimConfirmed && chainId && claimTxn?.hash && (
<ExternalLink
......
......@@ -8,7 +8,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import { StakingInfo } from '../../state/stake/hooks'
import { TransactionType } from '../../state/transactions/actions'
import { useTransactionAdder } from '../../state/transactions/hooks'
import { CloseIcon, ThemedText } from '../../theme'
import { CloseIcon, TYPE } from '../../theme'
import { ButtonError } from '../Button'
import { AutoColumn } from '../Column'
import Modal from '../Modal'
......@@ -74,24 +74,24 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta
{!attempting && !hash && (
<ContentWrapper gap="lg">
<RowBetween>
<ThemedText.MediumHeader>
<TYPE.mediumHeader>
<Trans>Claim</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<CloseIcon onClick={wrappedOnDismiss} />
</RowBetween>
{stakingInfo?.earnedAmount && (
<AutoColumn justify="center" gap="md">
<ThemedText.Body fontWeight={600} fontSize={36}>
<TYPE.body fontWeight={600} fontSize={36}>
{stakingInfo?.earnedAmount?.toSignificant(6)}
</ThemedText.Body>
<ThemedText.Body>
</TYPE.body>
<TYPE.body>
<Trans>Unclaimed UNI</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
)}
<ThemedText.SubHeader style={{ textAlign: 'center' }}>
<TYPE.subHeader style={{ textAlign: 'center' }}>
<Trans>When you claim without withdrawing your liquidity remains in the mining pool.</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
<ButtonError disabled={!!error} error={!!error && !!stakingInfo?.stakedAmount} onClick={onClaimReward}>
{error ?? <Trans>Claim</Trans>}
</ButtonError>
......@@ -100,21 +100,21 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta
{attempting && !hash && (
<LoadingView onDismiss={wrappedOnDismiss}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.Body fontSize={20}>
<TYPE.body fontSize={20}>
<Trans>Claiming {stakingInfo?.earnedAmount?.toSignificant(6)} UNI</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
</LoadingView>
)}
{hash && (
<SubmittedView onDismiss={wrappedOnDismiss} hash={hash}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.LargeHeader>
<TYPE.largeHeader>
<Trans>Transaction Submitted</Trans>
</ThemedText.LargeHeader>
<ThemedText.Body fontSize={20}>
</TYPE.largeHeader>
<TYPE.body fontSize={20}>
<Trans>Claimed UNI!</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
</SubmittedView>
)}
......
......@@ -9,7 +9,7 @@ import { useTotalSupply } from '../../hooks/useTotalSupply'
import useUSDCPrice from '../../hooks/useUSDCPrice'
import { useV2Pair } from '../../hooks/useV2Pairs'
import { StakingInfo } from '../../state/stake/hooks'
import { StyledInternalLink, ThemedText } from '../../theme'
import { StyledInternalLink, TYPE } from '../../theme'
import { currencyId } from '../../utils/currencyId'
import { unwrappedToken } from '../../utils/unwrappedToken'
import { ButtonPrimary } from '../Button'
......@@ -115,9 +115,9 @@ export default function PoolCard({ stakingInfo }: { stakingInfo: StakingInfo })
<TopSection>
<DoubleCurrencyLogo currency0={currency0} currency1={currency1} size={24} />
<ThemedText.White fontWeight={600} fontSize={24} style={{ marginLeft: '8px' }}>
<TYPE.white fontWeight={600} fontSize={24} style={{ marginLeft: '8px' }}>
{currency0.symbol}-{currency1.symbol}
</ThemedText.White>
</TYPE.white>
<StyledInternalLink to={`/uni/${currencyId(currency0)}/${currencyId(currency1)}`} style={{ width: '100%' }}>
<ButtonPrimary padding="8px" $borderRadius="8px">
......@@ -128,22 +128,22 @@ export default function PoolCard({ stakingInfo }: { stakingInfo: StakingInfo })
<StatContainer>
<RowBetween>
<ThemedText.White>
<TYPE.white>
<Trans>Total deposited</Trans>
</ThemedText.White>
<ThemedText.White>
</TYPE.white>
<TYPE.white>
{valueOfTotalStakedAmountInUSDC ? (
<Trans>${valueOfTotalStakedAmountInUSDC.toFixed(0, { groupSeparator: ',' })}</Trans>
) : (
<Trans>{valueOfTotalStakedAmountInWETH?.toSignificant(4, { groupSeparator: ',' }) ?? '-'} ETH</Trans>
)}
</ThemedText.White>
</TYPE.white>
</RowBetween>
<RowBetween>
<ThemedText.White>
<TYPE.white>
<Trans>Pool rate</Trans>
</ThemedText.White>
<ThemedText.White>
</TYPE.white>
<TYPE.white>
{stakingInfo ? (
stakingInfo.active ? (
<Trans>
......@@ -156,7 +156,7 @@ export default function PoolCard({ stakingInfo }: { stakingInfo: StakingInfo })
) : (
'-'
)}
</ThemedText.White>
</TYPE.white>
</RowBetween>
</StatContainer>
......@@ -164,13 +164,13 @@ export default function PoolCard({ stakingInfo }: { stakingInfo: StakingInfo })
<>
<Break />
<BottomSection showBackground={true}>
<ThemedText.Black color={'white'} fontWeight={500}>
<TYPE.black color={'white'} fontWeight={500}>
<span>
<Trans>Your rate</Trans>
</span>
</ThemedText.Black>
</TYPE.black>
<ThemedText.Black style={{ textAlign: 'right' }} color={'white'} fontWeight={500}>
<TYPE.black style={{ textAlign: 'right' }} color={'white'} fontWeight={500}>
<span role="img" aria-label="wizard-icon" style={{ marginRight: '0.5rem' }}>
</span>
......@@ -188,7 +188,7 @@ export default function PoolCard({ stakingInfo }: { stakingInfo: StakingInfo })
) : (
'-'
)}
</ThemedText.Black>
</TYPE.black>
</BottomSection>
</>
)}
......
......@@ -13,7 +13,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import { StakingInfo, useDerivedStakeInfo } from '../../state/stake/hooks'
import { TransactionType } from '../../state/transactions/actions'
import { useTransactionAdder } from '../../state/transactions/hooks'
import { CloseIcon, ThemedText } from '../../theme'
import { CloseIcon, TYPE } from '../../theme'
import { formatCurrencyAmount } from '../../utils/formatCurrencyAmount'
import { maxAmountSpend } from '../../utils/maxAmountSpend'
import { ButtonConfirmed, ButtonError } from '../Button'
......@@ -159,9 +159,9 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui
{!attempting && !hash && (
<ContentWrapper gap="lg">
<RowBetween>
<ThemedText.MediumHeader>
<TYPE.mediumHeader>
<Trans>Deposit</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<CloseIcon onClick={wrappedOnDismiss} />
</RowBetween>
<CurrencyInputPanel
......@@ -178,19 +178,19 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui
<HypotheticalRewardRate dim={!hypotheticalRewardRate.greaterThan('0')}>
<div>
<ThemedText.Black fontWeight={600}>
<TYPE.black fontWeight={600}>
<Trans>Weekly Rewards</Trans>
</ThemedText.Black>
</TYPE.black>
</div>
<ThemedText.Black>
<TYPE.black>
<Trans>
{hypotheticalRewardRate
.multiply((60 * 60 * 24 * 7).toString())
.toSignificant(4, { groupSeparator: ',' })}{' '}
UNI / week
</Trans>
</ThemedText.Black>
</TYPE.black>
</HypotheticalRewardRate>
<RowBetween>
......@@ -216,24 +216,24 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui
{attempting && !hash && (
<LoadingView onDismiss={wrappedOnDismiss}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.LargeHeader>
<TYPE.largeHeader>
<Trans>Depositing Liquidity</Trans>
</ThemedText.LargeHeader>
<ThemedText.Body fontSize={20}>
</TYPE.largeHeader>
<TYPE.body fontSize={20}>
<Trans>{parsedAmount?.toSignificant(4)} UNI-V2</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
</LoadingView>
)}
{attempting && hash && (
<SubmittedView onDismiss={wrappedOnDismiss} hash={hash}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.LargeHeader>
<TYPE.largeHeader>
<Trans>Transaction Submitted</Trans>
</ThemedText.LargeHeader>
<ThemedText.Body fontSize={20}>
</TYPE.largeHeader>
<TYPE.body fontSize={20}>
<Trans>Deposited {parsedAmount?.toSignificant(4)} UNI-V2</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
</SubmittedView>
)}
......
......@@ -8,7 +8,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import { StakingInfo } from '../../state/stake/hooks'
import { TransactionType } from '../../state/transactions/actions'
import { useTransactionAdder } from '../../state/transactions/hooks'
import { CloseIcon, ThemedText } from '../../theme'
import { CloseIcon, TYPE } from '../../theme'
import { ButtonError } from '../Button'
import { AutoColumn } from '../Column'
import FormattedCurrencyAmount from '../FormattedCurrencyAmount'
......@@ -76,34 +76,34 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki
{!attempting && !hash && (
<ContentWrapper gap="lg">
<RowBetween>
<ThemedText.MediumHeader>
<TYPE.mediumHeader>
<Trans>Withdraw</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<CloseIcon onClick={wrappedOndismiss} />
</RowBetween>
{stakingInfo?.stakedAmount && (
<AutoColumn justify="center" gap="md">
<ThemedText.Body fontWeight={600} fontSize={36}>
<TYPE.body fontWeight={600} fontSize={36}>
{<FormattedCurrencyAmount currencyAmount={stakingInfo.stakedAmount} />}
</ThemedText.Body>
<ThemedText.Body>
</TYPE.body>
<TYPE.body>
<Trans>Deposited liquidity:</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
)}
{stakingInfo?.earnedAmount && (
<AutoColumn justify="center" gap="md">
<ThemedText.Body fontWeight={600} fontSize={36}>
<TYPE.body fontWeight={600} fontSize={36}>
{<FormattedCurrencyAmount currencyAmount={stakingInfo?.earnedAmount} />}
</ThemedText.Body>
<ThemedText.Body>
</TYPE.body>
<TYPE.body>
<Trans>Unclaimed UNI</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
)}
<ThemedText.SubHeader style={{ textAlign: 'center' }}>
<TYPE.subHeader style={{ textAlign: 'center' }}>
<Trans>When you withdraw, your UNI is claimed and your liquidity is removed from the mining pool.</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
<ButtonError disabled={!!error} error={!!error && !!stakingInfo?.stakedAmount} onClick={onWithdraw}>
{error ?? <Trans>Withdraw & Claim</Trans>}
</ButtonError>
......@@ -112,27 +112,27 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki
{attempting && !hash && (
<LoadingView onDismiss={wrappedOndismiss}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.Body fontSize={20}>
<TYPE.body fontSize={20}>
<Trans>Withdrawing {stakingInfo?.stakedAmount?.toSignificant(4)} UNI-V2</Trans>
</ThemedText.Body>
<ThemedText.Body fontSize={20}>
</TYPE.body>
<TYPE.body fontSize={20}>
<Trans>Claiming {stakingInfo?.earnedAmount?.toSignificant(4)} UNI</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
</LoadingView>
)}
{hash && (
<SubmittedView onDismiss={wrappedOndismiss} hash={hash}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.LargeHeader>
<TYPE.largeHeader>
<Trans>Transaction Submitted</Trans>
</ThemedText.LargeHeader>
<ThemedText.Body fontSize={20}>
</TYPE.largeHeader>
<TYPE.body fontSize={20}>
<Trans>Withdrew UNI-V2!</Trans>
</ThemedText.Body>
<ThemedText.Body fontSize={20}>
</TYPE.body>
<TYPE.body fontSize={20}>
<Trans>Claimed UNI!</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
</SubmittedView>
)}
......
......@@ -6,7 +6,7 @@ import { LoadingRows } from 'components/Loader/styled'
import { useContext, useMemo } from 'react'
import { ThemeContext } from 'styled-components/macro'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { computeRealizedLPFeePercent } from '../../utils/prices'
import { AutoColumn } from '../Column'
import { RowBetween, RowFixed } from '../Row'
......@@ -56,55 +56,55 @@ export function AdvancedSwapDetails({ trade, allowedSlippage, syncing = false }:
</TransactionDetailsLabel>
<RowBetween>
<RowFixed>
<ThemedText.SubHeader color={theme.text1}>
<TYPE.subHeader color={theme.text1}>
<Trans>Liquidity Provider Fee</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</RowFixed>
<TextWithLoadingPlaceholder syncing={syncing} width={65}>
<ThemedText.Black textAlign="right" fontSize={14}>
<TYPE.black textAlign="right" fontSize={14}>
{realizedLPFee ? `${realizedLPFee.toSignificant(4)} ${realizedLPFee.currency.symbol}` : '-'}
</ThemedText.Black>
</TYPE.black>
</TextWithLoadingPlaceholder>
</RowBetween>
<RowBetween>
<RowFixed>
<ThemedText.SubHeader color={theme.text1}>
<TYPE.subHeader color={theme.text1}>
<Trans>Price Impact</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</RowFixed>
<TextWithLoadingPlaceholder syncing={syncing} width={50}>
<ThemedText.Black textAlign="right" fontSize={14}>
<TYPE.black textAlign="right" fontSize={14}>
<FormattedPriceImpact priceImpact={priceImpact} />
</ThemedText.Black>
</TYPE.black>
</TextWithLoadingPlaceholder>
</RowBetween>
<RowBetween>
<RowFixed>
<ThemedText.SubHeader color={theme.text1}>
<TYPE.subHeader color={theme.text1}>
<Trans>Allowed Slippage</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</RowFixed>
<TextWithLoadingPlaceholder syncing={syncing} width={45}>
<ThemedText.Black textAlign="right" fontSize={14}>
<TYPE.black textAlign="right" fontSize={14}>
{allowedSlippage.toFixed(2)}%
</ThemedText.Black>
</TYPE.black>
</TextWithLoadingPlaceholder>
</RowBetween>
<RowBetween>
<RowFixed>
<ThemedText.SubHeader color={theme.text1}>
<TYPE.subHeader color={theme.text1}>
{trade.tradeType === TradeType.EXACT_INPUT ? <Trans>Minimum received</Trans> : <Trans>Maximum sent</Trans>}
</ThemedText.SubHeader>
</TYPE.subHeader>
</RowFixed>
<TextWithLoadingPlaceholder syncing={syncing} width={70}>
<ThemedText.Black textAlign="right" fontSize={14}>
<TYPE.black textAlign="right" fontSize={14}>
{trade.tradeType === TradeType.EXACT_INPUT
? `${trade.minimumAmountOut(allowedSlippage).toSignificant(6)} ${trade.outputAmount.currency.symbol}`
: `${trade.maximumAmountIn(allowedSlippage).toSignificant(6)} ${trade.inputAmount.currency.symbol}`}
</ThemedText.Black>
</TYPE.black>
</TextWithLoadingPlaceholder>
</RowBetween>
</AutoColumn>
......
import { Trans } from '@lingui/macro'
import { useRoutingAPIEnabled } from 'state/user/hooks'
import styled from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
import { ReactComponent as AutoRouterIcon } from '../../assets/svg/auto_router.svg'
import { ReactComponent as StaticRouterIcon } from '../../assets/svg/static_route.svg'
......@@ -26,7 +26,7 @@ const StyledStaticRouterIcon = styled(StaticRouterIcon)`
}
`
const StyledAutoRouterLabel = styled(ThemedText.Black)`
const StyledAutoRouterLabel = styled(TYPE.black)`
line-height: 1rem;
/* fallback color */
......@@ -51,8 +51,8 @@ export function AutoRouterLabel() {
return routingAPIEnabled ? (
<StyledAutoRouterLabel fontSize={14}>Auto Router</StyledAutoRouterLabel>
) : (
<ThemedText.Black fontSize={14}>
<TYPE.black fontSize={14}>
<Trans>Trade Route</Trans>
</ThemedText.Black>
</TYPE.black>
)
}
......@@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro'
import { Percent } from '@uniswap/sdk-core'
import styled from 'styled-components/macro'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { RowBetween, RowFixed } from '../Row'
import SettingsTab from '../Settings'
......@@ -17,9 +17,9 @@ export default function SwapHeader({ allowedSlippage }: { allowedSlippage: Perce
<StyledSwapHeader>
<RowBetween>
<RowFixed>
<ThemedText.Black fontWeight={500} fontSize={16} style={{ marginRight: '8px' }}>
<TYPE.black fontWeight={500} fontSize={16} style={{ marginRight: '8px' }}>
<Trans>Swap</Trans>
</ThemedText.Black>
</TYPE.black>
</RowFixed>
<RowFixed>
<SettingsTab placeholderSlippage={allowedSlippage} />
......
......@@ -8,7 +8,7 @@ import { Text } from 'rebass'
import styled, { ThemeContext } from 'styled-components/macro'
import { useUSDCValue } from '../../hooks/useUSDCPrice'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { isAddress, shortenAddress } from '../../utils'
import { computeFiatValuePriceImpact } from '../../utils/computeFiatValuePriceImpact'
import { ButtonPrimary } from '../Button'
......@@ -64,9 +64,9 @@ export default function SwapModalHeader({
<LightCard padding="0.75rem 1rem">
<AutoColumn gap={'8px'}>
<RowBetween>
<ThemedText.Body color={theme.text3} fontWeight={500} fontSize={14}>
<TYPE.body color={theme.text3} fontWeight={500} fontSize={14}>
<Trans>From</Trans>
</ThemedText.Body>
</TYPE.body>
<FiatValue fiatValue={fiatValueInput} />
</RowBetween>
<RowBetween align="center">
......@@ -94,15 +94,15 @@ export default function SwapModalHeader({
<LightCard padding="0.75rem 1rem" style={{ marginBottom: '0.25rem' }}>
<AutoColumn gap={'8px'}>
<RowBetween>
<ThemedText.Body color={theme.text3} fontWeight={500} fontSize={14}>
<TYPE.body color={theme.text3} fontWeight={500} fontSize={14}>
<Trans>To</Trans>
</ThemedText.Body>
<ThemedText.Body fontSize={14} color={theme.text3}>
</TYPE.body>
<TYPE.body fontSize={14} color={theme.text3}>
<FiatValue
fiatValue={fiatValueOutput}
priceImpact={computeFiatValuePriceImpact(fiatValueInput, fiatValueOutput)}
/>
</ThemedText.Body>
</TYPE.body>
</RowBetween>
<RowBetween align="flex-end">
<RowFixed gap={'0px'}>
......@@ -120,9 +120,9 @@ export default function SwapModalHeader({
</AutoColumn>
</LightCard>
<RowBetween style={{ marginTop: '0.25rem', padding: '0 1rem' }}>
<ThemedText.Body color={theme.text2} fontWeight={500} fontSize={14}>
<TYPE.body color={theme.text2} fontWeight={500} fontSize={14}>
<Trans>Price</Trans>
</ThemedText.Body>
</TYPE.body>
<TradePrice price={trade.executionPrice} showInverted={showInverted} setShowInverted={setShowInverted} />
</RowBetween>
......@@ -135,9 +135,9 @@ export default function SwapModalHeader({
<RowBetween>
<RowFixed>
<AlertTriangle size={20} style={{ marginRight: '8px', minWidth: 24 }} />
<ThemedText.Main color={theme.primary1}>
<TYPE.main color={theme.primary1}>
<Trans>Price Updated</Trans>
</ThemedText.Main>
</TYPE.main>
</RowFixed>
<ButtonPrimary
style={{ padding: '.5rem', width: 'fit-content', fontSize: '0.825rem', borderRadius: '12px' }}
......@@ -151,7 +151,7 @@ export default function SwapModalHeader({
<AutoColumn justify="flex-start" gap="sm" style={{ padding: '.75rem 1rem' }}>
{trade.tradeType === TradeType.EXACT_INPUT ? (
<ThemedText.Italic fontWeight={400} textAlign="left" style={{ width: '100%' }}>
<TYPE.italic fontWeight={400} textAlign="left" style={{ width: '100%' }}>
<Trans>
Output is estimated. You will receive at least{' '}
<b>
......@@ -159,9 +159,9 @@ export default function SwapModalHeader({
</b>{' '}
or the transaction will revert.
</Trans>
</ThemedText.Italic>
</TYPE.italic>
) : (
<ThemedText.Italic fontWeight={400} textAlign="left" style={{ width: '100%' }}>
<TYPE.italic fontWeight={400} textAlign="left" style={{ width: '100%' }}>
<Trans>
Input is estimated. You will sell at most{' '}
<b>
......@@ -169,17 +169,17 @@ export default function SwapModalHeader({
</b>{' '}
or the transaction will revert.
</Trans>
</ThemedText.Italic>
</TYPE.italic>
)}
</AutoColumn>
{recipient !== null ? (
<AutoColumn justify="flex-start" gap="sm" style={{ padding: '12px 0 0 0px' }}>
<ThemedText.Main>
<TYPE.main>
<Trans>
Output will be sent to{' '}
<b title={recipient}>{isAddress(recipient) ? shortenAddress(recipient) : recipient}</b>
</Trans>
</ThemedText.Main>
</TYPE.main>
</AutoColumn>
) : null}
</AutoColumn>
......
......@@ -11,7 +11,7 @@ import { Version } from 'hooks/useToggledVersion'
import { memo } from 'react'
import { useRoutingAPIEnabled } from 'state/user/hooks'
import styled from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
import { getTradeVersion } from 'utils/getTradeVersion'
import { AutoRouterLabel, AutoRouterLogo } from './RouterLabel'
......@@ -46,9 +46,9 @@ export default memo(function SwapRoute({
</LoadingRows>
) : (
<Badge>
<ThemedText.Black fontSize={12}>
<TYPE.black fontSize={12}>
{getTradeVersion(trade) === Version.v2 ? <Trans>V2</Trans> : <Trans>V3</Trans>}
</ThemedText.Black>
</TYPE.black>
</Badge>
)}
</RowBetween>
......@@ -65,9 +65,9 @@ export default memo(function SwapRoute({
/>
)}
{routingAPIEnabled && (
<ThemedText.Main fontSize={12} width={400}>
<TYPE.main fontSize={12} width={400}>
<Trans>This route optimizes your price by considering split routes, multiple hops, and gas costs.</Trans>
</ThemedText.Main>
</TYPE.main>
)}
</AutoColumn>
)
......
......@@ -4,7 +4,7 @@ import useUSDCPrice from 'hooks/useUSDCPrice'
import { useCallback, useContext } from 'react'
import { Text } from 'rebass'
import styled, { ThemeContext } from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
interface TradePriceProps {
price: Price<Currency, Currency>
......@@ -49,9 +49,9 @@ export default function TradePrice({ price, showInverted, setShowInverted }: Tra
{text}
</Text>{' '}
{usdcPrice && (
<ThemedText.DarkGray>
<TYPE.darkGray>
<Trans>(${usdcPrice.toSignificant(6, { groupSeparator: ',' })})</Trans>
</ThemedText.DarkGray>
</TYPE.darkGray>
)}
</StyledPriceContainer>
)
......
......@@ -9,7 +9,7 @@ import { AutoRow, RowBetween } from 'components/Row'
import { useActiveWeb3React } from 'hooks/web3'
import { useState } from 'react'
import styled from 'styled-components/macro'
import { CloseIcon, ExternalLink, ThemedText, Z_INDEX } from 'theme'
import { CloseIcon, ExternalLink, TYPE, Z_INDEX } from 'theme'
import { useUnsupportedTokens } from '../../hooks/Tokens'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
......@@ -37,7 +37,7 @@ const StyledButtonEmpty = styled(ButtonEmpty)`
text-decoration: none;
`
const AddressText = styled(ThemedText.Blue)`
const AddressText = styled(TYPE.blue)`
font-size: 12px;
${({ theme }) => theme.mediaWidth.upToSmall`
......@@ -70,9 +70,9 @@ export default function UnsupportedCurrencyFooter({
<Card padding="2rem">
<AutoColumn gap="lg">
<RowBetween>
<ThemedText.MediumHeader>
<TYPE.mediumHeader>
<Trans>Unsupported Assets</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<CloseIcon onClick={() => setShowDetails(false)} />
</RowBetween>
{tokens.map((token) => {
......@@ -84,7 +84,7 @@ export default function UnsupportedCurrencyFooter({
<AutoColumn gap="10px">
<AutoRow gap="5px" align="center">
<CurrencyLogo currency={token} size={'24px'} />
<ThemedText.Body fontWeight={500}>{token.symbol}</ThemedText.Body>
<TYPE.body fontWeight={500}>{token.symbol}</TYPE.body>
</AutoRow>
{chainId && (
<ExternalLink href={getExplorerLink(chainId, token.address, ExplorerDataType.ADDRESS)}>
......@@ -97,20 +97,20 @@ export default function UnsupportedCurrencyFooter({
)
})}
<AutoColumn gap="lg">
<ThemedText.Body fontWeight={500}>
<TYPE.body fontWeight={500}>
<Trans>
Some assets are not available through this interface because they may not work well with the smart
contracts or we are unable to allow trading for legal reasons.
</Trans>
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
</AutoColumn>
</Card>
</Modal>
<StyledButtonEmpty padding={'0'} onClick={() => setShowDetails(true)}>
<ThemedText.Blue>
<TYPE.blue>
<Trans>Read more about unsupported assets</Trans>
</ThemedText.Blue>
</TYPE.blue>
</StyledButtonEmpty>
</DetailsFooter>
)
......
......@@ -5,8 +5,8 @@ import { ReactNode } from 'react'
import { AlertTriangle } from 'react-feather'
import { Text } from 'rebass'
import styled, { css } from 'styled-components/macro'
import { TYPE } from 'theme'
import { ThemedText } from '../../theme'
import { AutoColumn } from '../Column'
import TradePrice from './TradePrice'
......@@ -133,7 +133,7 @@ export const SwapShowAcceptChanges = styled(AutoColumn)`
margin-top: 8px;
`
export const TransactionDetailsLabel = styled(ThemedText.Black)`
export const TransactionDetailsLabel = styled(TYPE.black)`
border-bottom: 1px solid ${({ theme }) => theme.bg2};
padding-bottom: 0.5rem;
`
......
......@@ -10,7 +10,7 @@ import useENS from '../../hooks/useENS'
import { useActiveWeb3React } from '../../hooks/web3'
import { useDelegateCallback } from '../../state/governance/hooks'
import { useTokenBalance } from '../../state/wallet/hooks'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import AddressInputPanel from '../AddressInputPanel'
import { ButtonPrimary } from '../Button'
import { AutoColumn } from '../Column'
......@@ -95,25 +95,23 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro
<ContentWrapper gap="lg">
<AutoColumn gap="lg" justify="center">
<RowBetween>
<ThemedText.MediumHeader fontWeight={500}>{title}</ThemedText.MediumHeader>
<TYPE.mediumHeader fontWeight={500}>{title}</TYPE.mediumHeader>
<StyledClosed stroke="black" onClick={wrappedOndismiss} />
</RowBetween>
<ThemedText.Body>
<TYPE.body>
<Trans>Earned UNI tokens represent voting shares in Uniswap governance.</Trans>
</ThemedText.Body>
<ThemedText.Body>
</TYPE.body>
<TYPE.body>
<Trans>You can either vote on each proposal yourself or delegate your votes to a third party.</Trans>
</ThemedText.Body>
</TYPE.body>
{usingDelegate && <AddressInputPanel value={typed} onChange={handleRecipientType} />}
<ButtonPrimary disabled={!isAddress(parsedAddress ?? '')} onClick={onDelegate}>
<ThemedText.MediumHeader color="white">
<TYPE.mediumHeader color="white">
{usingDelegate ? <Trans>Delegate Votes</Trans> : <Trans>Self Delegate</Trans>}
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
</ButtonPrimary>
<TextButton onClick={() => setUsingDelegate(!usingDelegate)}>
<ThemedText.Blue>
{usingDelegate ? <Trans>Remove Delegate</Trans> : <Trans>Add Delegate +</Trans>}
</ThemedText.Blue>
<TYPE.blue>{usingDelegate ? <Trans>Remove Delegate</Trans> : <Trans>Add Delegate +</Trans>}</TYPE.blue>
</TextButton>
</AutoColumn>
</ContentWrapper>
......@@ -121,20 +119,20 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro
{attempting && !hash && (
<LoadingView onDismiss={wrappedOndismiss}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.LargeHeader>
<TYPE.largeHeader>
{usingDelegate ? <Trans>Delegating votes</Trans> : <Trans>Unlocking Votes</Trans>}
</ThemedText.LargeHeader>
<ThemedText.Main fontSize={36}> {formatCurrencyAmount(uniBalance, 4)}</ThemedText.Main>
</TYPE.largeHeader>
<TYPE.main fontSize={36}> {formatCurrencyAmount(uniBalance, 4)}</TYPE.main>
</AutoColumn>
</LoadingView>
)}
{hash && (
<SubmittedView onDismiss={wrappedOndismiss} hash={hash}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.LargeHeader>
<TYPE.largeHeader>
<Trans>Transaction Submitted</Trans>
</ThemedText.LargeHeader>
<ThemedText.Main fontSize={36}>{formatCurrencyAmount(uniBalance, 4)}</ThemedText.Main>
</TYPE.largeHeader>
<TYPE.main fontSize={36}>{formatCurrencyAmount(uniBalance, 4)}</TYPE.main>
</AutoColumn>
</SubmittedView>
)}
......
......@@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro'
import { L2_CHAIN_IDS } from 'constants/chains'
import { useActiveWeb3React } from 'hooks/web3'
import styled from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
const EmptyProposals = styled.div`
border: 1px solid ${({ theme }) => theme.text4};
......@@ -25,14 +25,14 @@ interface EmptyStateProps {
}
const EmptyState = ({ HeaderContent, SubHeaderContent }: EmptyStateProps) => (
<EmptyProposals>
<ThemedText.Body style={{ marginBottom: '8px' }}>
<TYPE.body style={{ marginBottom: '8px' }}>
<HeaderContent />
</ThemedText.Body>
<ThemedText.SubHeader>
</TYPE.body>
<TYPE.subHeader>
<Sub>
<SubHeaderContent />
</Sub>
</ThemedText.SubHeader>
</TYPE.subHeader>
</EmptyProposals>
)
......
......@@ -8,8 +8,8 @@ import Circle from '../../assets/images/blue-loader.svg'
import { useActiveWeb3React } from '../../hooks/web3'
import { useUserVotes, useVoteCallback } from '../../state/governance/hooks'
import { VoteOption } from '../../state/governance/types'
import { CustomLightSpinner, ThemedText } from '../../theme'
import { ExternalLink } from '../../theme'
import { CustomLightSpinner, TYPE } from '../../theme'
import { ExternalLink } from '../../theme/components'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { ButtonPrimary } from '../Button'
import { AutoColumn, ColumnCenter } from '../Column'
......@@ -85,7 +85,7 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
<ContentWrapper gap="lg">
<AutoColumn gap="lg" justify="center">
<RowBetween>
<ThemedText.MediumHeader fontWeight={500}>
<TYPE.mediumHeader fontWeight={500}>
{voteOption === VoteOption.Against ? (
<Trans>Vote against proposal {proposalId}</Trans>
) : voteOption === VoteOption.For ? (
......@@ -93,14 +93,14 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
) : (
<Trans>Vote to abstain on proposal {proposalId}</Trans>
)}
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<StyledClosed stroke="black" onClick={wrappedOndismiss} />
</RowBetween>
<ThemedText.LargeHeader>
<TYPE.largeHeader>
<Trans>{formatCurrencyAmount(availableVotes, 4)} Votes</Trans>
</ThemedText.LargeHeader>
</TYPE.largeHeader>
<ButtonPrimary onClick={onVote}>
<ThemedText.MediumHeader color="white">
<TYPE.mediumHeader color="white">
{voteOption === VoteOption.Against ? (
<Trans>Vote against proposal {proposalId}</Trans>
) : voteOption === VoteOption.For ? (
......@@ -108,7 +108,7 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
) : (
<Trans>Vote to abstain on proposal {proposalId}</Trans>
)}
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
</ButtonPrimary>
</AutoColumn>
</ContentWrapper>
......@@ -124,13 +124,13 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
</ConfirmedIcon>
<AutoColumn gap="100px" justify={'center'}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.LargeHeader>
<TYPE.largeHeader>
<Trans>Submitting Vote</Trans>
</ThemedText.LargeHeader>
</TYPE.largeHeader>
</AutoColumn>
<ThemedText.SubHeader>
<TYPE.subHeader>
<Trans>Confirm this transaction in your wallet</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</AutoColumn>
</ConfirmOrLoadingWrapper>
)}
......@@ -145,18 +145,18 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
</ConfirmedIcon>
<AutoColumn gap="100px" justify={'center'}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.LargeHeader>
<TYPE.largeHeader>
<Trans>Transaction Submitted</Trans>
</ThemedText.LargeHeader>
</TYPE.largeHeader>
</AutoColumn>
{chainId && (
<ExternalLink
href={getExplorerLink(chainId, hash, ExplorerDataType.TRANSACTION)}
style={{ marginLeft: '4px' }}
>
<ThemedText.SubHeader>
<TYPE.subHeader>
<Trans>View transaction on Explorer</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</ExternalLink>
)}
</AutoColumn>
......
......@@ -5,10 +5,10 @@ export const OVERLAY_READY = 'OVERLAY_READY'
type FormaticSupportedChains = 1 | 3 | 4 | 42
const CHAIN_ID_NETWORK_ARGUMENT: { readonly [chainId in FormaticSupportedChains]: string | undefined } = {
1: undefined,
3: 'ropsten',
4: 'rinkeby',
42: 'kovan',
[1]: undefined,
[3]: 'ropsten',
[4]: 'rinkeby',
[42]: 'kovan',
}
export class FortmaticConnector extends FortmaticConnectorCore {
......
......@@ -19,5 +19,5 @@ export const DEFAULT_AVERAGE_BLOCK_TIME_IN_SECS = 13
// Block time here is slightly higher (~1s) than average in order to avoid ongoing proposals past the displayed time
export const AVERAGE_BLOCK_TIME_IN_SECS: { [chainId: number]: number } = {
1: DEFAULT_AVERAGE_BLOCK_TIME_IN_SECS,
[1]: DEFAULT_AVERAGE_BLOCK_TIME_IN_SECS,
}
......@@ -13,9 +13,6 @@ import {
FRAX,
FXS,
renBTC,
rETH2,
sETH2,
SWISE,
TRIBE,
USDC,
USDC_ARBITRUM,
......@@ -56,8 +53,6 @@ export const BASES_TO_CHECK_TRADES_AGAINST: ChainTokenList = {
export const ADDITIONAL_BASES: { [chainId: number]: { [tokenAddress: string]: Token[] } } = {
[SupportedChainId.MAINNET]: {
'0xF16E4d813f4DcfDe4c5b44f305c908742De84eF0': [ETH2X_FLI],
[rETH2.address]: [sETH2],
[SWISE.address]: [sETH2],
[FEI.address]: [TRIBE],
[TRIBE.address]: [FEI],
[FRAX.address]: [FXS],
......
......@@ -136,27 +136,6 @@ export const ETH2X_FLI = new Token(
'ETH2x-FLI',
'ETH 2x Flexible Leverage Index'
)
export const sETH2 = new Token(
SupportedChainId.MAINNET,
'0xFe2e637202056d30016725477c5da089Ab0A043A',
18,
'sETH2',
'StakeWise Staked ETH2'
)
export const rETH2 = new Token(
SupportedChainId.MAINNET,
'0x20BC832ca081b91433ff6c17f85701B6e92486c5',
18,
'rETH2',
'StakeWise Reward ETH2'
)
export const SWISE = new Token(
SupportedChainId.MAINNET,
'0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2',
18,
'SWISE',
'StakeWise'
)
export const UNI: { [chainId: number]: Token } = {
[SupportedChainId.MAINNET]: new Token(SupportedChainId.MAINNET, UNI_ADDRESS[1], 18, 'UNI', 'Uniswap'),
[SupportedChainId.RINKEBY]: new Token(SupportedChainId.RINKEBY, UNI_ADDRESS[4], 18, 'UNI', 'Uniswap'),
......
......@@ -34,23 +34,23 @@ const PERMITTABLE_TOKENS: {
[checksummedTokenAddress: string]: PermitInfo
}
} = {
1: {
[1]: {
[USDC.address]: { type: PermitType.AMOUNT, name: 'USD Coin', version: '2' },
[DAI.address]: { type: PermitType.ALLOWED, name: 'Dai Stablecoin', version: '1' },
[UNI[1].address]: { type: PermitType.AMOUNT, name: 'Uniswap' },
},
4: {
'0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735': { type: PermitType.ALLOWED, name: 'Dai Stablecoin', version: '1' },
[4]: {
['0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735']: { type: PermitType.ALLOWED, name: 'Dai Stablecoin', version: '1' },
[UNI[4].address]: { type: PermitType.AMOUNT, name: 'Uniswap' },
},
3: {
[3]: {
[UNI[3].address]: { type: PermitType.AMOUNT, name: 'Uniswap' },
'0x07865c6E87B9F70255377e024ace6630C1Eaa37F': { type: PermitType.AMOUNT, name: 'USD Coin', version: '2' },
['0x07865c6E87B9F70255377e024ace6630C1Eaa37F']: { type: PermitType.AMOUNT, name: 'USD Coin', version: '2' },
},
5: {
[5]: {
[UNI[5].address]: { type: PermitType.AMOUNT, name: 'Uniswap' },
},
42: {
[42]: {
[UNI[42].address]: { type: PermitType.AMOUNT, name: 'Uniswap' },
},
}
......
import { TransactionResponse } from '@ethersproject/providers'
import { initializeApp } from 'firebase/app'
import { getDatabase, push, ref } from 'firebase/database'
import { useCallback } from 'react'
import { TransactionInfo, TransactionType } from 'state/transactions/actions'
import { useActiveWeb3React } from './web3'
type PartialTransactionResponse = Pick<TransactionResponse, 'hash' | 'v' | 'r' | 's'>
const SUPPORTED_TRANSACTION_TYPES = [
TransactionType.ADD_LIQUIDITY_V2_POOL,
TransactionType.ADD_LIQUIDITY_V3_POOL,
TransactionType.CREATE_V3_POOL,
TransactionType.REMOVE_LIQUIDITY_V3,
TransactionType.SWAP,
]
const FIREBASE_API_KEY = process.env.REACT_APP_FIREBASE_KEY
const firebaseEnabled = typeof FIREBASE_API_KEY !== 'undefined'
if (firebaseEnabled) initializeFirebase()
function useMonitoringEventCallback() {
const { chainId } = useActiveWeb3React()
return useCallback(
async function log(
type: string,
{
transactionResponse,
walletAddress,
}: { transactionResponse: PartialTransactionResponse; walletAddress: string | undefined }
) {
if (!firebaseEnabled) return
const db = getDatabase()
if (!walletAddress) {
console.debug('Wallet address required to log monitoring events.')
return
}
try {
push(ref(db, 'trm'), {
chainId,
origin: window.location.origin,
timestamp: Date.now(),
tx: transactionResponse,
type,
walletAddress,
})
} catch (e) {
console.debug('Error adding document: ', e)
}
},
[chainId]
)
}
export function useTransactionMonitoringEventCallback() {
const { account } = useActiveWeb3React()
const log = useMonitoringEventCallback()
return useCallback(
(info: TransactionInfo, transactionResponse: TransactionResponse) => {
if (SUPPORTED_TRANSACTION_TYPES.includes(info.type)) {
log(TransactionType[info.type], {
transactionResponse: (({ hash, v, r, s }: PartialTransactionResponse) => ({ hash, v, r, s }))(
transactionResponse
),
walletAddress: account ?? undefined,
})
}
},
[account, log]
)
}
export function useWalletConnectMonitoringEventCallback() {
const log = useMonitoringEventCallback()
return useCallback(
(walletAddress) => {
log('WALLET_CONNECTED', { transactionResponse: { hash: '', r: '', s: '', v: -1 }, walletAddress })
},
[log]
)
}
function initializeFirebase() {
initializeApp({
apiKey: process.env.REACT_APP_FIREBASE_KEY,
authDomain: 'interface-monitoring.firebaseapp.com',
databaseURL: 'https://interface-monitoring-default-rtdb.firebaseio.com',
projectId: 'interface-monitoring',
storageBucket: 'interface-monitoring.appspot.com',
messagingSenderId: '968187720053',
appId: '1:968187720053:web:acedf72dce629d470be33c',
})
}
......@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2021-11-30 02:11\n"
"PO-Revision-Date: 2021-11-18 19:06\n"
"Last-Translator: \n"
"Language: ja_JP\n"
"Language-Team: Japanese\n"
......@@ -309,7 +309,7 @@ msgstr "安定的なペアに最適"
#: src/components/FeeSelector/shared.tsx
msgid "Best for very stable pairs."
msgstr "非常に安定したペアに最適"
msgstr "非常に安定したペアに最適です。"
#: src/components/Blocklist/index.tsx
msgid "Blocked address"
......@@ -329,7 +329,7 @@ msgstr "このリストを追加することで、データが正しいことを
#: src/components/WalletModal/index.tsx
msgid "By connecting a wallet, you agree to Uniswap Labs’ <0>Terms of Service</0> and acknowledge that you have read and understand the Uniswap <1>Protocol Disclaimer</1>."
msgstr "ウォレットを接続することにより、あなたはUniswap Labsのに <0>サービス規約</0>に同意し、あなたがUniswap<1>プロトコル免責事項</1>を読み、理解していることに同意するものとします。"
msgstr "財布を接続することにより、あなたはUniswap Labsのに同意 <0>サービス規約</0> 、あなたが読んでUniswap理解していることを認める <1>プロトコル免責事項</1>。"
#: src/pages/Vote/styled.tsx
msgid "Canceled"
......@@ -1541,7 +1541,7 @@ msgstr "スワップ"
#: src/components/AccountDetails/TransactionSummary.tsx
msgid "Swap <0/> for exactly <1/>"
msgstr "<0/> を <1/>にスワップ"
msgstr "<0/> を <1/>に正確にスワップする"
#: src/pages/Swap/index.tsx
#: src/pages/Swap/index.tsx
......@@ -1550,7 +1550,7 @@ msgstr "問題発生の可能性があるが、スワップする"
#: src/components/AccountDetails/TransactionSummary.tsx
msgid "Swap exactly <0/> for <1/>"
msgstr "<0/>を<1/>にスワップ"
msgstr "正確に<0/>を<1/>に交換します"
#: src/hooks/useSwapCallback.tsx
#: src/hooks/useSwapCallback.tsx
......
......@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2021-11-25 20:06\n"
"PO-Revision-Date: 2021-11-18 19:06\n"
"Last-Translator: \n"
"Language: ru_RU\n"
"Language-Team: Russian\n"
......@@ -305,11 +305,11 @@ msgstr "Подходит для большинства пар."
#: src/components/FeeSelector/shared.tsx
msgid "Best for stable pairs."
msgstr "Подходит для стабильных пар."
msgstr "Подходит для пар стейблкоинов."
#: src/components/FeeSelector/shared.tsx
msgid "Best for very stable pairs."
msgstr "Подходит для очень стабильных пар."
msgstr "Подходит для пар очень стабильных стейблкоинов."
#: src/components/Blocklist/index.tsx
msgid "Blocked address"
......
......@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2021-11-30 02:11\n"
"PO-Revision-Date: 2021-11-18 19:06\n"
"Last-Translator: \n"
"Language: zh_CN\n"
"Language-Team: Chinese Simplified\n"
......
This diff is collapsed.
......@@ -6,7 +6,7 @@ import { ButtonPrimary } from '../../components/Button'
import CurrencyLogo from '../../components/CurrencyLogo'
import { RowBetween, RowFixed } from '../../components/Row'
import { Field } from '../../state/mint/actions'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
export function ConfirmAddModalBottom({
noLiquidity,
......@@ -26,47 +26,47 @@ export function ConfirmAddModalBottom({
return (
<>
<RowBetween>
<ThemedText.Body>
<TYPE.body>
<Trans>{currencies[Field.CURRENCY_A]?.symbol} Deposited</Trans>
</ThemedText.Body>
</TYPE.body>
<RowFixed>
<CurrencyLogo currency={currencies[Field.CURRENCY_A]} style={{ marginRight: '8px' }} />
<ThemedText.Body>{parsedAmounts[Field.CURRENCY_A]?.toSignificant(6)}</ThemedText.Body>
<TYPE.body>{parsedAmounts[Field.CURRENCY_A]?.toSignificant(6)}</TYPE.body>
</RowFixed>
</RowBetween>
<RowBetween>
<ThemedText.Body>
<TYPE.body>
<Trans>{currencies[Field.CURRENCY_B]?.symbol} Deposited</Trans>
</ThemedText.Body>
</TYPE.body>
<RowFixed>
<CurrencyLogo currency={currencies[Field.CURRENCY_B]} style={{ marginRight: '8px' }} />
<ThemedText.Body>{parsedAmounts[Field.CURRENCY_B]?.toSignificant(6)}</ThemedText.Body>
<TYPE.body>{parsedAmounts[Field.CURRENCY_B]?.toSignificant(6)}</TYPE.body>
</RowFixed>
</RowBetween>
<RowBetween>
<ThemedText.Body>
<TYPE.body>
<Trans>Rates</Trans>
</ThemedText.Body>
<ThemedText.Body>
</TYPE.body>
<TYPE.body>
{`1 ${currencies[Field.CURRENCY_A]?.symbol} = ${price?.toSignificant(4)} ${
currencies[Field.CURRENCY_B]?.symbol
}`}
</ThemedText.Body>
</TYPE.body>
</RowBetween>
<RowBetween style={{ justifyContent: 'flex-end' }}>
<ThemedText.Body>
<TYPE.body>
{`1 ${currencies[Field.CURRENCY_B]?.symbol} = ${price?.invert().toSignificant(4)} ${
currencies[Field.CURRENCY_A]?.symbol
}`}
</ThemedText.Body>
</TYPE.body>
</RowBetween>
<RowBetween>
<ThemedText.Body>
<TYPE.body>
<Trans>Share of Pool:</Trans>
</ThemedText.Body>
<ThemedText.Body>
</TYPE.body>
<TYPE.body>
<Trans>{noLiquidity ? '100' : poolTokenPercentage?.toSignificant(4)}%</Trans>
</ThemedText.Body>
</TYPE.body>
</RowBetween>
<ButtonPrimary style={{ margin: '20px 0 0 0' }} onClick={onAdd}>
<Text fontWeight={500} fontSize={20}>
......
......@@ -8,7 +8,7 @@ import { AutoColumn } from '../../components/Column'
import { AutoRow } from '../../components/Row'
import { ONE_BIPS } from '../../constants/misc'
import { Field } from '../../state/mint/actions'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
export function PoolPriceBar({
currencies,
......@@ -26,7 +26,7 @@ export function PoolPriceBar({
<AutoColumn gap="md">
<AutoRow justify="space-around" gap="4px">
<AutoColumn justify="center">
<ThemedText.Black>{price?.toSignificant(6) ?? '-'}</ThemedText.Black>
<TYPE.black>{price?.toSignificant(6) ?? '-'}</TYPE.black>
<Text fontWeight={500} fontSize={14} color={theme.text2} pt={1}>
<Trans>
{currencies[Field.CURRENCY_B]?.symbol} per {currencies[Field.CURRENCY_A]?.symbol}
......@@ -34,7 +34,7 @@ export function PoolPriceBar({
</Text>
</AutoColumn>
<AutoColumn justify="center">
<ThemedText.Black>{price?.invert()?.toSignificant(6) ?? '-'}</ThemedText.Black>
<TYPE.black>{price?.invert()?.toSignificant(6) ?? '-'}</TYPE.black>
<Text fontWeight={500} fontSize={14} color={theme.text2} pt={1}>
<Trans>
{currencies[Field.CURRENCY_A]?.symbol} per {currencies[Field.CURRENCY_B]?.symbol}
......@@ -42,12 +42,12 @@ export function PoolPriceBar({
</Text>
</AutoColumn>
<AutoColumn justify="center">
<ThemedText.Black>
<TYPE.black>
{noLiquidity && price
? '100'
: (poolTokenPercentage?.lessThan(ONE_BIPS) ? '<0.01' : poolTokenPercentage?.toFixed(2)) ?? '0'}
%
</ThemedText.Black>
</TYPE.black>
<Text fontWeight={500} fontSize={14} color={theme.text2} pt={1}>
<Trans>Share of Pool</Trans>
</Text>
......
......@@ -35,7 +35,7 @@ import { useDerivedMintInfo, useMintActionHandlers, useMintState } from '../../s
import { TransactionType } from '../../state/transactions/actions'
import { useTransactionAdder } from '../../state/transactions/hooks'
import { useIsExpertMode, useUserSlippageToleranceWithDefault } from '../../state/user/hooks'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { calculateGasMargin } from '../../utils/calculateGasMargin'
import { calculateSlippageAmount } from '../../utils/calculateSlippageAmount'
import { currencyId } from '../../utils/currencyId'
......@@ -247,12 +247,12 @@ export default function AddLiquidity({
{currencies[Field.CURRENCY_A]?.symbol + '/' + currencies[Field.CURRENCY_B]?.symbol + ' Pool Tokens'}
</Text>
</Row>
<ThemedText.Italic fontSize={12} textAlign="left" padding={'8px 0 0 0 '}>
<TYPE.italic fontSize={12} textAlign="left" padding={'8px 0 0 0 '}>
<Trans>
Output is estimated. If the price changes by more than {allowedSlippage.toSignificant(4)}% your transaction
will revert.
</Trans>
</ThemedText.Italic>
</TYPE.italic>
</AutoColumn>
)
}
......@@ -344,15 +344,15 @@ export default function AddLiquidity({
<ColumnCenter>
<BlueCard>
<AutoColumn gap="10px">
<ThemedText.Link fontWeight={600} color={'primaryText1'}>
<TYPE.link fontWeight={600} color={'primaryText1'}>
<Trans>You are the first liquidity provider.</Trans>
</ThemedText.Link>
<ThemedText.Link fontWeight={400} color={'primaryText1'}>
</TYPE.link>
<TYPE.link fontWeight={400} color={'primaryText1'}>
<Trans>The ratio of tokens you add will set the price of this pool.</Trans>
</ThemedText.Link>
<ThemedText.Link fontWeight={400} color={'primaryText1'}>
</TYPE.link>
<TYPE.link fontWeight={400} color={'primaryText1'}>
<Trans>Once you are happy with the rate click supply to review.</Trans>
</ThemedText.Link>
</TYPE.link>
</AutoColumn>
</BlueCard>
</ColumnCenter>
......@@ -360,7 +360,7 @@ export default function AddLiquidity({
<ColumnCenter>
<BlueCard>
<AutoColumn gap="10px">
<ThemedText.Link fontWeight={400} color={'primaryText1'}>
<TYPE.link fontWeight={400} color={'primaryText1'}>
<Trans>
<b>
<Trans>Tip:</Trans>
......@@ -369,7 +369,7 @@ export default function AddLiquidity({
automatically earn fees proportional to your share of the pool, and can be redeemed at any
time.
</Trans>
</ThemedText.Link>
</TYPE.link>
</AutoColumn>
</BlueCard>
</ColumnCenter>
......@@ -405,13 +405,13 @@ export default function AddLiquidity({
<>
<LightCard padding="0px" $borderRadius={'20px'}>
<RowBetween padding="1rem">
<ThemedText.SubHeader fontWeight={500} fontSize={14}>
<TYPE.subHeader fontWeight={500} fontSize={14}>
{noLiquidity ? (
<Trans>Initial prices and pool share</Trans>
) : (
<Trans>Prices and pool share</Trans>
)}
</ThemedText.SubHeader>
</TYPE.subHeader>
</RowBetween>{' '}
<LightCard padding="1rem" $borderRadius={'20px'}>
<PoolPriceBar
......@@ -427,9 +427,9 @@ export default function AddLiquidity({
{addIsUnsupported ? (
<ButtonPrimary disabled={true}>
<ThemedText.Main mb="4px">
<TYPE.main mb="4px">
<Trans>Unsupported Asset</Trans>
</ThemedText.Main>
</TYPE.main>
</ButtonPrimary>
) : !account ? (
<ButtonLight onClick={toggleWalletModal}>
......
......@@ -7,7 +7,7 @@ import React, { useContext } from 'react'
import { Link } from 'react-router-dom'
import { Text } from 'rebass'
import { ThemeContext } from 'styled-components/macro'
import { ExternalLink, ThemedText } from 'theme'
import { ExternalLink, TYPE } from 'theme'
import { ExplorerDataType, getExplorerLink } from 'utils/getExplorerLink'
export const ProposalSubmissionModal = ({
......@@ -26,9 +26,9 @@ export const ProposalSubmissionModal = ({
{!hash ? (
<LoadingView onDismiss={onDismiss}>
<AutoColumn gap="12px" justify={'center'}>
<ThemedText.LargeHeader>
<TYPE.largeHeader>
<Trans>Submitting Proposal</Trans>
</ThemedText.LargeHeader>
</TYPE.largeHeader>
</AutoColumn>
</LoadingView>
) : (
......
......@@ -20,7 +20,7 @@ import {
} from 'state/governance/hooks'
import { tryParseAmount } from 'state/swap/hooks'
import styled from 'styled-components/macro'
import { ExternalLink, ThemedText } from 'theme'
import { ExternalLink, TYPE } from 'theme'
import { CreateProposalTabs } from '../../components/NavigationTabs'
import { UNI } from '../../constants/tokens'
......@@ -230,7 +230,7 @@ ${bodyValue}
<CreateProposalWrapper>
<BlueCard>
<AutoColumn gap="10px">
<ThemedText.Link fontWeight={400} color={'primaryText1'}>
<TYPE.link fontWeight={400} color={'primaryText1'}>
<Trans>
<strong>Tip:</strong> Select an action and describe your proposal for the community. The proposal cannot
be modified after submission, so please verify all information before submitting. The voting period will
......@@ -240,7 +240,7 @@ ${bodyValue}
</ExternalLink>
.
</Trans>
</ThemedText.Link>
</TYPE.link>
</AutoColumn>
</BlueCard>
......
import { useEffect, useMemo, useState } from 'react'
import { REWARDS_DURATION_DAYS, STAKING_GENESIS } from '../../state/stake/hooks'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
const MINUTE = 60
const HOUR = MINUTE * 60
......@@ -56,7 +56,7 @@ export function Countdown({ exactEnd }: { exactEnd?: Date }) {
const seconds = timeRemaining
return (
<ThemedText.Black fontWeight={400}>
<TYPE.black fontWeight={400}>
{message}{' '}
{Number.isFinite(timeRemaining) && (
<code>
......@@ -65,6 +65,6 @@ export function Countdown({ exactEnd }: { exactEnd?: Date }) {
.padStart(2, '0')}`}
</code>
)}
</ThemedText.Black>
</TYPE.black>
)
}
......@@ -26,7 +26,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import { useWalletModalToggle } from '../../state/application/hooks'
import { useStakingInfo } from '../../state/stake/hooks'
import { useTokenBalance } from '../../state/wallet/hooks'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { currencyId } from '../../utils/currencyId'
const PageWrapper = styled(AutoColumn)`
......@@ -155,33 +155,33 @@ export default function Manage({
return (
<PageWrapper gap="lg" justify="center">
<RowBetween style={{ gap: '24px' }}>
<ThemedText.MediumHeader style={{ margin: 0 }}>
<TYPE.mediumHeader style={{ margin: 0 }}>
<Trans>
{currencyA?.symbol}-{currencyB?.symbol} Liquidity Mining
</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<DoubleCurrencyLogo currency0={currencyA ?? undefined} currency1={currencyB ?? undefined} size={24} />
</RowBetween>
<DataRow style={{ gap: '24px' }}>
<PoolData>
<AutoColumn gap="sm">
<ThemedText.Body style={{ margin: 0 }}>
<TYPE.body style={{ margin: 0 }}>
<Trans>Total deposits</Trans>
</ThemedText.Body>
<ThemedText.Body fontSize={24} fontWeight={500}>
</TYPE.body>
<TYPE.body fontSize={24} fontWeight={500}>
{valueOfTotalStakedAmountInUSDC
? `$${valueOfTotalStakedAmountInUSDC.toFixed(0, { groupSeparator: ',' })}`
: `${valueOfTotalStakedAmountInWETH?.toSignificant(4, { groupSeparator: ',' }) ?? '-'} ETH`}
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
</PoolData>
<PoolData>
<AutoColumn gap="sm">
<ThemedText.Body style={{ margin: 0 }}>
<TYPE.body style={{ margin: 0 }}>
<Trans>Pool Rate</Trans>
</ThemedText.Body>
<ThemedText.Body fontSize={24} fontWeight={500}>
</TYPE.body>
<TYPE.body fontSize={24} fontWeight={500}>
{stakingInfo?.active ? (
<Trans>
{stakingInfo.totalRewardRate?.multiply(BIG_INT_SECONDS_IN_WEEK)?.toFixed(0, { groupSeparator: ',' })}{' '}
......@@ -190,7 +190,7 @@ export default function Manage({
) : (
<Trans>0 UNI / week</Trans>
)}
</ThemedText.Body>
</TYPE.body>
</AutoColumn>
</PoolData>
</DataRow>
......@@ -202,17 +202,17 @@ export default function Manage({
<CardSection>
<AutoColumn gap="md">
<RowBetween>
<ThemedText.White fontWeight={600}>
<TYPE.white fontWeight={600}>
<Trans>Step 1. Get UNI-V2 Liquidity tokens</Trans>
</ThemedText.White>
</TYPE.white>
</RowBetween>
<RowBetween style={{ marginBottom: '1rem' }}>
<ThemedText.White fontSize={14}>
<TYPE.white fontSize={14}>
<Trans>
UNI-V2 LP tokens are required. Once you&apos;ve added liquidity to the {currencyA?.symbol}-
{currencyB?.symbol} pool you can stake your liquidity tokens on this page.
</Trans>
</ThemedText.White>
</TYPE.white>
</RowBetween>
<ButtonPrimary
padding="8px"
......@@ -261,19 +261,19 @@ export default function Manage({
<CardNoise />
<AutoColumn gap="md">
<RowBetween>
<ThemedText.White fontWeight={600}>
<TYPE.white fontWeight={600}>
<Trans>Your liquidity deposits</Trans>
</ThemedText.White>
</TYPE.white>
</RowBetween>
<RowBetween style={{ alignItems: 'baseline' }}>
<ThemedText.White fontSize={36} fontWeight={600}>
<TYPE.white fontSize={36} fontWeight={600}>
{stakingInfo?.stakedAmount?.toSignificant(6) ?? '-'}
</ThemedText.White>
<ThemedText.White>
</TYPE.white>
<TYPE.white>
<Trans>
UNI-V2 {currencyA?.symbol}-{currencyB?.symbol}
</Trans>
</ThemedText.White>
</TYPE.white>
</RowBetween>
</AutoColumn>
</CardSection>
......@@ -284,9 +284,9 @@ export default function Manage({
<AutoColumn gap="sm">
<RowBetween>
<div>
<ThemedText.Black>
<TYPE.black>
<Trans>Your unclaimed UNI</Trans>
</ThemedText.Black>
</TYPE.black>
</div>
{stakingInfo?.earnedAmount && JSBI.notEqual(BIG_INT_ZERO, stakingInfo?.earnedAmount?.quotient) && (
<ButtonEmpty
......@@ -300,7 +300,7 @@ export default function Manage({
)}
</RowBetween>
<RowBetween style={{ alignItems: 'baseline' }}>
<ThemedText.LargeHeader fontSize={36} fontWeight={600}>
<TYPE.largeHeader fontSize={36} fontWeight={600}>
<CountUp
key={countUpAmount}
isCounting
......@@ -310,8 +310,8 @@ export default function Manage({
thousandsSeparator={','}
duration={1}
/>
</ThemedText.LargeHeader>
<ThemedText.Black fontSize={16} fontWeight={500}>
</TYPE.largeHeader>
<TYPE.black fontSize={16} fontWeight={500}>
<span role="img" aria-label="wizard-icon" style={{ marginRight: '8px ' }}>
</span>
......@@ -324,17 +324,17 @@ export default function Manage({
) : (
<Trans>0 UNI / week</Trans>
)}
</ThemedText.Black>
</TYPE.black>
</RowBetween>
</AutoColumn>
</StyledBottomCard>
</BottomSection>
<ThemedText.Main style={{ textAlign: 'center' }} fontSize={14}>
<TYPE.main style={{ textAlign: 'center' }} fontSize={14}>
<span role="img" aria-label="wizard-icon" style={{ marginRight: '8px' }}>
⭐️
</span>
<Trans>When you withdraw, the contract will automagically claim UNI on your behalf!</Trans>
</ThemedText.Main>
</TYPE.main>
{!showAddLiquidityButton && (
<DataRow style={{ marginBottom: '1rem' }}>
......@@ -363,9 +363,9 @@ export default function Manage({
</DataRow>
)}
{!userLiquidityUnstaked ? null : userLiquidityUnstaked.equalTo('0') ? null : !stakingInfo?.active ? null : (
<ThemedText.Main>
<TYPE.main>
<Trans>{userLiquidityUnstaked.toSignificant(6)} UNI-V2 LP tokens available</Trans>
</ThemedText.Main>
</TYPE.main>
)}
</PositionInfo>
</PageWrapper>
......
......@@ -11,7 +11,7 @@ import { RowBetween } from '../../components/Row'
import { BIG_INT_ZERO } from '../../constants/misc'
import { useActiveWeb3React } from '../../hooks/web3'
import { STAKING_REWARDS_INFO, useStakingInfo } from '../../state/stake/hooks'
import { ExternalLink, ThemedText } from '../../theme'
import { ExternalLink, TYPE } from '../../theme'
import { Countdown } from './Countdown'
const PageWrapper = styled(AutoColumn)`
......@@ -63,25 +63,25 @@ export default function Earn() {
<CardSection>
<AutoColumn gap="md">
<RowBetween>
<ThemedText.White fontWeight={600}>
<TYPE.white fontWeight={600}>
<Trans>Uniswap liquidity mining</Trans>
</ThemedText.White>
</TYPE.white>
</RowBetween>
<RowBetween>
<ThemedText.White fontSize={14}>
<TYPE.white fontSize={14}>
<Trans>
Deposit your Liquidity Provider tokens to receive UNI, the Uniswap protocol governance token.
</Trans>
</ThemedText.White>
</TYPE.white>
</RowBetween>{' '}
<ExternalLink
style={{ color: 'white', textDecoration: 'underline' }}
href="https://uniswap.org/blog/uni/"
target="_blank"
>
<ThemedText.White fontSize={14}>
<TYPE.white fontSize={14}>
<Trans>Read more about UNI</Trans>
</ThemedText.White>
</TYPE.white>
</ExternalLink>
</AutoColumn>
</CardSection>
......@@ -92,9 +92,9 @@ export default function Earn() {
<AutoColumn gap="lg" style={{ width: '100%', maxWidth: '720px' }}>
<DataRow style={{ alignItems: 'baseline' }}>
<ThemedText.MediumHeader style={{ marginTop: '0.5rem' }}>
<TYPE.mediumHeader style={{ marginTop: '0.5rem' }}>
<Trans>Participating pools</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<Countdown exactEnd={stakingInfos?.[0]?.periodFinish} />
</DataRow>
......
This diff is collapsed.
......@@ -20,13 +20,13 @@ import { V2_FACTORY_ADDRESSES } from '../../constants/addresses'
import { useActiveWeb3React } from '../../hooks/web3'
import { toV2LiquidityToken, useTrackedTokenPairs } from '../../state/user/hooks'
import { useTokenBalancesWithLoadingIndicator } from '../../state/wallet/hooks'
import { BackArrow, StyledInternalLink, ThemedText } from '../../theme'
import { BackArrow, StyledInternalLink, TYPE } from '../../theme'
import { BodyWrapper } from '../AppBody'
function EmptyState({ message }: { message: ReactNode }) {
return (
<AutoColumn style={{ minHeight: 200, justifyContent: 'center', alignItems: 'center' }}>
<ThemedText.Body>{message}</ThemedText.Body>
<TYPE.body>{message}</TYPE.body>
</AutoColumn>
)
}
......@@ -117,34 +117,34 @@ export default function MigrateV2() {
<AutoColumn gap="16px">
<AutoRow style={{ alignItems: 'center', justifyContent: 'space-between' }} gap="8px">
<BackArrow to="/pool/v2" />
<ThemedText.MediumHeader>
<TYPE.mediumHeader>
<Trans>Migrate V2 Liquidity</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<div>
<QuestionHelper text={<Trans>Migrate your liquidity tokens from Uniswap V2 to Uniswap V3.</Trans>} />
</div>
</AutoRow>
<ThemedText.Body style={{ marginBottom: 8, fontWeight: 400 }}>
<TYPE.body style={{ marginBottom: 8, fontWeight: 400 }}>
<Trans>
For each pool shown below, click migrate to remove your liquidity from Uniswap V2 and deposit it into
Uniswap V3.
</Trans>
</ThemedText.Body>
</TYPE.body>
{!account ? (
<LightCard padding="40px">
<ThemedText.Body color={theme.text3} textAlign="center">
<TYPE.body color={theme.text3} textAlign="center">
<Trans>Connect to a wallet to view your V2 liquidity.</Trans>
</ThemedText.Body>
</TYPE.body>
</LightCard>
) : v2IsLoading ? (
<LightCard padding="40px">
<ThemedText.Body color={theme.text3} textAlign="center">
<TYPE.body color={theme.text3} textAlign="center">
<Dots>
<Trans>Loading</Trans>
</Dots>
</ThemedText.Body>
</TYPE.body>
</LightCard>
) : v2Pairs.filter(([, pair]) => !!pair).length > 0 ? (
<>
......
......@@ -3,7 +3,7 @@ import { AutoColumn } from 'components/Column'
import { CHAIN_INFO, SupportedChainId } from 'constants/chains'
import { useActiveWeb3React } from 'hooks/web3'
import styled from 'styled-components/macro'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
import Texture from '../../assets/images/sandtexture.webp'
import { ExternalLink } from '../../theme'
......@@ -102,7 +102,7 @@ const CTA2 = styled(ExternalLink)`
}
`
const HeaderText = styled(ThemedText.Label)`
const HeaderText = styled(TYPE.label)`
align-items: center;
display: flex;
margin-bottom: 24px;
......@@ -133,9 +133,9 @@ export default function CTACards() {
<HeaderText>
<Trans>Learn about providing liquidity</Trans>
</HeaderText>
<ThemedText.Body fontWeight={300} style={{ alignItems: 'center', display: 'flex', maxWidth: '80%' }}>
<TYPE.body fontWeight={300} style={{ alignItems: 'center', display: 'flex', maxWidth: '80%' }}>
<Trans>Check out our v3 LP walkthrough and migration guides.</Trans>
</ThemedText.Body>
</TYPE.body>
</ResponsiveColumn>
</CTA1>
<CTA2 href={infoLink + 'pools'}>
......@@ -143,9 +143,9 @@ export default function CTACards() {
<HeaderText style={{ alignSelf: 'flex-start' }}>
<Trans>Top pools</Trans>
</HeaderText>
<ThemedText.Body fontWeight={300} style={{ alignSelf: 'flex-start' }}>
<TYPE.body fontWeight={300} style={{ alignSelf: 'flex-start' }}>
<Trans>Explore popular pools on Uniswap Analytics.</Trans>
</ThemedText.Body>
</TYPE.body>
</ResponsiveColumn>
</CTA2>
</CTASection>
......
This diff is collapsed.
......@@ -17,7 +17,7 @@ import { Link } from 'react-router-dom'
import { useWalletModalToggle } from 'state/application/hooks'
import { useUserHideClosedPositions } from 'state/user/hooks'
import styled, { ThemeContext } from 'styled-components/macro'
import { HideSmall, ThemedText } from 'theme'
import { HideSmall, TYPE } from 'theme'
import { PositionDetails } from 'types/position'
import CTACards from './CTACards'
......@@ -199,9 +199,9 @@ export default function Pool() {
<AutoColumn gap="lg" justify="center">
<AutoColumn gap="lg" style={{ width: '100%' }}>
<TitleRow style={{ marginTop: '1rem' }} padding={'0'}>
<ThemedText.Body fontSize={'20px'}>
<TYPE.body fontSize={'20px'}>
<Trans>Pools Overview</Trans>
</ThemedText.Body>
</TYPE.body>
<ButtonRow>
{showV2Features && (
<Menu
......@@ -209,10 +209,10 @@ export default function Pool() {
flyoutAlignment={FlyoutAlignment.LEFT}
ToggleUI={(props: any) => (
<MoreOptionsButton {...props}>
<ThemedText.Body style={{ alignItems: 'center', display: 'flex' }}>
<TYPE.body style={{ alignItems: 'center', display: 'flex' }}>
<Trans>More</Trans>
<ChevronDown size={15} />
</ThemedText.Body>
</TYPE.body>
</MoreOptionsButton>
)}
/>
......@@ -249,12 +249,12 @@ export default function Pool() {
<PositionList positions={filteredPositions} />
) : (
<NoLiquidity>
<ThemedText.Body color={theme.text3} textAlign="center">
<TYPE.body color={theme.text3} textAlign="center">
<Inbox size={48} strokeWidth={1} style={{ marginBottom: '.5rem' }} />
<div>
<Trans>Your V3 liquidity positions will appear here.</Trans>
</div>
</ThemedText.Body>
</TYPE.body>
{showConnectAWallet && (
<ButtonPrimary style={{ marginTop: '2em', padding: '8px 16px' }} onClick={toggleWalletModal}>
<Trans>Connect a wallet</Trans>
......@@ -306,9 +306,9 @@ export default function Pool() {
{closedPositions.length > 0 ? (
<ShowInactiveToggle>
<label>
<ThemedText.Body onClick={() => setUserHideClosedPositions(!userHideClosedPositions)}>
<TYPE.body onClick={() => setUserHideClosedPositions(!userHideClosedPositions)}>
<Trans>Show closed positions</Trans>
</ThemedText.Body>
</TYPE.body>
</label>
<input
type="checkbox"
......
......@@ -23,7 +23,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import { useStakingInfo } from '../../state/stake/hooks'
import { toV2LiquidityToken, useTrackedTokenPairs } from '../../state/user/hooks'
import { useTokenBalancesWithLoadingIndicator } from '../../state/wallet/hooks'
import { ExternalLink, HideSmall, ThemedText } from '../../theme'
import { ExternalLink, HideSmall, TYPE } from '../../theme'
const PageWrapper = styled(AutoColumn)`
max-width: 640px;
......@@ -144,26 +144,26 @@ export default function Pool() {
<CardSection>
<AutoColumn gap="md">
<RowBetween>
<ThemedText.White fontWeight={600}>
<TYPE.white fontWeight={600}>
<Trans>Liquidity provider rewards</Trans>
</ThemedText.White>
</TYPE.white>
</RowBetween>
<RowBetween>
<ThemedText.White fontSize={14}>
<TYPE.white fontSize={14}>
<Trans>
Liquidity providers earn a 0.3% fee on all trades proportional to their share of the pool. Fees are
added to the pool, accrue in real time and can be claimed by withdrawing your liquidity.
</Trans>
</ThemedText.White>
</TYPE.white>
</RowBetween>
<ExternalLink
style={{ color: 'white', textDecoration: 'underline' }}
target="_blank"
href="https://uniswap.org/docs/v2/core-concepts/pools/"
>
<ThemedText.White fontSize={14}>
<TYPE.white fontSize={14}>
<Trans>Read more about providing liquidity</Trans>
</ThemedText.White>
</TYPE.white>
</ExternalLink>
</AutoColumn>
</CardSection>
......@@ -175,9 +175,9 @@ export default function Pool() {
<AutoColumn gap="lg" justify="center">
<AutoColumn gap="md" style={{ width: '100%' }}>
<Layer2Prompt>
<ThemedText.Body color={theme.text3} textAlign="center">
<TYPE.body color={theme.text3} textAlign="center">
<Trans>V2 is not available on Layer 2. Switch to Layer 1 Ethereum.</Trans>
</ThemedText.Body>
</TYPE.body>
</Layer2Prompt>
</AutoColumn>
</AutoColumn>
......@@ -186,9 +186,9 @@ export default function Pool() {
<AutoColumn gap="md" style={{ width: '100%' }}>
<TitleRow style={{ marginTop: '1rem' }} padding={'0'}>
<HideSmall>
<ThemedText.MediumHeader style={{ marginTop: '0.5rem', justifySelf: 'flex-start' }}>
<TYPE.mediumHeader style={{ marginTop: '0.5rem', justifySelf: 'flex-start' }}>
<Trans>Your V2 liquidity</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
</HideSmall>
<ButtonRow>
<ResponsiveButtonSecondary as={Link} padding="6px 8px" to="/add/v2/ETH">
......@@ -209,17 +209,17 @@ export default function Pool() {
{!account ? (
<Card padding="40px">
<ThemedText.Body color={theme.text3} textAlign="center">
<TYPE.body color={theme.text3} textAlign="center">
<Trans>Connect to a wallet to view your liquidity.</Trans>
</ThemedText.Body>
</TYPE.body>
</Card>
) : v2IsLoading ? (
<EmptyProposals>
<ThemedText.Body color={theme.text3} textAlign="center">
<TYPE.body color={theme.text3} textAlign="center">
<Dots>
<Trans>Loading</Trans>
</Dots>
</ThemedText.Body>
</TYPE.body>
</EmptyProposals>
) : allV2PairsWithLiquidity?.length > 0 || stakingPairs?.length > 0 ? (
<>
......@@ -266,9 +266,9 @@ export default function Pool() {
</>
) : (
<EmptyProposals>
<ThemedText.Body color={theme.text3} textAlign="center">
<TYPE.body color={theme.text3} textAlign="center">
<Trans>No liquidity found.</Trans>
</ThemedText.Body>
</TYPE.body>
</EmptyProposals>
)}
</AutoColumn>
......
......@@ -22,7 +22,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import { usePairAdder } from '../../state/user/hooks'
import { useTokenBalance } from '../../state/wallet/hooks'
import { StyledInternalLink } from '../../theme'
import { ThemedText } from '../../theme'
import { TYPE } from '../../theme'
import { currencyId } from '../../utils/currencyId'
import AppBody from '../AppBody'
import { Dots } from '../Pool/styleds'
......@@ -101,11 +101,11 @@ export default function PoolFinder() {
<AutoColumn style={{ padding: '1rem' }} gap="md">
<BlueCard>
<AutoColumn gap="10px">
<ThemedText.Link fontWeight={400} color={'primaryText1'}>
<TYPE.link fontWeight={400} color={'primaryText1'}>
<Trans>
<b>Tip:</b> Use this tool to find v2 pools that don&apos;t automatically appear in the interface.
</Trans>
</ThemedText.Link>
</TYPE.link>
</AutoColumn>
</BlueCard>
<ButtonDropdownLight
......
......@@ -29,7 +29,7 @@ import { Text } from 'rebass'
import { useBurnV3ActionHandlers, useBurnV3State, useDerivedV3BurnInfo } from 'state/burn/v3/hooks'
import { useTransactionAdder } from 'state/transactions/hooks'
import { useUserSlippageToleranceWithDefault } from 'state/user/hooks'
import { ThemedText } from 'theme'
import { TYPE } from 'theme'
import TransactionConfirmationModal, { ConfirmationModalContent } from '../../components/TransactionConfirmationModal'
import { WETH9_EXTENDED } from '../../constants/tokens'
......@@ -227,9 +227,9 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
</RowBetween>
{feeValue0?.greaterThan(0) || feeValue1?.greaterThan(0) ? (
<>
<ThemedText.Italic fontSize={12} color={theme.text2} textAlign="left" padding={'8px 0 0 0'}>
<TYPE.italic fontSize={12} color={theme.text2} textAlign="left" padding={'8px 0 0 0'}>
<Trans>You will also collect fees earned from this position.</Trans>
</ThemedText.Italic>
</TYPE.italic>
<RowBetween>
<Text fontSize={16} fontWeight={500}>
<Trans>{feeValue0?.currency?.symbol} Fees Earned:</Trans>
......@@ -303,18 +303,18 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
size={20}
margin={true}
/>
<ThemedText.Label
<TYPE.label
ml="10px"
fontSize="20px"
>{`${feeValue0?.currency?.symbol}/${feeValue1?.currency?.symbol}`}</ThemedText.Label>
>{`${feeValue0?.currency?.symbol}/${feeValue1?.currency?.symbol}`}</TYPE.label>
</RowFixed>
<RangeBadge removed={removed} inRange={!outOfRange} />
</RowBetween>
<LightCard>
<AutoColumn gap="md">
<ThemedText.Main fontWeight={400}>
<TYPE.main fontWeight={400}>
<Trans>Amount</Trans>
</ThemedText.Main>
</TYPE.main>
<RowBetween>
<ResponsiveHeaderText>
<Trans>{percentForSlider}%</Trans>
......@@ -393,9 +393,9 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
{showCollectAsWeth && (
<RowBetween>
<ThemedText.Main>
<TYPE.main>
<Trans>Collect as WETH</Trans>
</ThemedText.Main>
</TYPE.main>
<Toggle
id="receive-as-weth"
isActive={receiveWETH}
......
......@@ -36,7 +36,7 @@ import { useBurnActionHandlers, useBurnState, useDerivedBurnInfo } from '../../s
import { TransactionType } from '../../state/transactions/actions'
import { useTransactionAdder } from '../../state/transactions/hooks'
import { useUserSlippageToleranceWithDefault } from '../../state/user/hooks'
import { StyledInternalLink, ThemedText } from '../../theme'
import { StyledInternalLink, TYPE } from '../../theme'
import { calculateGasMargin } from '../../utils/calculateGasMargin'
import { calculateSlippageAmount } from '../../utils/calculateSlippageAmount'
import { currencyId } from '../../utils/currencyId'
......@@ -318,12 +318,12 @@ export default function RemoveLiquidity({
</RowFixed>
</RowBetween>
<ThemedText.Italic fontSize={12} color={theme.text2} textAlign="left" padding={'12px 0 0 0'}>
<TYPE.italic fontSize={12} color={theme.text2} textAlign="left" padding={'12px 0 0 0'}>
<Trans>
Output is estimated. If the price changes by more than {allowedSlippage.toSignificant(4)}% your transaction
will revert.
</Trans>
</ThemedText.Italic>
</TYPE.italic>
</AutoColumn>
)
}
......@@ -450,12 +450,12 @@ export default function RemoveLiquidity({
<AutoColumn gap="md">
<BlueCard>
<AutoColumn gap="10px">
<ThemedText.Link fontWeight={400} color={'primaryText1'}>
<TYPE.link fontWeight={400} color={'primaryText1'}>
<Trans>
<b>Tip:</b> Removing pool tokens converts your position back into underlying tokens at the current
rate, proportional to your share of the pool. Accrued fees are included in the amounts you receive.
</Trans>
</ThemedText.Link>
</TYPE.link>
</AutoColumn>
</BlueCard>
<LightCard>
......
......@@ -59,7 +59,7 @@ import {
useSwapState,
} from '../../state/swap/hooks'
import { useExpertModeManager } from '../../state/user/hooks'
import { LinkStyledButton, ThemedText } from '../../theme'
import { LinkStyledButton, TYPE } from '../../theme'
import { computeFiatValuePriceImpact } from '../../utils/computeFiatValuePriceImpact'
import { getTradeVersion } from '../../utils/getTradeVersion'
import { maxAmountSpend } from '../../utils/maxAmountSpend'
......@@ -468,7 +468,7 @@ export default function Swap({ history }: RouteComponentProps) {
<AutoRouterLogo />
<LoadingOpacityContainer $loading={routeIsSyncing}>
{trade instanceof V3Trade && trade.swaps.length > 1 && (
<ThemedText.Blue fontSize={14}>{trade.swaps.length} routes</ThemedText.Blue>
<TYPE.blue fontSize={14}>{trade.swaps.length} routes</TYPE.blue>
)}
</LoadingOpacityContainer>
</AutoRow>
......@@ -506,9 +506,9 @@ export default function Swap({ history }: RouteComponentProps) {
<div>
{swapIsUnsupported ? (
<ButtonPrimary disabled={true}>
<ThemedText.Main mb="4px">
<TYPE.main mb="4px">
<Trans>Unsupported Asset</Trans>
</ThemedText.Main>
</TYPE.main>
</ButtonPrimary>
) : !account ? (
<ButtonLight onClick={toggleWalletModal}>
......@@ -525,17 +525,17 @@ export default function Swap({ history }: RouteComponentProps) {
</ButtonPrimary>
) : routeIsSyncing || routeIsLoading ? (
<GreyCard style={{ textAlign: 'center' }}>
<ThemedText.Main mb="4px">
<TYPE.main mb="4px">
<Dots>
<Trans>Loading</Trans>
</Dots>
</ThemedText.Main>
</TYPE.main>
</GreyCard>
) : routeNotFound && userHasSpecifiedInputOutput ? (
<GreyCard style={{ textAlign: 'center' }}>
<ThemedText.Main mb="4px">
<TYPE.main mb="4px">
<Trans>Insufficient liquidity for this trade.</Trans>
</ThemedText.Main>
</TYPE.main>
</GreyCard>
) : showApproveFlow ? (
<AutoRow style={{ flexWrap: 'nowrap', width: '100%' }}>
......
......@@ -20,7 +20,7 @@ import { ProposalData } from 'state/governance/hooks'
import { useAllProposalData, useUserDelegatee, useUserVotes } from 'state/governance/hooks'
import { useTokenBalance } from 'state/wallet/hooks'
import styled from 'styled-components/macro'
import { ExternalLink, ThemedText } from 'theme'
import { ExternalLink, TYPE } from 'theme'
import { shortenAddress } from 'utils'
import { ExplorerDataType, getExplorerLink } from 'utils/getExplorerLink'
......@@ -40,8 +40,8 @@ const Proposal = styled(Button)`
width: 100%;
margin-top: 1rem;
border-radius: 12px;
display: flex;
justify-content: space-between;
display: grid;
grid-template-columns: 48px 1fr 120px;
align-items: center;
text-align: left;
outline: none;
......@@ -59,16 +59,10 @@ const Proposal = styled(Button)`
const ProposalNumber = styled.span`
opacity: 0.6;
flex: 0 0 40px;
`
const ProposalTitle = styled.span`
font-weight: 600;
flex: 1;
max-width: 420px;
white-space: initial;
word-wrap: break-word;
padding-right: 10px;
`
const VoteCard = styled(DataCard)`
......@@ -83,7 +77,7 @@ const WrapSmall = styled(RowBetween)`
`};
`
const TextButton = styled(ThemedText.Main)`
const TextButton = styled(TYPE.main)`
color: ${({ theme }) => theme.primary1};
:hover {
cursor: pointer;
......@@ -141,26 +135,26 @@ export default function Landing() {
<CardSection>
<AutoColumn gap="md">
<RowBetween>
<ThemedText.White fontWeight={600}>
<TYPE.white fontWeight={600}>
<Trans>Uniswap Governance</Trans>
</ThemedText.White>
</TYPE.white>
</RowBetween>
<RowBetween>
<ThemedText.White fontSize={14}>
<TYPE.white fontSize={14}>
<Trans>
UNI tokens represent voting shares in Uniswap governance. You can vote on each proposal yourself
or delegate your votes to a third party.
</Trans>
</ThemedText.White>
</TYPE.white>
</RowBetween>
<ExternalLink
style={{ color: 'white', textDecoration: 'underline' }}
href="https://uniswap.org/blog/uni"
target="_blank"
>
<ThemedText.White fontSize={14}>
<TYPE.white fontSize={14}>
<Trans>Read more about Uniswap governance</Trans>
</ThemedText.White>
</TYPE.white>
</ExternalLink>
</AutoColumn>
</CardSection>
......@@ -170,9 +164,9 @@ export default function Landing() {
</TopSection>
<TopSection gap="2px">
<WrapSmall>
<ThemedText.MediumHeader style={{ margin: '0.5rem 0.5rem 0.5rem 0', flexShrink: 0 }}>
<TYPE.mediumHeader style={{ margin: '0.5rem 0.5rem 0.5rem 0', flexShrink: 0 }}>
<Trans>Proposals</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<AutoRow gap="6px" justify="flex-end">
{loadingProposals || loadingAvailableVotes ? <Loader /> : null}
{showUnlockVoting ? (
......@@ -185,20 +179,20 @@ export default function Landing() {
<Trans>Unlock Voting</Trans>
</ButtonPrimary>
) : availableVotes && JSBI.notEqual(JSBI.BigInt(0), availableVotes?.quotient) ? (
<ThemedText.Body fontWeight={500} mr="6px">
<TYPE.body fontWeight={500} mr="6px">
<Trans>
<FormattedCurrencyAmount currencyAmount={availableVotes} /> Votes
</Trans>
</ThemedText.Body>
</TYPE.body>
) : uniBalance &&
userDelegatee &&
userDelegatee !== ZERO_ADDRESS &&
JSBI.notEqual(JSBI.BigInt(0), uniBalance?.quotient) ? (
<ThemedText.Body fontWeight={500} mr="6px">
<TYPE.body fontWeight={500} mr="6px">
<Trans>
<FormattedCurrencyAmount currencyAmount={uniBalance} /> Votes
</Trans>
</ThemedText.Body>
</TYPE.body>
) : (
''
)}
......@@ -217,9 +211,9 @@ export default function Landing() {
<div />
{userDelegatee && userDelegatee !== ZERO_ADDRESS ? (
<RowFixed>
<ThemedText.Body fontWeight={500} mr="4px">
<TYPE.body fontWeight={500} mr="4px">
<Trans>Delegated to:</Trans>
</ThemedText.Body>
</TYPE.body>
<AddressButton>
<StyledExternalLink
href={getExplorerLink(1, userDelegatee, ExplorerDataType.ADDRESS)}
......@@ -253,9 +247,9 @@ export default function Landing() {
)
})}
</TopSection>
<ThemedText.SubHeader color="text3">
<TYPE.subHeader color="text3">
<Trans>A minimum threshold of 0.25% of the total UNI supply is required to submit proposals</Trans>
</ThemedText.SubHeader>
</TYPE.subHeader>
</PageWrapper>
<SwitchLocaleLink />
</>
......
......@@ -38,7 +38,7 @@ import {
} from '../../state/governance/hooks'
import { VoteOption } from '../../state/governance/types'
import { useTokenBalance } from '../../state/wallet/hooks'
import { ExternalLink, StyledInternalLink, ThemedText } from '../../theme'
import { ExternalLink, StyledInternalLink, TYPE } from '../../theme'
import { isAddress } from '../../utils'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { ProposalStatus } from './styled'
......@@ -249,27 +249,27 @@ export default function VotePage({
{proposalData && <ProposalStatus status={proposalData.status} />}
</RowBetween>
<AutoColumn gap="10px" style={{ width: '100%' }}>
<ThemedText.LargeHeader style={{ marginBottom: '.5rem' }}>{proposalData?.title}</ThemedText.LargeHeader>
<TYPE.largeHeader style={{ marginBottom: '.5rem' }}>{proposalData?.title}</TYPE.largeHeader>
<RowBetween>
<ThemedText.Main>
<TYPE.main>
{startDate && startDate > now ? (
<Trans>Voting starts approximately {startDate.toLocaleString(locale, dateFormat)}</Trans>
) : null}
</ThemedText.Main>
</TYPE.main>
</RowBetween>
<RowBetween>
<ThemedText.Main>
<TYPE.main>
{endDate &&
(endDate < now ? (
<Trans>Voting ended {endDate.toLocaleString(locale, dateFormat)}</Trans>
) : (
<Trans>Voting ends approximately {endDate.toLocaleString(locale, dateFormat)}</Trans>
))}
</ThemedText.Main>
</TYPE.main>
</RowBetween>
{proposalData && proposalData.status === ProposalState.ACTIVE && !showVotingButtons && (
<GreyCard>
<ThemedText.Black>
<TYPE.black>
<Trans>
Only UNI votes that were self delegated or delegated to another address before block{' '}
{proposalData.startBlock} are eligible for voting.{' '}
......@@ -282,7 +282,7 @@ export default function VotePage({
</Trans>
</span>
)}
</ThemedText.Black>
</TYPE.black>
</GreyCard>
)}
</AutoColumn>
......@@ -317,12 +317,12 @@ export default function VotePage({
<CardSection>
<AutoColumn gap="md">
<WrapSmall>
<ThemedText.Black fontWeight={600}>
<TYPE.black fontWeight={600}>
<Trans>For</Trans>
</ThemedText.Black>
<ThemedText.Black fontWeight={600}>
</TYPE.black>
<TYPE.black fontWeight={600}>
{proposalData?.forCount?.toLocaleString(undefined, { maximumFractionDigits: 0 })}
</ThemedText.Black>
</TYPE.black>
</WrapSmall>
</AutoColumn>
<ProgressWrapper>
......@@ -334,12 +334,12 @@ export default function VotePage({
<CardSection>
<AutoColumn gap="md">
<WrapSmall>
<ThemedText.Black fontWeight={600}>
<TYPE.black fontWeight={600}>
<Trans>Against</Trans>
</ThemedText.Black>
<ThemedText.Black fontWeight={600}>
</TYPE.black>
<TYPE.black fontWeight={600}>
{proposalData?.againstCount?.toLocaleString(undefined, { maximumFractionDigits: 0 })}
</ThemedText.Black>
</TYPE.black>
</WrapSmall>
</AutoColumn>
<ProgressWrapper>
......@@ -349,9 +349,9 @@ export default function VotePage({
</StyledDataCard>
</CardWrapper>
<AutoColumn gap="md">
<ThemedText.MediumHeader fontWeight={600}>
<TYPE.mediumHeader fontWeight={600}>
<Trans>Details</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
{proposalData?.details?.map((d, i) => {
return (
<DetailText key={i}>
......@@ -370,17 +370,17 @@ export default function VotePage({
})}
</AutoColumn>
<AutoColumn gap="md">
<ThemedText.MediumHeader fontWeight={600}>
<TYPE.mediumHeader fontWeight={600}>
<Trans>Description</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<MarkDownWrapper>
<ReactMarkdown source={proposalData?.description} />
</MarkDownWrapper>
</AutoColumn>
<AutoColumn gap="md">
<ThemedText.MediumHeader fontWeight={600}>
<TYPE.mediumHeader fontWeight={600}>
<Trans>Proposer</Trans>
</ThemedText.MediumHeader>
</TYPE.mediumHeader>
<ProposerAddressLink
href={
proposalData?.proposer && chainId
......
......@@ -54,8 +54,6 @@ const StyledProposalContainer = styled.span<{ status: ProposalState }>`
width: fit-content;
justify-self: flex-end;
text-transform: uppercase;
flex: 0 0 100px;
text-align: center;
`
export function ProposalStatus({ status }: { status: ProposalState }) {
......
......@@ -16,7 +16,7 @@ describe('application reducer', () => {
beforeEach(() => {
store = createStore(reducer, {
blockNumber: {
1: 3,
[1]: 3,
},
chainId: null,
implements3085: false,
......@@ -83,8 +83,8 @@ describe('application reducer', () => {
it('works with non-set chains', () => {
store.dispatch(updateBlockNumber({ chainId: 3, blockNumber: 2 }))
expect(store.getState().blockNumber).toEqual({
1: 3,
3: 2,
[1]: 3,
[3]: 2,
})
})
})
......
......@@ -23,7 +23,7 @@ function useQueryCacheInvalidator() {
}
export default function Updater(): null {
const { account, chainId, library } = useActiveWeb3React()
const { account, chainId, library, connector } = useActiveWeb3React()
const dispatch = useAppDispatch()
const windowVisible = useIsWindowVisible()
......
......@@ -136,7 +136,7 @@ function useFormattedProposalCreatedLogs(
// Bravo and one bip proposals omit newlines
if (startBlock === BRAVO_START_BLOCK || startBlock === ONE_BIP_START_BLOCK) {
description = description.replace(/ {2}/g, '\n').replace(/\d\. /g, '\n$&')
description = description.replace(/ /g, '\n').replace(/\d\. /g, '\n$&')
}
return {
......
import { createStore, Store } from 'redux'
import { DEFAULT_LIST_OF_LISTS } from '../../constants/lists'
import { DEFAULT_ACTIVE_LIST_URLS } from '../../constants/lists'
import { updateVersion } from '../global/actions'
import { DEFAULT_ACTIVE_LIST_URLS } from './../../constants/lists'
import { acceptListUpdate, addList, enableList, fetchTokenList, removeList } from './actions'
import reducer, { ListsState } from './reducer'
......
......@@ -16,7 +16,7 @@ describe('hooks', () => {
expect(tryParsePrice(baseToken, quoteToken, '20.')).toEqual(undefined)
})
it('should return a price when decimals are the same', () => {
it('should return a price', () => {
const baseToken = new Token(1, '0x6b175474e89094c44da98b954eedeac495271d0f', 6)
const quoteToken = new Token(1, '0x1b175474e89094c44da98b954eedeac495271d0f', 6)
......@@ -36,26 +36,5 @@ describe('hooks', () => {
tryParsePrice(baseToken, quoteToken, /* ~2^-128 */ '0.000000000000000000000000000587747')?.toSignificant(6)
).toEqual('0.000000000000000000000000000587747')
})
it('should return a price when decimals are different', () => {
const baseToken = new Token(1, '0x6b175474e89094c44da98b954eedeac495271d0f', 2)
const quoteToken = new Token(1, '0x1b175474e89094c44da98b954eedeac495271d0f', 4)
expect(tryParsePrice(baseToken, quoteToken, '20')?.toSignificant(6)).toEqual('20')
expect(tryParsePrice(baseToken, quoteToken, '20.05')?.toSignificant(6)).toEqual('20.05')
expect(tryParsePrice(baseToken, quoteToken, '20.123456789')?.toSignificant(6)).toEqual('20.1235')
expect(tryParsePrice(baseToken, quoteToken, '0.123456789')?.toSignificant(6)).toEqual('0.123457')
expect(tryParsePrice(baseToken, quoteToken, '.123456789')?.toSignificant(6)).toEqual('0.123457')
expect(
tryParsePrice(
baseToken,
quoteToken,
(2 ** 128).toLocaleString('fullwide', { useGrouping: false })
)?.toSignificant(6)
).toEqual('340282000000000000000000000000000000000')
expect(
tryParsePrice(baseToken, quoteToken, /* ~2^-128 */ '0.000000000000000000000000000587747')?.toSignificant(6)
).toEqual('0.000000000000000000000000000587747')
})
})
})
......@@ -38,9 +38,9 @@ describe('multicall reducer', () => {
)
expect(store.getState()).toEqual({
callListeners: {
1: {
[1]: {
[`${DAI_ADDRESS}-0x`]: {
1: 1,
[1]: 1,
},
},
},
......@@ -92,7 +92,7 @@ describe('multicall reducer', () => {
)
expect(store.getState()).toEqual({
callResults: {},
callListeners: { 1: { [`${DAI_ADDRESS}-0x`]: {} } },
callListeners: { [1]: { [`${DAI_ADDRESS}-0x`]: {} } },
})
})
})
......@@ -110,7 +110,7 @@ describe('multicall reducer', () => {
)
expect(store.getState()).toEqual({
callResults: {
1: {
[1]: {
abc: {
blockNumber: 1,
data: '0x',
......@@ -140,7 +140,7 @@ describe('multicall reducer', () => {
)
expect(store.getState()).toEqual({
callResults: {
1: {
[1]: {
abc: {
blockNumber: 2,
data: '0x2',
......@@ -170,7 +170,7 @@ describe('multicall reducer', () => {
)
expect(store.getState()).toEqual({
callResults: {
1: {
[1]: {
abc: {
blockNumber: 2,
data: '0x2',
......@@ -191,7 +191,7 @@ describe('multicall reducer', () => {
)
expect(store.getState()).toEqual({
callResults: {
1: {
[1]: {
[`${DAI_ADDRESS}-0x0`]: { fetchingBlockNumber: 2 },
},
},
......@@ -215,7 +215,7 @@ describe('multicall reducer', () => {
)
expect(store.getState()).toEqual({
callResults: {
1: {
[1]: {
[`${DAI_ADDRESS}-0x0`]: { fetchingBlockNumber: 3 },
},
},
......@@ -239,7 +239,7 @@ describe('multicall reducer', () => {
)
expect(store.getState()).toEqual({
callResults: {
1: {
[1]: {
[`${DAI_ADDRESS}-0x0`]: { fetchingBlockNumber: 2 },
},
},
......@@ -258,7 +258,7 @@ describe('multicall reducer', () => {
)
expect(store.getState()).toEqual({
callResults: {
1: {},
[1]: {},
},
})
})
......@@ -279,7 +279,7 @@ describe('multicall reducer', () => {
)
expect(store.getState()).toEqual({
callResults: {
1: {
[1]: {
[`${DAI_ADDRESS}-0x0`]: {
blockNumber: 2,
// null data indicates error
......@@ -306,7 +306,7 @@ describe('multicall reducer', () => {
)
expect(store.getState()).toEqual({
callResults: {
1: {
[1]: {
[`${DAI_ADDRESS}-0x0`]: { fetchingBlockNumber: 3 },
},
},
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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