Skip to content

Commit e81e8a8

Browse files
authored
fix: inadvertent merges/reverts (Uniswap#2915)
* Revert "Revert "Merge branch 'main' of https://github.com/Uniswap/interface" (Uniswap#2912)" This reverts commit 7d343dc. * Revert "deleted files" This reverts commit 097b836.
1 parent 7d343dc commit e81e8a8

File tree

160 files changed

+3864
-920
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+3864
-920
lines changed

.eslintrc.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,33 @@
88
"jsx": true
99
}
1010
},
11-
"ignorePatterns": ["node_modules/**/*"],
1211
"settings": {
1312
"react": {
1413
"version": "detect"
1514
}
1615
},
16+
"ignorePatterns": [
17+
"src/types/v3",
18+
"src/abis/types",
19+
"src/locales/**/*.js",
20+
"src/locales/**/en-US.po",
21+
"src/state/data/generated.ts",
22+
"node_modules",
23+
"coverage",
24+
"build",
25+
"dist",
26+
".DS_Store",
27+
".env.local",
28+
".env.development.local",
29+
".env.test.local",
30+
".env.production.local",
31+
".idea/",
32+
".vscode/",
33+
"package-lock.json",
34+
"yarn.lock"
35+
],
1736
"extends": [
37+
"react-app",
1838
"plugin:react/recommended",
1939
"plugin:@typescript-eslint/recommended",
2040
"plugin:react-hooks/recommended",

.github/workflows/lint.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
jobs:
1212
run-linters:
1313
name: Run linters
14-
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
1514
runs-on: ubuntu-latest
1615

1716
steps:
@@ -39,10 +38,15 @@ jobs:
3938
- name: Install dependencies
4039
run: yarn install --frozen-lockfile
4140

42-
- name: Run linters
41+
- name: Run eslint w/ autofix
42+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
4343
uses: wearerequired/lint-action@36c7e6689e80d785d27a22f71d970f3a3b4fcb70
4444
with:
4545
github_token: ${{ secrets.github_token }}
4646
eslint: true
47-
eslint_extensions: js,jsx,ts,tsx,json
47+
eslint_args: "-c .eslintrc.json"
4848
auto_fix: true
49+
50+
- name: Run eslint
51+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner }}
52+
run: yarn eslint .

cypress/support/commands.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ class CustomizedBridge extends Eip1193Bridge {
7474
}
7575

7676
// sets up the injected provider to be a mock ethereum provider with the given mnemonic/index
77+
// eslint-disable-next-line no-undef
7778
Cypress.Commands.overwrite('visit', (original, url, options) => {
7879
return original(url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url, {
7980
...options,

lingui.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
const linguiConfig = {
22
catalogs: [
33
{
44
path: '<rootDir>/src/locales/{locale}',
@@ -52,3 +52,5 @@ export default {
5252
runtimeConfigModule: ['@lingui/core', 'i18n'],
5353
sourceLocale: 'en-US',
5454
}
55+
56+
export default linguiConfig

package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,6 @@
152152
"bundle": "microbundle --tsconfig tsconfig.lib.json src/lib/index.tsx --format esm,cjs",
153153
"cosmos": "open http://localhost:5000 && cross-env FAST_REFRESH=false cosmos"
154154
},
155-
"eslintConfig": {
156-
"extends": "react-app",
157-
"ignorePatterns": [
158-
"node_modules"
159-
]
160-
},
161155
"browserslist": {
162156
"production": [
163157
">0.2%",

src/components/AccountDetails/TransactionSummary.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function ClaimSummary({ info: { recipient, uniAmountRaw } }: { info: ClaimTransa
8080
)
8181
}
8282

83-
function SubmitProposalTransactionSummary({}: { info: SubmitProposalTransactionInfo }) {
83+
function SubmitProposalTransactionSummary(_: { info: SubmitProposalTransactionInfo }) {
8484
return <Trans>Submit new proposal</Trans>
8585
}
8686

@@ -147,13 +147,13 @@ function WrapSummary({ info: { currencyAmountRaw, unwrapped } }: { info: WrapTra
147147
}
148148
}
149149

150-
function DepositLiquidityStakingSummary({}: { info: DepositLiquidityStakingTransactionInfo }) {
150+
function DepositLiquidityStakingSummary(_: { info: DepositLiquidityStakingTransactionInfo }) {
151151
// not worth rendering the tokens since you can should no longer deposit liquidity in the staking contracts
152152
// todo: deprecate and delete the code paths that allow this, show user more information
153153
return <Trans>Deposit liquidity</Trans>
154154
}
155155

156-
function WithdrawLiquidityStakingSummary({}: { info: WithdrawLiquidityStakingTransactionInfo }) {
156+
function WithdrawLiquidityStakingSummary(_: { info: WithdrawLiquidityStakingTransactionInfo }) {
157157
return <Trans>Withdraw deposited liquidity</Trans>
158158
}
159159

src/components/AccountDetails/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { injected, portis, walletlink } from '../../connectors'
1010
import { SUPPORTED_WALLETS } from '../../constants/wallet'
1111
import { useActiveWeb3React } from '../../hooks/web3'
1212
import { clearAllTransactions } from '../../state/transactions/actions'
13-
import { ExternalLink, LinkStyledButton, TYPE } from '../../theme'
13+
import { ExternalLink, LinkStyledButton, ThemedText } from '../../theme'
1414
import { shortenAddress } from '../../utils'
1515
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
1616
import { ButtonSecondary } from '../Button'
@@ -378,9 +378,9 @@ export default function AccountDetails({
378378
{!!pendingTransactions.length || !!confirmedTransactions.length ? (
379379
<LowerSection>
380380
<AutoRow mb={'1rem'} style={{ justifyContent: 'space-between' }}>
381-
<TYPE.body>
381+
<ThemedText.Body>
382382
<Trans>Recent Transactions</Trans>
383-
</TYPE.body>
383+
</ThemedText.Body>
384384
<LinkStyledButton onClick={clearAllTransactionsCallback}>
385385
<Trans>(clear all)</Trans>
386386
</LinkStyledButton>
@@ -390,9 +390,9 @@ export default function AccountDetails({
390390
</LowerSection>
391391
) : (
392392
<LowerSection>
393-
<TYPE.body color={theme.text1}>
393+
<ThemedText.Body color={theme.text1}>
394394
<Trans>Your transactions will appear here...</Trans>
395-
</TYPE.body>
395+
</ThemedText.Body>
396396
</LowerSection>
397397
)}
398398
</>

src/components/AddressInputPanel/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import { Trans } from '@lingui/macro'
12
// eslint-disable-next-line no-restricted-imports
2-
import { t, Trans } from '@lingui/macro'
3+
import { t } from '@lingui/macro'
34
import { ReactNode, useCallback, useContext } from 'react'
45
import styled, { ThemeContext } from 'styled-components/macro'
56

67
import useENS from '../../hooks/useENS'
78
import { useActiveWeb3React } from '../../hooks/web3'
8-
import { ExternalLink, TYPE } from '../../theme'
9+
import { ExternalLink, ThemedText } from '../../theme'
910
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
1011
import { AutoColumn } from '../Column'
1112
import { RowBetween } from '../Row'
@@ -107,9 +108,9 @@ export default function AddressInputPanel({
107108
<InputContainer>
108109
<AutoColumn gap="md">
109110
<RowBetween>
110-
<TYPE.black color={theme.text2} fontWeight={500} fontSize={14}>
111+
<ThemedText.Black color={theme.text2} fontWeight={500} fontSize={14}>
111112
{label ?? <Trans>Recipient</Trans>}
112-
</TYPE.black>
113+
</ThemedText.Black>
113114
{address && chainId && (
114115
<ExternalLink
115116
href={getExplorerLink(chainId, name ?? address, ExplorerDataType.ADDRESS)}

src/components/CurrencyInputPanel/FiatValue.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import HoverInlineText from 'components/HoverInlineText'
44
import { useMemo } from 'react'
55

66
import useTheme from '../../hooks/useTheme'
7-
import { TYPE } from '../../theme'
7+
import { ThemedText } from '../../theme'
88
import { warningSeverity } from '../../utils/prices'
99

1010
export function FiatValue({
@@ -25,7 +25,7 @@ export function FiatValue({
2525
}, [priceImpact, theme.green1, theme.red1, theme.text3, theme.yellow1])
2626

2727
return (
28-
<TYPE.body fontSize={14} color={fiatValue ? theme.text2 : theme.text4}>
28+
<ThemedText.Body fontSize={14} color={fiatValue ? theme.text2 : theme.text4}>
2929
{fiatValue ? (
3030
<Trans>
3131
~$ <HoverInlineText text={fiatValue?.toSignificant(6, { groupSeparator: ',' })} />
@@ -39,6 +39,6 @@ export function FiatValue({
3939
(<Trans>{priceImpact.multiply(-1).toSignificant(3)}%</Trans>)
4040
</span>
4141
) : null}
42-
</TYPE.body>
42+
</ThemedText.Body>
4343
)
4444
}

src/components/CurrencyInputPanel/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { ReactComponent as DropDown } from '../../assets/images/dropdown.svg'
1313
import useTheme from '../../hooks/useTheme'
1414
import { useActiveWeb3React } from '../../hooks/web3'
1515
import { useCurrencyBalance } from '../../state/wallet/hooks'
16-
import { TYPE } from '../../theme'
16+
import { ThemedText } from '../../theme'
1717
import { ButtonGray } from '../Button'
1818
import CurrencyLogo from '../CurrencyLogo'
1919
import DoubleCurrencyLogo from '../DoubleLogo'
@@ -212,9 +212,9 @@ export default function CurrencyInputPanel({
212212
<FixedContainer>
213213
<AutoColumn gap="sm" justify="center">
214214
<Lock />
215-
<TYPE.label fontSize="12px" textAlign="center" padding="0 12px">
215+
<ThemedText.Label fontSize="12px" textAlign="center" padding="0 12px">
216216
<Trans>The market price is outside your specified price range. Single-asset deposit only.</Trans>
217-
</TYPE.label>
217+
</ThemedText.Label>
218218
</AutoColumn>
219219
</FixedContainer>
220220
)}
@@ -271,7 +271,7 @@ export default function CurrencyInputPanel({
271271
<RowBetween>
272272
{account ? (
273273
<RowFixed style={{ height: '17px' }}>
274-
<TYPE.body
274+
<ThemedText.Body
275275
onClick={onMax}
276276
color={theme.text2}
277277
fontWeight={400}
@@ -287,7 +287,7 @@ export default function CurrencyInputPanel({
287287
</Trans>
288288
)
289289
) : null}
290-
</TYPE.body>
290+
</ThemedText.Body>
291291
{showMaxButton && selectedCurrencyBalance ? (
292292
<StyledBalanceMax onClick={onMax}>
293293
<Trans>(Max)</Trans>

0 commit comments

Comments
 (0)