| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 52630aa commit ea17c7c
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,18 +39,26 @@ | |||
| 39 | 39 | "paths": [ | |
| 40 | 40 | { | |
| 41 | 41 | "name": "lodash", | |
| 42 | - "message": "Please import lodash modules directly (lodash/module)." | ||
| 42 | + "message": "Please import from 'lodash/module' directly to support tree-shaking." | ||
| 43 | + }, | ||
| 44 | + { | ||
| 45 | + "name": "ethers", | ||
| 46 | + "message": "Please import from '@ethersproject/module' directly to support tree-shaking." | ||
| 43 | 47 | }, | |
| 44 | 48 | { | |
| 45 | 49 | "name": "styled-components", | |
| 46 | 50 | "message": "Please import from styled-components/macro." | |
| 51 | + } | ||
| 52 | + ], | ||
| 53 | + "patterns": [ | ||
| 54 | + { | ||
| 55 | + "group": ["**/dist"], | ||
| 56 | + "message": "Do not import from dist/ - this is an implementation detail, and breaks tree-shaking." | ||
| 47 | 57 | }, | |
| 48 | 58 | { | |
| 49 | - "name": "ethers", | ||
| 50 | - "message": "Please import from @ethersproject." | ||
| 59 | + "group": ["!styled-components/macro"] | ||
| 51 | 60 | } | |
| 52 | - ], | ||
| 53 | - "patterns": ["!styled-components/macro"] | ||
| 61 | + ] | ||
| 54 | 62 | } | |
| 55 | 63 | ] | |
| 56 | 64 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | import { Plural, Trans } from '@lingui/macro' | |
| 2 | 2 | import { Currency, Token } from '@uniswap/sdk-core' | |
| 3 | - import { TokenList } from '@uniswap/token-lists/dist/types' | ||
| 3 | + import { TokenList } from '@uniswap/token-lists' | ||
| 4 | 4 | import { ButtonPrimary } from 'components/Button' | |
| 5 | 5 | import Card from 'components/Card' | |
| 6 | 6 | import { AutoColumn } from 'components/Column' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,13 +1,12 @@ | |||
| 1 | 1 | import { Web3Provider } from '@ethersproject/providers' | |
| 2 | 2 | import { useWeb3React } from '@web3-react/core' | |
| 3 | - import { Web3ReactContextInterface } from '@web3-react/core/dist/types' | ||
| 4 | 3 | import { useEffect, useState } from 'react' | |
| 5 | 4 | ||
| 6 | 5 | import { gnosisSafe, injected } from '../connectors' | |
| 7 | 6 | import { IS_IN_IFRAME, NetworkContextName } from '../constants/misc' | |
| 8 | 7 | import { isMobile } from '../utils/userAgent' | |
| 9 | 8 | ||
| 10 | - export function useActiveWeb3React(): Web3ReactContextInterface<Web3Provider> { | ||
| 9 | + export function useActiveWeb3React() { | ||
| 11 | 10 | const context = useWeb3React<Web3Provider>() | |
| 12 | 11 | const contextNetwork = useWeb3React<Web3Provider>(NetworkContextName) | |
| 13 | 12 | return context.active ? context : contextNetwork | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - import { BaseQueryApi, BaseQueryFn } from '@reduxjs/toolkit/dist/query/baseQueryTypes' | ||
| 1 | + import { BaseQueryFn } from '@reduxjs/toolkit/query' | ||
| 2 | 2 | import { createApi } from '@reduxjs/toolkit/query/react' | |
| 3 | 3 | import { SupportedChainId } from 'constants/chains' | |
| 4 | 4 | import { DocumentNode } from 'graphql' | |
@@ -82,7 +82,7 @@ function graphqlRequestBaseQuery(): BaseQueryFn< | |||
| 82 | 82 | Pick<ClientError, 'name' | 'message' | 'stack'>, | |
| 83 | 83 | Partial<Pick<ClientError, 'request' | 'response'>> | |
| 84 | 84 | > { | |
| 85 | - return async ({ document, variables }, { getState }: BaseQueryApi) => { | ||
| 85 | + return async ({ document, variables }, { getState }) => { | ||
| 86 | 86 | try { | |
| 87 | 87 | const chainId = (getState() as AppState).application.chainId | |
| 88 | 88 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,5 @@ | |||
| 1 | 1 | import { createReducer } from '@reduxjs/toolkit' | |
| 2 | - import { getVersionUpgrade, VersionUpgrade } from '@uniswap/token-lists' | ||
| 3 | - import { TokenList } from '@uniswap/token-lists/dist/types' | ||
| 2 | + import { getVersionUpgrade, TokenList, VersionUpgrade } from '@uniswap/token-lists' | ||
| 4 | 3 | ||
| 5 | 4 | import { DEFAULT_ACTIVE_LIST_URLS } from '../../constants/lists' | |
| 6 | 5 | import { DEFAULT_LIST_OF_LISTS } from '../../constants/lists' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,5 @@ | |||
| 1 | 1 | import { Currency, Token } from '@uniswap/sdk-core' | |
| 2 | - import { Tags, TokenInfo } from '@uniswap/token-lists' | ||
| 3 | - import { TokenList } from '@uniswap/token-lists/dist/types' | ||
| 2 | + import { Tags, TokenInfo, TokenList } from '@uniswap/token-lists' | ||
| 4 | 3 | ||
| 5 | 4 | import { isAddress } from '../../utils' | |
| 6 | 5 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ import { | |||
| 10 | 10 | TICK_SPACINGS, | |
| 11 | 11 | TickMath, | |
| 12 | 12 | tickToPrice, | |
| 13 | - } from '@uniswap/v3-sdk/dist/' | ||
| 13 | + } from '@uniswap/v3-sdk' | ||
| 14 | 14 | import { usePool } from 'hooks/usePools' | |
| 15 | 15 | import JSBI from 'jsbi' | |
| 16 | 16 | import { useCallback, useMemo } from 'react' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ import { | |||
| 6 | 6 | priceToClosestTick, | |
| 7 | 7 | TICK_SPACINGS, | |
| 8 | 8 | TickMath, | |
| 9 | - } from '@uniswap/v3-sdk/dist/' | ||
| 9 | + } from '@uniswap/v3-sdk' | ||
| 10 | 10 | import JSBI from 'jsbi' | |
| 11 | 11 | ||
| 12 | 12 | export function tryParsePrice(baseToken?: Token, quoteToken?: Token, value?: string) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ import { AddressZero } from '@ethersproject/constants' | |||
| 3 | 3 | import { Contract } from '@ethersproject/contracts' | |
| 4 | 4 | import { JsonRpcSigner, Web3Provider } from '@ethersproject/providers' | |
| 5 | 5 | import { Token } from '@uniswap/sdk-core' | |
| 6 | - import { FeeAmount } from '@uniswap/v3-sdk/dist/' | ||
| 6 | + import { FeeAmount } from '@uniswap/v3-sdk' | ||
| 7 | 7 | ||
| 8 | 8 | import { TokenAddressMap } from '../state/lists/hooks' | |
| 9 | 9 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments