diff --git a/.dependency-cruiser.js b/.dependency-cruiser.js new file mode 100644 index 000000000..d2a6094ea --- /dev/null +++ b/.dependency-cruiser.js @@ -0,0 +1,440 @@ +/** @type {import('dependency-cruiser').IConfiguration} */ +module.exports = { + forbidden: [ + /* rules from the 'recommended' preset: */ + { + name: 'no-circular', + severity: 'warn', + comment: + 'This dependency is part of a circular relationship. You might want to revise ' + + 'your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ', + from: {}, + to: { + circular: true + } + }, + { + name: 'no-orphans', + comment: + "This is an orphan module - it's likely not used (anymore?). Either use it or " + + "remove it. If it's logical this module is an orphan (i.e. it's a config file), " + + "add an exception for it in your dependency-cruiser configuration. By default " + + "this rule does not scrutinize dot-files (e.g. .eslintrc.js), TypeScript declaration " + + "files (.d.ts), tsconfig.json and some of the babel and webpack configs.", + severity: 'warn', + from: { + orphan: true, + pathNot: [ + '(^|/)\\.[^/]+\\.(js|cjs|mjs|ts|json)$', // dot files + '\\.d\\.ts$', // TypeScript declaration files + '(^|/)tsconfig\\.json$', // TypeScript config + '(^|/)(babel|webpack)\\.config\\.(js|cjs|mjs|ts|json)$' // other configs + ] + }, + to: {}, + }, + { + name: 'no-deprecated-core', + comment: + 'A module depends on a node core module that has been deprecated. Find an alternative - these are ' + + "bound to exist - node doesn't deprecate lightly.", + severity: 'warn', + from: {}, + to: { + dependencyTypes: [ + 'core' + ], + path: [ + '^(v8\/tools\/codemap)$', + '^(v8\/tools\/consarray)$', + '^(v8\/tools\/csvparser)$', + '^(v8\/tools\/logreader)$', + '^(v8\/tools\/profile_view)$', + '^(v8\/tools\/profile)$', + '^(v8\/tools\/SourceMap)$', + '^(v8\/tools\/splaytree)$', + '^(v8\/tools\/tickprocessor-driver)$', + '^(v8\/tools\/tickprocessor)$', + '^(node-inspect\/lib\/_inspect)$', + '^(node-inspect\/lib\/internal\/inspect_client)$', + '^(node-inspect\/lib\/internal\/inspect_repl)$', + '^(async_hooks)$', + '^(punycode)$', + '^(domain)$', + '^(constants)$', + '^(sys)$', + '^(_linklist)$', + '^(_stream_wrap)$' + ], + } + }, + { + name: 'not-to-deprecated', + comment: + 'This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later ' + + 'version of that module, or find an alternative. Deprecated modules are a security risk.', + severity: 'warn', + from: {}, + to: { + dependencyTypes: [ + 'deprecated' + ] + } + }, + { + name: 'no-non-package-json', + severity: 'error', + comment: + "This module depends on an npm package that isn't in the 'dependencies' section of your package.json. " + + "That's problematic as the package either (1) won't be available on live (2 - worse) will be " + + "available on live with an non-guaranteed version. Fix it by adding the package to the dependencies " + + "in your package.json.", + from: {}, + to: { + dependencyTypes: [ + 'npm-no-pkg', + 'npm-unknown' + ] + } + }, + { + name: 'not-to-unresolvable', + comment: + "This module depends on a module that cannot be found ('resolved to disk'). If it's an npm " + + 'module: add it to your package.json. In all other cases you likely already know what to do.', + severity: 'error', + from: {}, + to: { + couldNotResolve: true + } + }, + { + name: 'no-duplicate-dep-types', + comment: + "Likely this module depends on an external ('npm') package that occurs more than once " + + "in your package.json i.e. bot as a devDependencies and in dependencies. This will cause " + + "maintenance problems later on.", + severity: 'warn', + from: {}, + to: { + moreThanOneDependencyType: true, + // as it's pretty common to have a type import be a type only import + // _and_ (e.g.) a devDependency - don't consider type-only dependency + // types for this rule + dependencyTypesNot: ["type-only"] + } + }, + + /* rules you might want to tweak for your specific situation: */ + { + name: 'not-to-spec', + comment: + 'This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. ' + + "If there's something in a spec that's of use to other modules, it doesn't have that single " + + 'responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.', + severity: 'error', + from: {}, + to: { + path: '\\.(spec|test)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$' + } + }, + { + name: 'not-to-dev-dep', + severity: 'error', + comment: + "This module depends on an npm package from the 'devDependencies' section of your " + + 'package.json. It looks like something that ships to production, though. To prevent problems ' + + "with npm packages that aren't there on production declare it (only!) in the 'dependencies'" + + 'section of your package.json. If this module is development only - add it to the ' + + 'from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration', + from: { + path: '^(src)', + pathNot: '\\.(spec|test)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$' + }, + to: { + dependencyTypes: [ + 'npm-dev' + ] + } + }, + { + name: 'optional-deps-used', + severity: 'info', + comment: + "This module depends on an npm package that is declared as an optional dependency " + + "in your package.json. As this makes sense in limited situations only, it's flagged here. " + + "If you're using an optional dependency here by design - add an exception to your" + + "dependency-cruiser configuration.", + from: {}, + to: { + dependencyTypes: [ + 'npm-optional' + ] + } + }, + { + name: 'peer-deps-used', + comment: + "This module depends on an npm package that is declared as a peer dependency " + + "in your package.json. This makes sense if your package is e.g. a plugin, but in " + + "other cases - maybe not so much. If the use of a peer dependency is intentional " + + "add an exception to your dependency-cruiser configuration.", + severity: 'warn', + from: {}, + to: { + dependencyTypes: [ + 'npm-peer' + ] + } + } + ], + options: { + + /* conditions specifying which files not to follow further when encountered: + - path: a regular expression to match + - dependencyTypes: see https://github.com/sverweij/dependency-cruiser/blob/master/doc/rules-reference.md#dependencytypes-and-dependencytypesnot + for a complete list + */ + doNotFollow: { + path: "^(src/__generated__|src/abis/types/factories|src/abis/types|src/abis|src/assets|node_modules|src/locales)", + // path: 'node_modules' + }, + + /* conditions specifying which dependencies to exclude + - path: a regular expression to match + - dynamic: a boolean indicating whether to ignore dynamic (true) or static (false) dependencies. + leave out if you want to exclude neither (recommended!) + */ + exclude : { + path: "^(src/__generated__|src/types|src/abis|src/assets|node_modules|src/locales|src/utils)", + }, + + /* pattern specifying which files to include (regular expression) + dependency-cruiser will skip everything not matching this pattern + */ + // includeOnly : '', + + /* dependency-cruiser will include modules matching against the focus + regular expression in its output, as well as their neighbours (direct + dependencies and dependents) + */ + // focus : '', + + /* list of module systems to cruise */ + // moduleSystems: ['amd', 'cjs', 'es6', 'tsd'], + + /* prefix for links in html and svg output (e.g. 'https://github.com/you/yourrepo/blob/develop/' + to open it on your online repo or `vscode://file/${process.cwd()}/` to + open it in visual studio code), + */ + // prefix: '', + + /* false (the default): ignore dependencies that only exist before typescript-to-javascript compilation + true: also detect dependencies that only exist before typescript-to-javascript compilation + "specify": for each dependency identify whether it only exists before compilation or also after + */ + tsPreCompilationDeps: true, + + /* + list of extensions to scan that aren't javascript or compile-to-javascript. + Empty by default. Only put extensions in here that you want to take into + account that are _not_ parsable. + */ + // extraExtensionsToScan: [".json", ".jpg", ".png", ".svg", ".webp"], + + /* if true combines the package.jsons found from the module up to the base + folder the cruise is initiated from. Useful for how (some) mono-repos + manage dependencies & dependency definitions. + */ + // combinedDependencies: false, + + /* if true leave symlinks untouched, otherwise use the realpath */ + // preserveSymlinks: false, + + /* TypeScript project file ('tsconfig.json') to use for + (1) compilation and + (2) resolution (e.g. with the paths property) + + The (optional) fileName attribute specifies which file to take (relative to + dependency-cruiser's current working directory). When not provided + defaults to './tsconfig.json'. + */ + tsConfig: { + fileName: 'tsconfig.json' + }, + + /* Webpack configuration to use to get resolve options from. + + The (optional) fileName attribute specifies which file to take (relative + to dependency-cruiser's current working directory. When not provided defaults + to './webpack.conf.js'. + + The (optional) `env` and `args` attributes contain the parameters to be passed if + your webpack config is a function and takes them (see webpack documentation + for details) + */ + // webpackConfig: { + // fileName: './webpack.config.js', + // env: {}, + // args: {}, + // }, + + /* Babel config ('.babelrc', '.babelrc.json', '.babelrc.json5', ...) to use + for compilation (and whatever other naughty things babel plugins do to + source code). This feature is well tested and usable, but might change + behavior a bit over time (e.g. more precise results for used module + systems) without dependency-cruiser getting a major version bump. + */ + // babelConfig: { + // fileName: '.babel-plugin-macrosrc.json' + // }, + + /* List of strings you have in use in addition to cjs/ es6 requires + & imports to declare module dependencies. Use this e.g. if you've + re-declared require, use a require-wrapper or use window.require as + a hack. + */ + // exoticRequireStrings: [], + /* options to pass on to enhanced-resolve, the package dependency-cruiser + uses to resolve module references to disk. You can set most of these + options in a webpack.conf.js - this section is here for those + projects that don't have a separate webpack config file. + + Note: settings in webpack.conf.js override the ones specified here. + */ + enhancedResolveOptions: { + /* List of strings to consider as 'exports' fields in package.json. Use + ['exports'] when you use packages that use such a field and your environment + supports it (e.g. node ^12.19 || >=14.7 or recent versions of webpack). + + If you have an `exportsFields` attribute in your webpack config, that one + will have precedence over the one specified here. + */ + exportsFields: ["exports"], + /* List of conditions to check for in the exports field. e.g. use ['imports'] + if you're only interested in exposed es6 modules, ['require'] for commonjs, + or all conditions at once `(['import', 'require', 'node', 'default']`) + if anything goes for you. Only works when the 'exportsFields' array is + non-empty. + + If you have a 'conditionNames' attribute in your webpack config, that one will + have precedence over the one specified here. + */ + conditionNames: ["import", "require", "node", "default"], + /* + The extensions, by default are the same as the ones dependency-cruiser + can access (run `npx depcruise --info` to see which ones that are in + _your_ environment. If that list is larger than what you need (e.g. + it contains .js, .jsx, .ts, .tsx, .cts, .mts - but you don't use + TypeScript you can pass just the extensions you actually use (e.g. + [".js", ".jsx"]). This can speed up the most expensive step in + dependency cruising (module resolution) quite a bit. + */ + // extensions: [".js", ".jsx", ".ts", ".tsx", ".d.ts"] + }, + reporterOptions: { + dot: { + /* pattern of modules that can be consolidated in the detailed + graphical dependency graph. The default pattern in this configuration + collapses everything in node_modules to one folder deep so you see + the external modules, but not the innards your app depends upon. + */ + collapsePattern: 'node_modules/[^/]+', + + /* Options to tweak the appearance of your graph.See + https://github.com/sverweij/dependency-cruiser/blob/master/doc/options-reference.md#reporteroptions + for details and some examples. If you don't specify a theme + don't worry - dependency-cruiser will fall back to the default one. + */ + // theme: { + // graph: { + // /* use splines: "ortho" for straight lines. Be aware though + // graphviz might take a long time calculating ortho(gonal) + // routings. + // */ + // splines: "true" + // }, + // modules: [ + // { + // criteria: { matchesFocus: true }, + // attributes: { + // fillcolor: "lime", + // penwidth: 2, + // }, + // }, + // { + // criteria: { matchesFocus: false }, + // attributes: { + // fillcolor: "lightgrey", + // }, + // }, + // { + // criteria: { matchesReaches: true }, + // attributes: { + // fillcolor: "lime", + // penwidth: 2, + // }, + // }, + // { + // criteria: { matchesReaches: false }, + // attributes: { + // fillcolor: "lightgrey", + // }, + // }, + // { + // criteria: { source: "^src/model" }, + // attributes: { fillcolor: "#ccccff" } + // }, + // { + // criteria: { source: "^src/view" }, + // attributes: { fillcolor: "#ccffcc" } + // }, + // ], + // dependencies: [ + // { + // criteria: { "rules[0].severity": "error" }, + // attributes: { fontcolor: "red", color: "red" } + // }, + // { + // criteria: { "rules[0].severity": "warn" }, + // attributes: { fontcolor: "orange", color: "orange" } + // }, + // { + // criteria: { "rules[0].severity": "info" }, + // attributes: { fontcolor: "blue", color: "blue" } + // }, + // { + // criteria: { resolved: "^src/model" }, + // attributes: { color: "#0000ff77" } + // }, + // { + // criteria: { resolved: "^src/view" }, + // attributes: { color: "#00770077" } + // } + // ] + // } + }, + archi: { + /* pattern of modules that can be consolidated in the high level + graphical dependency graph. If you use the high level graphical + dependency graph reporter (`archi`) you probably want to tweak + this collapsePattern to your situation. + */ + collapsePattern: '^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/[^/]+', + + /* Options to tweak the appearance of your graph.See + https://github.com/sverweij/dependency-cruiser/blob/master/doc/options-reference.md#reporteroptions + for details and some examples. If you don't specify a theme + for 'archi' dependency-cruiser will use the one specified in the + dot section (see above), if any, and otherwise use the default one. + */ + // theme: { + // }, + }, + "text": { + "highlightFocused": true + }, + } + } +}; +// generated: dependency-cruiser@12.7.0 on 2023-02-03T13:10:16.703Z diff --git a/.eslintrc.json b/.eslintrc.json index da9f08521..16ce7df29 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -58,10 +58,6 @@ { "group": ["**/dist"], "message": "Do not import from dist/ - this is an implementation detail, and breaks tree-shaking." - }, - { - "group": ["*clientSideSmartOrderRouter"], - "message": "Forbidden import; smart-order-router is lazy-loaded." } ] } diff --git a/.github/workflows/test.yaml b/.github/disabled-workflows/test.yaml similarity index 100% rename from .github/workflows/test.yaml rename to .github/disabled-workflows/test.yaml diff --git a/.github/workflows/conventional-commit.yaml b/.github/workflows/conventional-commit.yaml deleted file mode 100644 index 972358f04..000000000 --- a/.github/workflows/conventional-commit.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: Conventional commit - -on: - pull_request_target: - types: - - opened - - edited - - synchronize - -jobs: - check-pr-title: - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@v3.4.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c0e74f2d0..9ddf3c6d0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,27 +15,6 @@ jobs: - uses: ./.github/actions/setup - run: yarn prepare - - run: yarn i18n:extract - - uses: crowdin/github-action@1.4.8 - with: - upload_sources: true - download_translations: true - create_pull_request: false - push_translations: false - localization_branch_name: main - source: 'src/locales/en-US.po' - translation: 'src/locales/%locale%.po' - crowdin_branch_name: widgets - token: ${{ secrets.CROWDIN_TOKEN }} - project_id: 458284 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - run: yarn test - if: success() - env: - JSON_RPC_PROVIDER: ${{ secrets.JSON_RPC_PROVIDER }} - - run: yarn release if: success() env: diff --git a/.gitignore b/.gitignore index 24c6834a9..5471ed954 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,6 @@ notes.txt # generated ajv schema /src/__generated__/* -!/src/__generated__/.gitkeep \ No newline at end of file +!/src/__generated__/.gitkeep + +docs diff --git a/.releaserc.json b/.releaserc.json index 912ce2584..a2987da70 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -3,13 +3,15 @@ "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", + "@semantic-release/github", + "@semantic-release/npm", [ "@semantic-release/git", { + "assets": ["package.json"], "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" } - ], - "@semantic-release/github", - "@semantic-release/npm" + ] ] } + diff --git a/README.md b/README.md index bd365ea47..142070ae4 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,71 @@ -# Uniswap Labs Widgets +# 🕹 Wido Widget -[![npm](https://img.shields.io/npm/v/@uniswap/widgets)](https://www.npmjs.com/package/@uniswap/widgets) -[![Unit tests](https://github.com/Uniswap/interface/actions/workflows/test.yaml/badge.svg)](https://github.com/Uniswap/interface/actions/workflows/test.yaml) -[![Integration tests](https://github.com/Uniswap/interface/actions/workflows/e2e.yaml/badge.svg)](https://github.com/Uniswap/interface/actions/workflows/e2e.yaml) -[![Lint](https://github.com/Uniswap/interface/actions/workflows/lint.yml/badge.svg)](https://github.com/Uniswap/interface/actions/workflows/lint.yml) -[![Crowdin](https://badges.crowdin.net/uniswap-interface/localized.svg)](https://crowdin.com/project/uniswap-interface) +[![npm](https://img.shields.io/npm/v/wido-widget)](https://www.npmjs.com/package/wido-widget) + + + + -The `@uniswap/widgets` package is an [npm package](https://www.npmjs.com/package/@uniswap/widgets) of React components used to provide subsets of the Uniswap Protocol functionality in a small and configurable user interface element. +Wido Widget combines ease of use with great UX. Protocols integrate Wido Widget to accept deposits in any token, from any chain, in a single transaction. -# Uniswap Labs Swap Widget +Example use cases supported by Wido Widget: -The Swap Widget bundles the whole swapping experience into a single React component that developers can easily embed in their app with one line of code. +* Single token deposits into LP pools, with any token, from any chain (Zaps) +* Deposit any token into any farm or vault (works cross-chain) +* Deposit any token from Ethereum into Starknet, including pools, farms or vaults on Starknet (bridge + deposit) +* Deposit any token from Ethereum into ZK Sync, including pools, farms or vaults on Starknet (bridge + deposit) -![swap widget screenshot](https://raw.githubusercontent.com/Uniswap/interface/main/src/assets/images/widget-screenshot.png) +
widget screenshot

Wido Widget: Deposit ETH from Ethereum into a JediSwap LP pool on Starknet. All in a single transaction.

-You can customize the theme (colors, fonts, border radius, and more) to match the style of your application. You can also configure your own default token list and optionally set a convenience fee on swaps executed through the widget on your site. +## Getting started -## Installation +Integrating Wido Widget only takes few lines of code. -Install the widgets library via `npm` or `yarn`. +First install the `wido-widget` [npm package](https://www.npmjs.com/package/wido-widget) which contains React components used to integrate Wido's zap functionality in a small and configurable user interface element. +You can customize the theme (colors, fonts, border radius, and more) to match the style of your application. + +Install the widget via `npm` or `yarn`. ```js -yarn add @uniswap/widgets +yarn add wido-widget react-redux ``` + ```js -npm i --save @uniswap/widgets +npm i --save wido-widget react-redux ``` -## Documentation - -- [overview](https://docs.uniswap.org/sdk/widgets/swap-widget) -- [api reference](https://docs.uniswap.org/sdk/widgets/swap-widget/api) - -## Example Apps - -Uniswap Labs maintains two demo apps in branches of the [widgets-demo](https://github.com/Uniswap/widgets-demo) repo: - -- [NextJS](https://github.com/Uniswap/widgets-demo/tree/nextjs) -- [Create React App](https://github.com/Uniswap/widgets-demo/tree/cra) - -Others have also also released the widget in production to their userbase: +After installing, embed the React component in your application. + +```jsx +import React from "react"; +import ReactDOM from "react-dom"; +import { SwapWidget } from 'wido-widget' + +function App() { + return ( + + ) +} + +ReactDOM.render( + , + document.getElementById("my-app") +) +``` -- [OpenSea](https://opensea.io/) -- [Friends With Benefits](https://www.fwb.help/) -- [Oasis](https://oasis.app/) +You are expected to handle the `onConnectWalletClick` callback by integrating with `@web3-react/core`, `@web3-onboard/core` or any other way of managing the wallet connection and then pass a `Web3Provider` instance that comes from the `ethers.js`. +When integrating the Starknet network, you are also expected to pass in the `Account` instance that you created with `starknet.js`. -## Legal notice +## Documentation -Uniswap Labs encourages integrators to evaluate their own regulatory obligations when integrating this widget into their products, including, but not limited to, those related to economic or trade sanctions compliance. +* [Guide](https://docs.joinwido.com/integrate-wido/widget) +* [API Reference](https://unpkg.com/wido-widget@latest/docs/index.html) diff --git a/dependency-graph.svg b/dependency-graph.svg new file mode 100644 index 000000000..75892df86 --- /dev/null +++ b/dependency-graph.svg @@ -0,0 +1,6392 @@ + + + + + + +dependency-cruiser output + + +cluster_src + +src + + +cluster_src/components + +components + + +cluster_src/components/ConnectWallet + +ConnectWallet + + +cluster_src/components/Error + +Error + + +cluster_src/components/Swap + +Swap + + +cluster_src/components/Swap/RoutingDiagram + +RoutingDiagram + + +cluster_src/components/Swap/Settings + +Settings + + +cluster_src/components/Swap/Speedbump + +Speedbump + + +cluster_src/components/Swap/Status + +Status + + +cluster_src/components/Swap/Summary + +Summary + + +cluster_src/components/Swap/SwapActionButton + +SwapActionButton + + +cluster_src/components/Swap/Toolbar + +Toolbar + + +cluster_src/components/TokenSelect + +TokenSelect + + +cluster_src/constants + +constants + + +cluster_src/cosmos + +cosmos + + +cluster_src/css + +css + + +cluster_src/hooks + +hooks + + +cluster_src/hooks/routing + +routing + + +cluster_src/hooks/swap + +swap + + +cluster_src/hooks/transactions + +transactions + + +cluster_src/hooks/useTokenList + +useTokenList + + +cluster_src/hooks/web3 + +web3 + + +cluster_src/icons + +icons + + +cluster_src/state + +state + + +cluster_src/state/lists + +lists + + +cluster_src/state/routing + +routing + + +cluster_src/state/swap + +swap + + +cluster_src/test + +test + + +cluster_src/theme + +theme + + + +src/components/ActionButton.tsx + + +ActionButton.tsx + + + + + +src/components/Button.tsx + + +Button.tsx + + + + + +src/components/ActionButton.tsx->src/components/Button.tsx + + + + + +src/components/Row.tsx + + +Row.tsx + + + + + +src/components/ActionButton.tsx->src/components/Row.tsx + + + + + +src/components/Tooltip.tsx + + +Tooltip.tsx + + + + + +src/components/ActionButton.tsx->src/components/Tooltip.tsx + + + + + +src/icons/index.tsx + + +index.tsx + + + + + +src/components/ActionButton.tsx->src/icons/index.tsx + + + + + +src/theme/index.tsx + + +index.tsx + + + + + +src/components/ActionButton.tsx->src/theme/index.tsx + + + + + +src/components/Button.tsx->src/icons/index.tsx + + + + + +src/components/Button.tsx->src/theme/index.tsx + + + + + +src/components/Row.tsx->src/theme/index.tsx + + + + + +src/components/Tooltip.tsx->src/components/Button.tsx + + + + + +src/components/Tooltip.tsx->src/icons/index.tsx + + + + + +src/components/Popover.tsx + + +Popover.tsx + + + + + +src/components/Tooltip.tsx->src/components/Popover.tsx + + + + + +src/hooks/useHasFocus.ts + + +useHasFocus.ts + + + + + +src/components/Tooltip.tsx->src/hooks/useHasFocus.ts + + + + + +src/hooks/useHasHover.ts + + +useHasHover.ts + + + + + +src/components/Tooltip.tsx->src/hooks/useHasHover.ts + + + + + +src/icons/index.tsx->src/theme/index.tsx + + + + + +src/icons/identicon.tsx + + +identicon.tsx + + + + + +src/icons/index.tsx->src/icons/identicon.tsx + + + + + +src/css/loading.ts + + +loading.ts + + + + + +src/icons/index.tsx->src/css/loading.ts + + + + + +src/theme/type.tsx + + +type.tsx + + + + + +src/theme/index.tsx->src/theme/type.tsx + + + + + +src/theme/animations.ts + + +animations.ts + + + + + +src/theme/index.tsx->src/theme/animations.ts + + + + + +src/theme/dynamic.tsx + + +dynamic.tsx + + + + + +src/theme/index.tsx->src/theme/dynamic.tsx + + + + + +src/theme/theme.ts + + +theme.ts + + + + + +src/theme/index.tsx->src/theme/theme.ts + + + + + +src/theme/external.ts + + +external.ts + + + + + +src/theme/index.tsx->src/theme/external.ts + + + + + +src/theme/layer.ts + + +layer.ts + + + + + +src/theme/index.tsx->src/theme/layer.ts + + + + + +src/components/BottomSheetModal.tsx + + +BottomSheetModal.tsx + + + + + +src/components/BottomSheetModal.tsx->src/theme/index.tsx + + + + + +src/components/Dialog.tsx + + +Dialog.tsx + + + + + +src/components/BottomSheetModal.tsx->src/components/Dialog.tsx + + + + + +src/components/Dialog.tsx->src/components/Row.tsx + + + + + +src/components/Dialog.tsx->src/icons/index.tsx + + + + + +src/components/Dialog.tsx->src/theme/index.tsx + + + + + +src/components/Dialog.tsx->src/components/Popover.tsx + + + + + +src/css/font.ts + + +font.ts + + + + + +src/components/Dialog.tsx->src/css/font.ts + + + + + +src/hooks/useOnEscapeHandler.tsx + + +useOnEscapeHandler.tsx + + + + + +src/components/Dialog.tsx->src/hooks/useOnEscapeHandler.tsx + + + + + +src/components/BrandedFooter.tsx + + +BrandedFooter.tsx + + + + + +src/components/BrandedFooter.tsx->src/components/Row.tsx + + + + + +src/components/BrandedFooter.tsx->src/icons/index.tsx + + + + + +src/components/BrandedFooter.tsx->src/theme/index.tsx + + + + + +src/components/ExternalLink.tsx + + +ExternalLink.tsx + + + + + +src/components/BrandedFooter.tsx->src/components/ExternalLink.tsx + + + + + +src/components/Column.tsx + + +Column.tsx + + + + + +src/components/Column.tsx->src/theme/index.tsx + + + + + +src/components/ConnectWallet/ConnectWalletDialog.tsx + + +ConnectWalletDialog.tsx + + + + + +src/components/ConnectWallet/ConnectWalletDialog.tsx->src/components/Button.tsx + + + + + +src/components/ConnectWallet/ConnectWalletDialog.tsx->src/components/Row.tsx + + + + + +src/components/ConnectWallet/ConnectWalletDialog.tsx->src/theme/index.tsx + + + + + +src/components/ConnectWallet/ConnectWalletDialog.tsx->src/components/Dialog.tsx + + + + + +src/components/ConnectWallet/ConnectWalletDialog.tsx->src/components/Column.tsx + + + + + +src/hooks/web3/useConnectors.tsx + + +useConnectors.tsx + + + + + +src/components/ConnectWallet/ConnectWalletDialog.tsx->src/hooks/web3/useConnectors.tsx + + + + + +src/components/ConnectWallet/ConnectedWalletChip.tsx + + +ConnectedWalletChip.tsx + + + + + +src/components/ConnectWallet/ConnectedWalletChip.tsx->src/components/Button.tsx + + + + + +src/components/ConnectWallet/ConnectedWalletChip.tsx->src/components/Row.tsx + + + + + +src/components/ConnectWallet/ConnectedWalletChip.tsx->src/icons/index.tsx + + + + + +src/components/ConnectWallet/ConnectedWalletChip.tsx->src/theme/index.tsx + + + + + +src/components/ConnectWallet/ConnectedWalletChip.tsx->src/icons/identicon.tsx + + + + + +src/components/ConnectWallet/index.tsx + + +index.tsx + + + + + +src/components/ConnectWallet/index.tsx->src/components/ConnectWallet/ConnectedWalletChip.tsx + + + + + +src/components/Popover.tsx->src/theme/index.tsx + + + + + +src/components/Error/ErrorBoundary.tsx + + +ErrorBoundary.tsx + + + + + +src/components/Error/ErrorBoundary.tsx->src/components/Dialog.tsx + + + + + +src/components/Error/ErrorDialog.tsx + + +ErrorDialog.tsx + + + + + +src/components/Error/ErrorBoundary.tsx->src/components/Error/ErrorDialog.tsx + + + + + +src/errors.ts + + +errors.ts + + + + + +src/components/Error/ErrorBoundary.tsx->src/errors.ts + + + + + +src/components/Error/ErrorDialog.tsx->src/components/ActionButton.tsx + + + + + +src/components/Error/ErrorDialog.tsx->src/icons/index.tsx + + + + + +src/components/Error/ErrorDialog.tsx->src/theme/index.tsx + + + + + +src/components/Error/ErrorDialog.tsx->src/components/Column.tsx + + + + + +src/components/Expando.tsx + + +Expando.tsx + + + + + +src/components/Error/ErrorDialog.tsx->src/components/Expando.tsx + + + + + +src/components/Expando.tsx->src/components/Button.tsx + + + + + +src/components/Expando.tsx->src/components/Row.tsx + + + + + +src/components/Expando.tsx->src/icons/index.tsx + + + + + +src/components/Expando.tsx->src/theme/index.tsx + + + + + +src/components/Expando.tsx->src/components/Column.tsx + + + + + +src/components/Rule.tsx + + +Rule.tsx + + + + + +src/components/Expando.tsx->src/components/Rule.tsx + + + + + +src/hooks/useScrollbar.ts + + +useScrollbar.ts + + + + + +src/components/Expando.tsx->src/hooks/useScrollbar.ts + + + + + +src/components/EtherscanLink.tsx + + +EtherscanLink.tsx + + + + + +src/components/EtherscanLink.tsx->src/components/Row.tsx + + + + + +src/components/EtherscanLink.tsx->src/icons/index.tsx + + + + + +src/components/EtherscanLink.tsx->src/theme/index.tsx + + + + + +src/components/EtherscanLink.tsx->src/components/ExternalLink.tsx + + + + + +src/constants/chains.ts + + +chains.ts + + + + + +src/components/EtherscanLink.tsx->src/constants/chains.ts + + + + + +src/components/Header.tsx + + +Header.tsx + + + + + +src/components/Header.tsx->src/components/Row.tsx + + + + + +src/components/Header.tsx->src/icons/index.tsx + + + + + +src/components/Header.tsx->src/theme/index.tsx + + + + + +src/components/Input.tsx + + +Input.tsx + + + + + +src/components/Input.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Input.tsx + + +Input.tsx + + + + + +src/components/Swap/Input.tsx->src/components/Button.tsx + + + + + +src/components/Swap/Input.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Input.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Input.tsx->src/components/Column.tsx + + + + + +src/components/Swap/TokenInput.tsx + + +TokenInput.tsx + + + + + +src/components/Swap/Input.tsx->src/components/Swap/TokenInput.tsx + + + + + + + +no-circular + + + +src/components/Swap/Input.tsx->src/css/loading.ts + + + + + +src/hooks/swap/index.ts + + +index.ts + + + + + +src/components/Swap/Input.tsx->src/hooks/swap/index.ts + + + + + +src/hooks/swap/useSwapApproval.ts + + +useSwapApproval.ts + + + + + +src/components/Swap/Input.tsx->src/hooks/swap/useSwapApproval.ts + + + + + +src/hooks/swap/useWrapCallback.tsx + + +useWrapCallback.tsx + + + + + +src/components/Swap/Input.tsx->src/hooks/swap/useWrapCallback.tsx + + + + + +src/hooks/useCurrencyColor.ts + + +useCurrencyColor.ts + + + + + +src/components/Swap/Input.tsx->src/hooks/useCurrencyColor.ts + + + + + +src/hooks/usePriceImpact.ts + + +usePriceImpact.ts + + + + + +src/components/Swap/Input.tsx->src/hooks/usePriceImpact.ts + + + + + +src/hooks/useWidgetWidth.tsx + + +useWidgetWidth.tsx + + + + + +src/components/Swap/Input.tsx->src/hooks/useWidgetWidth.tsx + + + + + +src/state/routing/types.ts + + +types.ts + + + + + +src/components/Swap/Input.tsx->src/state/routing/types.ts + + + + + +src/state/swap/index.ts + + +index.ts + + + + + +src/components/Swap/Input.tsx->src/state/swap/index.ts + + + + + +src/components/Swap/TokenInput.tsx->src/components/Row.tsx + + + + + +src/components/Swap/TokenInput.tsx->src/theme/index.tsx + + + + + +src/components/Swap/TokenInput.tsx->src/components/Column.tsx + + + + + +src/components/Swap/TokenInput.tsx->src/components/Input.tsx + + + + + +src/components/Swap/TokenInput.tsx->src/css/loading.ts + + + + + +src/components/Swap/TokenInput.tsx->src/state/swap/index.ts + + + + + +src/components/TokenSelect/index.tsx + + +index.tsx + + + + + +src/components/Swap/TokenInput.tsx->src/components/TokenSelect/index.tsx + + + + + + + +no-circular + + + +src/css/loading.ts->src/theme/index.tsx + + + + + +src/hooks/swap/index.ts->src/state/swap/index.ts + + + + + +src/hooks/swap/useSwapInfo.tsx + + +useSwapInfo.tsx + + + + + +src/hooks/swap/index.ts->src/hooks/swap/useSwapInfo.tsx + + + + + +src/state/atoms.ts + + +atoms.ts + + + + + +src/hooks/swap/index.ts->src/state/atoms.ts + + + + + +src/hooks/swap/useSwapApproval.ts->src/state/swap/index.ts + + + + + +src/hooks/useTransactionDeadline.ts + + +useTransactionDeadline.ts + + + + + +src/hooks/swap/useSwapApproval.ts->src/hooks/useTransactionDeadline.ts + + + + + +src/hooks/transactions/index.tsx + + +index.tsx + + + + + +src/hooks/swap/useSwapApproval.ts->src/hooks/transactions/index.tsx + + + + + +src/constants/addresses.ts + + +addresses.ts + + + + + +src/hooks/swap/useSwapApproval.ts->src/constants/addresses.ts + + + + + +src/constants/eip1193.ts + + +eip1193.ts + + + + + +src/hooks/swap/useSwapApproval.ts->src/constants/eip1193.ts + + + + + +src/hooks/useApproval.ts + + +useApproval.ts + + + + + +src/hooks/swap/useSwapApproval.ts->src/hooks/useApproval.ts + + + + + +src/hooks/usePermit.ts + + +usePermit.ts + + + + + +src/hooks/swap/useSwapApproval.ts->src/hooks/usePermit.ts + + + + + +src/hooks/swap/useWrapCallback.tsx->src/state/swap/index.ts + + + + + +src/state/transactions.ts + + +transactions.ts + + + + + +src/hooks/swap/useWrapCallback.tsx->src/state/transactions.ts + + + + + +src/constants/tokens.ts + + +tokens.ts + + + + + +src/hooks/swap/useWrapCallback.tsx->src/constants/tokens.ts + + + + + +src/hooks/useContract.ts + + +useContract.ts + + + + + +src/hooks/swap/useWrapCallback.tsx->src/hooks/useContract.ts + + + + + +src/hooks/useCurrencyLogoURIs.ts + + +useCurrencyLogoURIs.ts + + + + + +src/hooks/useCurrencyColor.ts->src/hooks/useCurrencyLogoURIs.ts + + + + + +src/hooks/usePriceImpact.ts->src/state/routing/types.ts + + + + + +src/theme/breakpoints.ts + + +breakpoints.ts + + + + + +src/hooks/useWidgetWidth.tsx->src/theme/breakpoints.ts + + + + + +src/hooks/routing/types.ts + + +types.ts + + + + + +src/state/routing/types.ts->src/hooks/routing/types.ts + + + + + +src/state/swap/index.ts->src/constants/chains.ts + + + + + +src/state/swap/index.ts->src/state/routing/types.ts + + + + + +src/state/swap/settings.ts + + +settings.ts + + + + + +src/state/swap/index.ts->src/state/swap/settings.ts + + + + + +src/state/swap/index.ts->src/constants/tokens.ts + + + + + +src/state/swap/index.ts->src/hooks/routing/types.ts + + + + + +src/components/Swap/Output.tsx + + +Output.tsx + + + + + +src/components/Swap/Output.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Output.tsx->src/components/Swap/Input.tsx + + + + + + + +no-circular + + + +src/components/Swap/Output.tsx->src/hooks/swap/index.ts + + + + + +src/components/Swap/Output.tsx->src/hooks/useCurrencyColor.ts + + + + + +src/components/Swap/Output.tsx->src/hooks/useWidgetWidth.tsx + + + + + +src/components/Swap/Output.tsx->src/state/swap/index.ts + + + + + +src/components/Swap/Price.tsx + + +Price.tsx + + + + + +src/components/Swap/Price.tsx->src/components/Button.tsx + + + + + +src/components/Swap/Price.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Price.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Price.tsx->src/state/routing/types.ts + + + + + +src/components/Swap/ReverseButton.tsx + + +ReverseButton.tsx + + + + + +src/components/Swap/ReverseButton.tsx->src/components/Button.tsx + + + + + +src/components/Swap/ReverseButton.tsx->src/icons/index.tsx + + + + + +src/components/Swap/ReverseButton.tsx->src/theme/index.tsx + + + + + +src/components/Swap/ReverseButton.tsx->src/hooks/swap/index.ts + + + + + +src/components/Swap/RoutingDiagram/index.tsx + + +index.tsx + + + + + +src/components/Swap/RoutingDiagram/index.tsx->src/components/Row.tsx + + + + + +src/components/Swap/RoutingDiagram/index.tsx->src/icons/index.tsx + + + + + +src/components/Swap/RoutingDiagram/index.tsx->src/theme/index.tsx + + + + + +src/components/Swap/RoutingDiagram/index.tsx->src/components/Column.tsx + + + + + +src/components/Swap/RoutingDiagram/index.tsx->src/components/Rule.tsx + + + + + +src/components/Swap/RoutingDiagram/index.tsx->src/state/routing/types.ts + + + + + +src/components/Swap/RoutingDiagram/utils.ts + + +utils.ts + + + + + +src/components/Swap/RoutingDiagram/index.tsx->src/components/Swap/RoutingDiagram/utils.ts + + + + + +src/components/TokenImg.tsx + + +TokenImg.tsx + + + + + +src/components/Swap/RoutingDiagram/index.tsx->src/components/TokenImg.tsx + + + + + + + +no-circular + + + +src/components/Swap/RoutingDiagram/utils.ts->src/state/routing/types.ts + + + + + +src/hooks/useCurrency.ts + + +useCurrency.ts + + + + + +src/components/TokenImg.tsx->src/hooks/useCurrency.ts + + + + + + + +no-circular + + + +src/components/TokenImg.tsx->src/hooks/useCurrencyLogoURIs.ts + + + + + +src/components/Swap/Settings/MaxSlippageSelect.test.tsx + + +MaxSlippageSelect.test.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx + + +MaxSlippageSelect.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.test.tsx->src/components/Swap/Settings/MaxSlippageSelect.tsx + + + + + +src/hooks/useSlippage.ts + + +useSlippage.ts + + + + + +src/components/Swap/Settings/MaxSlippageSelect.test.tsx->src/hooks/useSlippage.ts + + + + + +src/test/index.tsx + + +index.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.test.tsx->src/test/index.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/components/Button.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/components/Tooltip.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/icons/index.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/components/Popover.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/components/Expando.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/components/Input.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/state/swap/index.ts + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/hooks/useSlippage.ts + + + + + +src/components/Swap/Settings/components.tsx + + +components.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/components/Swap/Settings/components.tsx + + + + + +src/components/Swap/Settings/MaxSlippageSelect.tsx->src/state/swap/settings.ts + + + + + +src/hooks/useSlippage.ts->src/state/swap/settings.ts + + + + + +src/test/index.tsx->src/theme/index.tsx + + + + + +src/test/index.tsx->src/components/Dialog.tsx + + + + + +src/test/index.tsx->src/components/Error/ErrorBoundary.tsx + + + + + +src/hooks/useTokenList/index.tsx + + +index.tsx + + + + + +src/test/index.tsx->src/hooks/useTokenList/index.tsx + + + + + +src/components/Widget.tsx + + +Widget.tsx + + + + + +src/test/index.tsx->src/components/Widget.tsx + + + + + +src/constants/locales.ts + + +locales.ts + + + + + +src/test/index.tsx->src/constants/locales.ts + + + + + +src/hooks/useBlockNumber.tsx + + +useBlockNumber.tsx + + + + + +src/test/index.tsx->src/hooks/useBlockNumber.tsx + + + + + +src/hooks/web3/index.tsx + + +index.tsx + + + + + +src/test/index.tsx->src/hooks/web3/index.tsx + + + + + +src/i18n.tsx + + +i18n.tsx + + + + + +src/test/index.tsx->src/i18n.tsx + + + + + +src/state/index.tsx + + +index.tsx + + + + + +src/test/index.tsx->src/state/index.tsx + + + + + +src/components/Swap/Settings/components.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Settings/components.tsx->src/components/Tooltip.tsx + + + + + +src/components/Swap/Settings/components.tsx->src/theme/index.tsx + + + + + +src/state/swap/settings.ts->src/state/atoms.ts + + + + + +src/components/Swap/Settings/TransactionTtlInput.tsx + + +TransactionTtlInput.tsx + + + + + +src/components/Swap/Settings/TransactionTtlInput.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Settings/TransactionTtlInput.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Settings/TransactionTtlInput.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Settings/TransactionTtlInput.tsx->src/components/Expando.tsx + + + + + +src/components/Swap/Settings/TransactionTtlInput.tsx->src/components/Input.tsx + + + + + +src/components/Swap/Settings/TransactionTtlInput.tsx->src/components/Swap/Settings/components.tsx + + + + + +src/components/Swap/Settings/TransactionTtlInput.tsx->src/hooks/useTransactionDeadline.ts + + + + + +src/hooks/useTransactionDeadline.ts->src/constants/chains.ts + + + + + +src/hooks/useTransactionDeadline.ts->src/state/swap/index.ts + + + + + +src/hooks/useTransactionDeadline.ts->src/state/swap/settings.ts + + + + + +src/constants/misc.ts + + +misc.ts + + + + + +src/hooks/useTransactionDeadline.ts->src/constants/misc.ts + + + + + +src/hooks/useCurrentBlockTimestamp.ts + + +useCurrentBlockTimestamp.ts + + + + + +src/hooks/useTransactionDeadline.ts->src/hooks/useCurrentBlockTimestamp.ts + + + + + +src/components/Swap/Settings/index.tsx + + +index.tsx + + + + + +src/components/Swap/Settings/index.tsx->src/components/Button.tsx + + + + + +src/components/Swap/Settings/index.tsx->src/icons/index.tsx + + + + + +src/components/Swap/Settings/index.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Settings/index.tsx->src/components/BottomSheetModal.tsx + + + + + +src/components/Swap/Settings/index.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Settings/index.tsx->src/components/Popover.tsx + + + + + +src/components/Swap/Settings/index.tsx->src/hooks/useOnEscapeHandler.tsx + + + + + +src/components/Swap/Settings/index.tsx->src/components/Swap/Settings/MaxSlippageSelect.tsx + + + + + +src/hooks/useIsMobileWidth.ts + + +useIsMobileWidth.ts + + + + + +src/components/Swap/Settings/index.tsx->src/hooks/useIsMobileWidth.ts + + + + + +src/components/Swap/Skeleton.tsx + + +Skeleton.tsx + + + + + +src/components/Swap/Skeleton.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Skeleton.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Skeleton.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Skeleton.tsx->src/components/Swap/ReverseButton.tsx + + + + + +src/components/WidgetWrapper.tsx + + +WidgetWrapper.tsx + + + + + +src/components/Swap/Skeleton.tsx->src/components/WidgetWrapper.tsx + + + + + +src/components/WidgetWrapper.tsx->src/css/font.ts + + + + + +src/components/WidgetWrapper.tsx->src/hooks/useWidgetWidth.tsx + + + + + +src/components/Swap/Speedbump/index.tsx + + +index.tsx + + + + + +src/components/Swap/Speedbump/index.tsx->src/components/Button.tsx + + + + + +src/components/Swap/Speedbump/index.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Speedbump/index.tsx->src/icons/index.tsx + + + + + +src/components/Swap/Speedbump/index.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Speedbump/index.tsx->src/components/Dialog.tsx + + + + + +src/components/Swap/Speedbump/index.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Status/StatusDialog.tsx + + +StatusDialog.tsx + + + + + +src/components/Swap/Status/StatusDialog.tsx->src/components/ActionButton.tsx + + + + + +src/components/Swap/Status/StatusDialog.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Status/StatusDialog.tsx->src/icons/index.tsx + + + + + +src/components/Swap/Status/StatusDialog.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Status/StatusDialog.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Status/StatusDialog.tsx->src/components/Error/ErrorDialog.tsx + + + + + +src/components/Swap/Status/StatusDialog.tsx->src/components/EtherscanLink.tsx + + + + + +src/components/Swap/Summary/index.tsx + + +index.tsx + + + + + +src/components/Swap/Status/StatusDialog.tsx->src/components/Swap/Summary/index.tsx + + + + + + + +no-circular + + + +src/components/Swap/Status/StatusDialog.tsx->src/constants/misc.ts + + + + + +src/components/Swap/Status/StatusDialog.tsx->src/state/transactions.ts + + + + + +src/components/Swap/Summary/index.tsx->src/components/ActionButton.tsx + + + + + +src/components/Swap/Summary/index.tsx->src/icons/index.tsx + + + + + +src/components/Swap/Summary/index.tsx->src/components/Dialog.tsx + + + + + +src/components/Swap/Summary/index.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Summary/index.tsx->src/hooks/usePriceImpact.ts + + + + + +src/components/Swap/Summary/index.tsx->src/state/routing/types.ts + + + + + +src/components/Swap/Summary/index.tsx->src/state/swap/index.ts + + + + + +src/components/Swap/Summary/index.tsx->src/hooks/useSlippage.ts + + + + + +src/components/Swap/Summary/index.tsx->src/components/Swap/Speedbump/index.tsx + + + + + +src/components/Swap/Summary/Details.tsx + + +Details.tsx + + + + + +src/components/Swap/Summary/index.tsx->src/components/Swap/Summary/Details.tsx + + + + + +src/components/Swap/Summary/Summary.tsx + + +Summary.tsx + + + + + +src/components/Swap/Summary/index.tsx->src/components/Swap/Summary/Summary.tsx + + + + + + + +no-circular + + + +src/state/transactions.ts->src/state/routing/types.ts + + + + + +src/components/Swap/Status/index.ts + + +index.ts + + + + + +src/components/Swap/Status/index.ts->src/components/Swap/Status/StatusDialog.tsx + + + + + + + +no-circular + + + +src/components/Swap/Summary/Details.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Summary/Details.tsx->src/components/Tooltip.tsx + + + + + +src/components/Swap/Summary/Details.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Summary/Details.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Summary/Details.tsx->src/components/Rule.tsx + + + + + +src/components/Swap/Summary/Details.tsx->src/hooks/usePriceImpact.ts + + + + + +src/components/Swap/Summary/Details.tsx->src/hooks/useWidgetWidth.tsx + + + + + +src/components/Swap/Summary/Details.tsx->src/state/routing/types.ts + + + + + +src/components/Swap/Summary/Details.tsx->src/state/swap/index.ts + + + + + +src/components/Swap/Summary/Details.tsx->src/components/Swap/Price.tsx + + + + + +src/components/Swap/Summary/Details.tsx->src/hooks/useSlippage.ts + + + + + +src/components/Swap/Summary/Estimate.tsx + + +Estimate.tsx + + + + + +src/components/Swap/Summary/Details.tsx->src/components/Swap/Summary/Estimate.tsx + + + + + +src/components/Swap/Summary/Details.tsx->src/theme/breakpoints.ts + + + + + +src/components/Swap/Summary/Estimate.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Summary/Estimate.tsx->src/state/routing/types.ts + + + + + +src/components/Swap/Summary/Estimate.tsx->src/hooks/useSlippage.ts + + + + + +src/state/routing/utils.ts + + +utils.ts + + + + + +src/components/Swap/Summary/Estimate.tsx->src/state/routing/utils.ts + + + + + +src/components/Swap/Summary/Summary.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Summary/Summary.tsx->src/icons/index.tsx + + + + + +src/components/Swap/Summary/Summary.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Summary/Summary.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Summary/Summary.tsx->src/hooks/usePriceImpact.ts + + + + + +src/components/Swap/Summary/Summary.tsx->src/components/TokenImg.tsx + + + + + + + +no-circular + + + +src/components/Swap/SwapActionButton/AllowanceButton.tsx + + +AllowanceButton.tsx + + + + + +src/components/Swap/SwapActionButton/AllowanceButton.tsx->src/components/ActionButton.tsx + + + + + +src/components/Swap/SwapActionButton/AllowanceButton.tsx->src/icons/index.tsx + + + + + +src/components/Swap/SwapActionButton/AllowanceButton.tsx->src/components/EtherscanLink.tsx + + + + + +src/components/Swap/SwapActionButton/AllowanceButton.tsx->src/hooks/useWidgetWidth.tsx + + + + + +src/components/Swap/SwapActionButton/AllowanceButton.tsx->src/hooks/transactions/index.tsx + + + + + +src/hooks/usePermit2Allowance.ts + + +usePermit2Allowance.ts + + + + + +src/components/Swap/SwapActionButton/AllowanceButton.tsx->src/hooks/usePermit2Allowance.ts + + + + + +src/hooks/useTokenColorExtraction.ts + + +useTokenColorExtraction.ts + + + + + +src/components/Swap/SwapActionButton/AllowanceButton.tsx->src/hooks/useTokenColorExtraction.ts + + + + + +src/hooks/transactions/index.tsx->src/state/transactions.ts + + + + + +src/hooks/transactions/index.tsx->src/hooks/useBlockNumber.tsx + + + + + +src/hooks/transactions/updater.tsx + + +updater.tsx + + + + + +src/hooks/transactions/index.tsx->src/hooks/transactions/updater.tsx + + + + + +src/hooks/usePermit2Allowance.ts->src/hooks/transactions/index.tsx + + + + + +src/constants/chainInfo.ts + + +chainInfo.ts + + + + + +src/hooks/usePermit2Allowance.ts->src/constants/chainInfo.ts + + + + + +src/hooks/useTokenAllowance.ts + + +useTokenAllowance.ts + + + + + +src/hooks/usePermit2Allowance.ts->src/hooks/useTokenAllowance.ts + + + + + +src/hooks/useInterval.ts + + +useInterval.ts + + + + + +src/hooks/usePermit2Allowance.ts->src/hooks/useInterval.ts + + + + + +src/hooks/usePermitAllowance.ts + + +usePermitAllowance.ts + + + + + +src/hooks/usePermit2Allowance.ts->src/hooks/usePermitAllowance.ts + + + + + +src/components/Swap/SwapActionButton/ApproveButton.tsx + + +ApproveButton.tsx + + + + + +src/components/Swap/SwapActionButton/ApproveButton.tsx->src/components/ActionButton.tsx + + + + + +src/components/Swap/SwapActionButton/ApproveButton.tsx->src/icons/index.tsx + + + + + +src/components/Swap/SwapActionButton/ApproveButton.tsx->src/components/EtherscanLink.tsx + + + + + +src/components/Swap/SwapActionButton/ApproveButton.tsx->src/hooks/swap/useSwapApproval.ts + + + + + +src/components/Swap/SwapActionButton/ApproveButton.tsx->src/state/routing/types.ts + + + + + +src/components/Swap/SwapActionButton/ApproveButton.tsx->src/state/transactions.ts + + + + + +src/components/Swap/SwapActionButton/ApproveButton.tsx->src/hooks/transactions/index.tsx + + + + + +src/components/Swap/SwapActionButton/ApproveButton.tsx->src/hooks/useTokenColorExtraction.ts + + + + + +src/components/Swap/SwapActionButton/useOnSubmit.ts + + +useOnSubmit.ts + + + + + +src/components/Swap/SwapActionButton/ApproveButton.tsx->src/components/Swap/SwapActionButton/useOnSubmit.ts + + + + + +src/components/Swap/SwapActionButton/ApproveButton.tsx->src/constants/addresses.ts + + + + + +src/components/Swap/SwapActionButton/useOnSubmit.ts->src/hooks/swap/index.ts + + + + + +src/components/Swap/SwapActionButton/useOnSubmit.ts->src/state/swap/index.ts + + + + + +src/components/Swap/SwapActionButton/useOnSubmit.ts->src/state/transactions.ts + + + + + +src/components/Swap/SwapActionButton/useOnSubmit.ts->src/hooks/transactions/index.tsx + + + + + +src/constants/addresses.ts->src/constants/chains.ts + + + + + +src/components/Swap/SwapActionButton/ConnectWalletButton.tsx + + +ConnectWalletButton.tsx + + + + + +src/components/Swap/SwapActionButton/ConnectWalletButton.tsx->src/components/ActionButton.tsx + + + + + +src/components/Swap/SwapActionButton/ConnectWalletButton.tsx->src/components/Dialog.tsx + + + + + +src/components/Swap/SwapActionButton/ConnectWalletButton.tsx->src/components/ConnectWallet/ConnectWalletDialog.tsx + + + + + +src/hooks/useConditionalHandler.ts + + +useConditionalHandler.ts + + + + + +src/components/Swap/SwapActionButton/ConnectWalletButton.tsx->src/hooks/useConditionalHandler.ts + + + + + +src/state/wallet.ts + + +wallet.ts + + + + + +src/components/Swap/SwapActionButton/ConnectWalletButton.tsx->src/state/wallet.ts + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx + + +SwapButton.tsx + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/components/ActionButton.tsx + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/components/Dialog.tsx + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/hooks/swap/index.ts + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/state/swap/index.ts + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/hooks/useTransactionDeadline.ts + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/components/Swap/Summary/index.tsx + + + + + + + +no-circular + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/state/transactions.ts + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/hooks/useTokenColorExtraction.ts + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/components/Swap/SwapActionButton/useOnSubmit.ts + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/hooks/useConditionalHandler.ts + + + + + +src/components/Swap/Toolbar/index.tsx + + +index.tsx + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/components/Swap/Toolbar/index.tsx + + + + + + + +no-circular + + + +src/hooks/swap/useSwapCallback.tsx + + +useSwapCallback.tsx + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/hooks/swap/useSwapCallback.tsx + + + + + +src/hooks/useIsValidBlock.ts + + +useIsValidBlock.ts + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/hooks/useIsValidBlock.ts + + + + + +src/hooks/useSyncFlags.ts + + +useSyncFlags.ts + + + + + +src/components/Swap/SwapActionButton/SwapButton.tsx->src/hooks/useSyncFlags.ts + + + + + +src/components/Swap/Toolbar/index.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Toolbar/index.tsx->src/icons/index.tsx + + + + + +src/components/Swap/Toolbar/index.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Toolbar/index.tsx->src/components/Expando.tsx + + + + + +src/components/Swap/Toolbar/index.tsx->src/hooks/swap/index.ts + + + + + +src/components/Swap/Toolbar/index.tsx->src/hooks/swap/useSwapApproval.ts + + + + + +src/components/Swap/Toolbar/index.tsx->src/hooks/swap/useWrapCallback.tsx + + + + + +src/components/Swap/Toolbar/index.tsx->src/state/routing/types.ts + + + + + +src/components/Swap/Toolbar/index.tsx->src/state/swap/index.ts + + + + + +src/components/Swap/Toolbar/index.tsx->src/components/Swap/Summary/Estimate.tsx + + + + + +src/components/Swap/Toolbar/index.tsx->src/state/routing/utils.ts + + + + + +src/components/Swap/Toolbar/index.tsx->src/components/Swap/SwapActionButton/AllowanceButton.tsx + + + + + +src/components/Swap/Toolbar/index.tsx->src/hooks/usePermit2Allowance.ts + + + + + +src/components/Swap/Toolbar/index.tsx->src/components/Swap/SwapActionButton/ApproveButton.tsx + + + + + +src/components/Swap/Toolbar/index.tsx->src/hooks/useSyncFlags.ts + + + + + +src/components/Swap/Toolbar/Caption.tsx + + +Caption.tsx + + + + + +src/components/Swap/Toolbar/index.tsx->src/components/Swap/Toolbar/Caption.tsx + + + + + + + +no-circular + + + +src/components/Swap/Toolbar/ToolbarTradeSummary.tsx + + +ToolbarTradeSummary.tsx + + + + + +src/components/Swap/Toolbar/index.tsx->src/components/Swap/Toolbar/ToolbarTradeSummary.tsx + + + + + +src/hooks/swap/useSwapCallback.tsx->src/state/routing/types.ts + + + + + +src/hooks/swap/useSendSwapTransaction.tsx + + +useSendSwapTransaction.tsx + + + + + +src/hooks/swap/useSwapCallback.tsx->src/hooks/swap/useSendSwapTransaction.tsx + + + + + +src/hooks/swap/useSwapCallback.tsx->src/hooks/usePermit.ts + + + + + +src/hooks/useENS.ts + + +useENS.ts + + + + + +src/hooks/swap/useSwapCallback.tsx->src/hooks/useENS.ts + + + + + +src/hooks/useSwapCallArguments.tsx + + +useSwapCallArguments.tsx + + + + + +src/hooks/swap/useSwapCallback.tsx->src/hooks/useSwapCallArguments.tsx + + + + + +src/hooks/useIsValidBlock.ts->src/hooks/useBlockNumber.tsx + + + + + +src/components/Swap/SwapActionButton/SwitchChainButton.tsx + + +SwitchChainButton.tsx + + + + + +src/components/Swap/SwapActionButton/SwitchChainButton.tsx->src/components/ActionButton.tsx + + + + + +src/components/Swap/SwapActionButton/SwitchChainButton.tsx->src/icons/index.tsx + + + + + +src/components/Swap/SwapActionButton/SwitchChainButton.tsx->src/components/Error/ErrorBoundary.tsx + + + + + +src/components/Swap/SwapActionButton/SwitchChainButton.tsx->src/hooks/useTokenColorExtraction.ts + + + + + +src/hooks/useSwitchChain.ts + + +useSwitchChain.ts + + + + + +src/components/Swap/SwapActionButton/SwitchChainButton.tsx->src/hooks/useSwitchChain.ts + + + + + +src/hooks/useSwitchChain.ts->src/hooks/web3/useConnectors.tsx + + + + + +src/hooks/useSwitchChain.ts->src/constants/chains.ts + + + + + +src/hooks/useSwitchChain.ts->src/constants/chainInfo.ts + + + + + +src/hooks/useSwitchChain.ts->src/constants/eip1193.ts + + + + + +src/hooks/web3/useJsonRpcUrlsMap.tsx + + +useJsonRpcUrlsMap.tsx + + + + + +src/hooks/useSwitchChain.ts->src/hooks/web3/useJsonRpcUrlsMap.tsx + + + + + +src/components/Swap/SwapActionButton/WrapButton.tsx + + +WrapButton.tsx + + + + + +src/components/Swap/SwapActionButton/WrapButton.tsx->src/components/ActionButton.tsx + + + + + +src/components/Swap/SwapActionButton/WrapButton.tsx->src/icons/index.tsx + + + + + +src/components/Swap/SwapActionButton/WrapButton.tsx->src/hooks/swap/useWrapCallback.tsx + + + + + +src/components/Swap/SwapActionButton/WrapButton.tsx->src/state/transactions.ts + + + + + +src/components/Swap/SwapActionButton/WrapButton.tsx->src/hooks/useTokenColorExtraction.ts + + + + + +src/components/Swap/SwapActionButton/WrapButton.tsx->src/components/Swap/SwapActionButton/useOnSubmit.ts + + + + + +src/hooks/useNativeCurrency.ts + + +useNativeCurrency.ts + + + + + +src/components/Swap/SwapActionButton/WrapButton.tsx->src/hooks/useNativeCurrency.ts + + + + + +src/hooks/useNativeCurrency.ts->src/constants/chains.ts + + + + + +src/hooks/useNativeCurrency.ts->src/constants/tokens.ts + + + + + +src/components/Swap/SwapActionButton/index.tsx + + +index.tsx + + + + + +src/components/Swap/SwapActionButton/index.tsx->src/constants/chains.ts + + + + + +src/components/Swap/SwapActionButton/index.tsx->src/hooks/swap/index.ts + + + + + +src/components/Swap/SwapActionButton/index.tsx->src/hooks/swap/useSwapApproval.ts + + + + + +src/components/Swap/SwapActionButton/index.tsx->src/hooks/swap/useWrapCallback.tsx + + + + + +src/components/Swap/SwapActionButton/index.tsx->src/state/swap/index.ts + + + + + +src/components/Swap/SwapActionButton/index.tsx->src/hooks/usePermit2Allowance.ts + + + + + +src/components/Swap/SwapActionButton/index.tsx->src/components/Swap/SwapActionButton/ConnectWalletButton.tsx + + + + + +src/components/Swap/SwapActionButton/index.tsx->src/components/Swap/SwapActionButton/SwapButton.tsx + + + + + + + +no-circular + + + +src/components/Swap/SwapActionButton/index.tsx->src/hooks/useSyncFlags.ts + + + + + +src/components/Swap/SwapActionButton/index.tsx->src/components/Swap/SwapActionButton/SwitchChainButton.tsx + + + + + +src/components/Swap/SwapActionButton/index.tsx->src/components/Swap/SwapActionButton/WrapButton.tsx + + + + + +src/components/TokenSelect/index.tsx->src/components/Row.tsx + + + + + +src/components/TokenSelect/index.tsx->src/icons/index.tsx + + + + + +src/components/TokenSelect/index.tsx->src/theme/index.tsx + + + + + +src/components/TokenSelect/index.tsx->src/components/Dialog.tsx + + + + + +src/components/TokenSelect/index.tsx->src/components/Column.tsx + + + + + +src/components/TokenSelect/index.tsx->src/components/Rule.tsx + + + + + +src/components/TokenSelect/index.tsx->src/components/Input.tsx + + + + + +src/components/TokenSelect/index.tsx->src/state/swap/index.ts + + + + + +src/components/TokenSelect/index.tsx->src/hooks/useConditionalHandler.ts + + + + + +src/components/TokenSelect/index.tsx->src/hooks/useNativeCurrency.ts + + + + + +src/components/TokenSelect/CommonBases.tsx + + +CommonBases.tsx + + + + + +src/components/TokenSelect/index.tsx->src/components/TokenSelect/CommonBases.tsx + + + + + + + +no-circular + + + +src/components/TokenSelect/NoTokensAvailableOnNetwork.tsx + + +NoTokensAvailableOnNetwork.tsx + + + + + +src/components/TokenSelect/index.tsx->src/components/TokenSelect/NoTokensAvailableOnNetwork.tsx + + + + + +src/components/TokenSelect/TokenButton.tsx + + +TokenButton.tsx + + + + + +src/components/TokenSelect/index.tsx->src/components/TokenSelect/TokenButton.tsx + + + + + + + +no-circular + + + +src/components/TokenSelect/TokenOptions.tsx + + +TokenOptions.tsx + + + + + +src/components/TokenSelect/index.tsx->src/components/TokenSelect/TokenOptions.tsx + + + + + + + +no-circular + + + +src/hooks/useCurrencyBalance.ts + + +useCurrencyBalance.ts + + + + + +src/components/TokenSelect/index.tsx->src/hooks/useCurrencyBalance.ts + + + + + +src/components/TokenSelect/TokenOptionsSkeleton.tsx + + +TokenOptionsSkeleton.tsx + + + + + +src/components/TokenSelect/index.tsx->src/components/TokenSelect/TokenOptionsSkeleton.tsx + + + + + +src/components/TokenSelect/index.tsx->src/hooks/useTokenList/index.tsx + + + + + +src/components/Swap/Toolbar/Caption.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Toolbar/Caption.tsx->src/components/Tooltip.tsx + + + + + +src/components/Swap/Toolbar/Caption.tsx->src/icons/index.tsx + + + + + +src/components/Swap/Toolbar/Caption.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Toolbar/Caption.tsx->src/css/loading.ts + + + + + +src/components/Swap/Toolbar/Caption.tsx->src/hooks/usePriceImpact.ts + + + + + +src/components/Swap/Toolbar/Caption.tsx->src/hooks/useWidgetWidth.tsx + + + + + +src/components/Swap/Toolbar/Caption.tsx->src/state/routing/types.ts + + + + + +src/components/Swap/Toolbar/Caption.tsx->src/components/Swap/Price.tsx + + + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx + + +GasEstimateTooltip.tsx + + + + + +src/components/Swap/Toolbar/Caption.tsx->src/components/Swap/Toolbar/GasEstimateTooltip.tsx + + + + + + + +no-circular + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx->src/components/Tooltip.tsx + + + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx->src/icons/index.tsx + + + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx->src/components/BottomSheetModal.tsx + + + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx->src/components/Popover.tsx + + + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx->src/hooks/useWidgetWidth.tsx + + + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx->src/state/routing/types.ts + + + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx->src/components/Swap/RoutingDiagram/index.tsx + + + + + + + +no-circular + + + +src/components/Swap/Toolbar/GasEstimateTooltip.tsx->src/hooks/useIsMobileWidth.ts + + + + + +src/components/Swap/Toolbar/Toolbar.test.tsx + + +Toolbar.test.tsx + + + + + +src/components/Swap/Toolbar/Toolbar.test.tsx->src/state/swap/index.ts + + + + + +src/components/Swap/Toolbar/Toolbar.test.tsx->src/test/index.tsx + + + + + +src/components/Swap/Toolbar/Toolbar.test.tsx->src/hooks/usePermit2Allowance.ts + + + + + +src/components/Swap/Toolbar/Toolbar.test.tsx->src/components/Swap/Toolbar/index.tsx + + + + + +src/components/Swap/Toolbar/Toolbar.test.tsx->src/hooks/useSyncFlags.ts + + + + + +src/components/Swap/Toolbar/Toolbar.test.tsx->src/constants/tokens.ts + + + + + +src/components/Swap/Toolbar/Toolbar.test.tsx->src/hooks/swap/useSwapInfo.tsx + + + + + +src/constants/tokens.ts->src/constants/chains.ts + + + + + +src/constants/tokens.ts->src/constants/addresses.ts + + + + + +src/hooks/swap/useSwapInfo.tsx->src/hooks/swap/useSwapApproval.ts + + + + + +src/hooks/swap/useSwapInfo.tsx->src/hooks/swap/useWrapCallback.tsx + + + + + +src/hooks/swap/useSwapInfo.tsx->src/hooks/usePriceImpact.ts + + + + + +src/hooks/swap/useSwapInfo.tsx->src/state/routing/types.ts + + + + + +src/hooks/swap/useSwapInfo.tsx->src/state/swap/index.ts + + + + + +src/hooks/swap/useSwapInfo.tsx->src/hooks/useSlippage.ts + + + + + +src/hooks/swap/useSwapInfo.tsx->src/hooks/usePermit2Allowance.ts + + + + + +src/hooks/swap/useSwapInfo.tsx->src/hooks/useSyncFlags.ts + + + + + +src/hooks/swap/useSwapInfo.tsx->src/hooks/useCurrencyBalance.ts + + + + + +src/hooks/swap/useSwapInfo.tsx->src/hooks/routing/types.ts + + + + + +src/hooks/routing/useRouterTrade.ts + + +useRouterTrade.ts + + + + + +src/hooks/swap/useSwapInfo.tsx->src/hooks/routing/useRouterTrade.ts + + + + + +src/hooks/useOnSupportedNetwork.ts + + +useOnSupportedNetwork.ts + + + + + +src/hooks/swap/useSwapInfo.tsx->src/hooks/useOnSupportedNetwork.ts + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.test.tsx + + +ToolbarOrderRouting.test.tsx + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.test.tsx->src/state/routing/types.ts + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.test.tsx->src/test/index.tsx + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.tsx + + +ToolbarOrderRouting.tsx + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.test.tsx->src/components/Swap/Toolbar/ToolbarOrderRouting.tsx + + + + + +src/test/utils.ts + + +utils.ts + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.test.tsx->src/test/utils.ts + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.tsx->src/components/Tooltip.tsx + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.tsx->src/components/BottomSheetModal.tsx + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.tsx->src/components/Popover.tsx + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.tsx->src/state/routing/types.ts + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.tsx->src/components/Swap/RoutingDiagram/index.tsx + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.tsx->src/hooks/useIsMobileWidth.ts + + + + + +src/components/Swap/Toolbar/ToolbarOrderRouting.tsx->src/theme/type.tsx + + + + + +src/theme/type.tsx->src/theme/animations.ts + + + + + +src/theme/type.tsx->src/theme/theme.ts + + + + + +src/components/Swap/Toolbar/ToolbarTradeSummary.test.tsx + + +ToolbarTradeSummary.test.tsx + + + + + +src/components/Swap/Toolbar/ToolbarTradeSummary.test.tsx->src/test/index.tsx + + + + + +src/components/Swap/Toolbar/ToolbarTradeSummary.test.tsx->src/components/Swap/Toolbar/ToolbarTradeSummary.tsx + + + + + +src/components/Swap/Toolbar/ToolbarTradeSummary.tsx->src/components/Row.tsx + + + + + +src/components/Swap/Toolbar/ToolbarTradeSummary.tsx->src/components/Tooltip.tsx + + + + + +src/components/Swap/Toolbar/ToolbarTradeSummary.tsx->src/icons/index.tsx + + + + + +src/components/Swap/Toolbar/ToolbarTradeSummary.tsx->src/theme/index.tsx + + + + + +src/components/Swap/Toolbar/ToolbarTradeSummary.tsx->src/components/Column.tsx + + + + + +src/components/Swap/Toolbar/ToolbarTradeSummary.tsx->src/theme/type.tsx + + + + + +src/components/Swap/index.tsx + + +index.tsx + + + + + +src/components/Swap/index.tsx->src/components/Dialog.tsx + + + + + +src/components/Swap/index.tsx->src/components/BrandedFooter.tsx + + + + + +src/components/Swap/index.tsx->src/components/ConnectWallet/index.tsx + + + + + +src/components/Swap/index.tsx->src/components/Popover.tsx + + + + + +src/components/Swap/index.tsx->src/components/Header.tsx + + + + + +src/components/Swap/index.tsx->src/components/Swap/Input.tsx + + + + + + + +no-circular + + + +src/components/Swap/index.tsx->src/state/swap/index.ts + + + + + +src/components/Swap/index.tsx->src/components/Swap/Output.tsx + + + + + + + +no-circular + + + +src/components/Swap/index.tsx->src/components/Swap/ReverseButton.tsx + + + + + +src/components/Swap/index.tsx->src/components/Swap/Settings/index.tsx + + + + + +src/components/Swap/index.tsx->src/components/Swap/Status/index.ts + + + + + + + +no-circular + + + +src/components/Swap/index.tsx->src/hooks/transactions/index.tsx + + + + + +src/components/Swap/index.tsx->src/components/Swap/Toolbar/index.tsx + + + + + + + +no-circular + + + +src/components/Swap/index.tsx->src/hooks/useSyncFlags.ts + + + + + +src/components/Swap/index.tsx->src/components/Swap/SwapActionButton/index.tsx + + + + + + + +no-circular + + + +src/components/Swap/index.tsx->src/hooks/swap/useSwapInfo.tsx + + + + + +src/components/Swap/useValidate.tsx + + +useValidate.tsx + + + + + +src/components/Swap/index.tsx->src/components/Swap/useValidate.tsx + + + + + + + +no-circular + + + +src/hooks/swap/useSyncController.ts + + +useSyncController.ts + + + + + +src/components/Swap/index.tsx->src/hooks/swap/useSyncController.ts + + + + + +src/hooks/swap/useSyncConvenienceFee.ts + + +useSyncConvenienceFee.ts + + + + + +src/components/Swap/index.tsx->src/hooks/swap/useSyncConvenienceFee.ts + + + + + +src/hooks/swap/useSyncSwapEventHandlers.ts + + +useSyncSwapEventHandlers.ts + + + + + +src/components/Swap/index.tsx->src/hooks/swap/useSyncSwapEventHandlers.ts + + + + + +src/hooks/swap/useSyncTokenDefaults.ts + + +useSyncTokenDefaults.ts + + + + + +src/components/Swap/index.tsx->src/hooks/swap/useSyncTokenDefaults.ts + + + + + + + +no-circular + + + +src/components/Swap/useValidate.tsx->src/errors.ts + + + + + +src/components/Swap/useValidate.tsx->src/hooks/swap/useSyncConvenienceFee.ts + + + + + +src/components/Swap/useValidate.tsx->src/hooks/swap/useSyncTokenDefaults.ts + + + + + + + +no-circular + + + +src/hooks/swap/useSyncController.ts->src/state/swap/index.ts + + + + + +src/hooks/swap/useSyncController.ts->src/state/swap/settings.ts + + + + + +src/hooks/swap/useSyncConvenienceFee.ts->src/state/swap/index.ts + + + + + +src/hooks/swap/useSyncSwapEventHandlers.ts->src/state/swap/index.ts + + + + + +src/hooks/swap/useSyncTokenDefaults.ts->src/constants/chains.ts + + + + + +src/hooks/swap/useSyncTokenDefaults.ts->src/state/swap/index.ts + + + + + +src/hooks/swap/useSyncTokenDefaults.ts->src/constants/tokens.ts + + + + + +src/hooks/swap/useSyncTokenDefaults.ts->src/hooks/useCurrency.ts + + + + + + + +no-circular + + + +src/hooks/swap/useSyncTokenDefaults.ts->src/hooks/useTokenList/index.tsx + + + + + +src/hooks/swap/useSyncTokenDefaults.ts->src/hooks/useOnSupportedNetwork.ts + + + + + +src/components/Toggle.tsx + + +Toggle.tsx + + + + + +src/components/Toggle.tsx->src/theme/index.tsx + + + + + +src/hooks/useCurrency.ts->src/hooks/useNativeCurrency.ts + + + + + +src/hooks/useCurrency.ts->src/constants/tokens.ts + + + + + +src/hooks/useCurrency.ts->src/hooks/useTokenList/index.tsx + + + + + +src/index.tsx + + +index.tsx + + + + + +src/hooks/useCurrency.ts->src/index.tsx + + + + + + + +no-circular + + + +src/hooks/multicall.ts + + +multicall.ts + + + + + +src/hooks/useCurrency.ts->src/hooks/multicall.ts + + + + + +src/hooks/useCurrency.ts->src/hooks/useContract.ts + + + + + +src/hooks/useCurrencyLogoURIs.ts->src/constants/chains.ts + + + + + +src/hooks/useCurrencyLogoURIs.ts->src/constants/tokens.ts + + + + + +src/hooks/useHttpLocations.ts + + +useHttpLocations.ts + + + + + +src/hooks/useCurrencyLogoURIs.ts->src/hooks/useHttpLocations.ts + + + + + +src/components/TokenSelect/CommonBases.test.tsx + + +CommonBases.test.tsx + + + + + +src/components/TokenSelect/CommonBases.test.tsx->src/test/index.tsx + + + + + +src/components/TokenSelect/CommonBases.test.tsx->src/constants/tokens.ts + + + + + +src/components/TokenSelect/CommonBases.test.tsx->src/components/TokenSelect/CommonBases.tsx + + + + + +src/constants/routing.ts + + +routing.ts + + + + + +src/components/TokenSelect/CommonBases.test.tsx->src/constants/routing.ts + + + + + +src/components/TokenSelect/CommonBases.tsx->src/components/Row.tsx + + + + + +src/components/TokenSelect/CommonBases.tsx->src/theme/index.tsx + + + + + +src/components/TokenSelect/CommonBases.tsx->src/components/TokenImg.tsx + + + + + + + +no-circular + + + +src/components/TokenSelect/CommonBases.tsx->src/constants/routing.ts + + + + + +src/constants/routing.ts->src/constants/chains.ts + + + + + +src/constants/routing.ts->src/constants/tokens.ts + + + + + +src/components/TokenSelect/NoTokensAvailableOnNetwork.tsx->src/icons/index.tsx + + + + + +src/components/TokenSelect/NoTokensAvailableOnNetwork.tsx->src/theme/index.tsx + + + + + +src/components/TokenSelect/NoTokensAvailableOnNetwork.tsx->src/components/Column.tsx + + + + + +src/components/TokenSelect/TokenBase.tsx + + +TokenBase.tsx + + + + + +src/components/TokenSelect/TokenBase.tsx->src/components/Button.tsx + + + + + +src/components/TokenSelect/TokenBase.tsx->src/components/Row.tsx + + + + + +src/components/TokenSelect/TokenBase.tsx->src/theme/index.tsx + + + + + +src/components/TokenSelect/TokenBase.tsx->src/components/TokenImg.tsx + + + + + +src/components/TokenSelect/TokenButton.tsx->src/components/Button.tsx + + + + + +src/components/TokenSelect/TokenButton.tsx->src/components/Row.tsx + + + + + +src/components/TokenSelect/TokenButton.tsx->src/icons/index.tsx + + + + + +src/components/TokenSelect/TokenButton.tsx->src/theme/index.tsx + + + + + +src/components/TokenSelect/TokenButton.tsx->src/components/TokenImg.tsx + + + + + + + +no-circular + + + +src/components/TokenSelect/TokenOptions.tsx->src/components/Button.tsx + + + + + +src/components/TokenSelect/TokenOptions.tsx->src/components/Row.tsx + + + + + +src/components/TokenSelect/TokenOptions.tsx->src/theme/index.tsx + + + + + +src/components/TokenSelect/TokenOptions.tsx->src/components/Column.tsx + + + + + +src/components/TokenSelect/TokenOptions.tsx->src/hooks/useScrollbar.ts + + + + + +src/components/TokenSelect/TokenOptions.tsx->src/components/TokenImg.tsx + + + + + + + +no-circular + + + +src/components/TokenSelect/TokenOptions.tsx->src/hooks/useCurrencyBalance.ts + + + + + +src/hooks/useNativeEvent.ts + + +useNativeEvent.ts + + + + + +src/components/TokenSelect/TokenOptions.tsx->src/hooks/useNativeEvent.ts + + + + + +src/hooks/useCurrencyBalance.ts->src/constants/tokens.ts + + + + + +src/hooks/useCurrencyBalance.ts->src/hooks/multicall.ts + + + + + +src/hooks/useCurrencyBalance.ts->src/hooks/useContract.ts + + + + + +src/components/TokenSelect/TokenOptionsSkeleton.tsx->src/components/Row.tsx + + + + + +src/components/TokenSelect/TokenOptionsSkeleton.tsx->src/theme/index.tsx + + + + + +src/components/TokenSelect/TokenOptionsSkeleton.tsx->src/components/Column.tsx + + + + + +src/components/TokenSelect/index.test.tsx + + +index.test.tsx + + + + + +src/components/TokenSelect/index.test.tsx->src/state/swap/index.ts + + + + + +src/components/TokenSelect/index.test.tsx->src/test/index.tsx + + + + + +src/components/TokenSelect/index.test.tsx->src/components/TokenSelect/index.tsx + + + + + +src/hooks/useTokenList/index.tsx->src/components/Error/ErrorBoundary.tsx + + + + + +src/hooks/useTokenList/index.tsx->src/constants/chains.ts + + + + + +src/hooks/useTokenList/fetchTokenList.ts + + +fetchTokenList.ts + + + + + +src/hooks/useTokenList/index.tsx->src/hooks/useTokenList/fetchTokenList.ts + + + + + +src/hooks/useTokenList/useQueryTokens.ts + + +useQueryTokens.ts + + + + + +src/hooks/useTokenList/index.tsx->src/hooks/useTokenList/useQueryTokens.ts + + + + + +src/hooks/useTokenList/utils.ts + + +utils.ts + + + + + +src/hooks/useTokenList/index.tsx->src/hooks/useTokenList/utils.ts + + + + + +src/state/lists/wrappedTokenInfo.ts + + +wrappedTokenInfo.ts + + + + + +src/hooks/useTokenList/index.tsx->src/state/lists/wrappedTokenInfo.ts + + + + + +src/components/Widget.tsx->src/theme/index.tsx + + + + + +src/components/Widget.tsx->src/components/Dialog.tsx + + + + + +src/components/Widget.tsx->src/components/Error/ErrorBoundary.tsx + + + + + +src/components/Widget.tsx->src/components/WidgetWrapper.tsx + + + + + +src/components/Widget.tsx->src/hooks/transactions/index.tsx + + + + + +src/components/Widget.tsx->src/hooks/useSyncFlags.ts + + + + + +src/components/Widget.tsx->src/hooks/useTokenList/index.tsx + + + + + +src/components/Widget.tsx->src/constants/locales.ts + + + + + +src/components/Widget.tsx->src/hooks/useBlockNumber.tsx + + + + + +src/hooks/useSyncWidgetEventHandlers.ts + + +useSyncWidgetEventHandlers.ts + + + + + +src/components/Widget.tsx->src/hooks/useSyncWidgetEventHandlers.ts + + + + + +src/components/Widget.tsx->src/hooks/web3/index.tsx + + + + + +src/components/Widget.tsx->src/i18n.tsx + + + + + +src/components/Widget.tsx->src/state/index.tsx + + + + + +src/state/multicall.tsx + + +multicall.tsx + + + + + +src/components/Widget.tsx->src/state/multicall.tsx + + + + + +src/hooks/useIsWindowVisible.ts + + +useIsWindowVisible.ts + + + + + +src/hooks/useBlockNumber.tsx->src/hooks/useIsWindowVisible.ts + + + + + +src/hooks/useSyncWidgetEventHandlers.ts->src/components/Error/ErrorBoundary.tsx + + + + + +src/hooks/useSyncWidgetEventHandlers.ts->src/state/wallet.ts + + + + + +src/hooks/useSyncWidgetEventHandlers.ts->src/hooks/useSwitchChain.ts + + + + + +src/hooks/web3/index.tsx->src/hooks/web3/useConnectors.tsx + + + + + +src/hooks/web3/index.tsx->src/components/Error/ErrorBoundary.tsx + + + + + +src/hooks/web3/index.tsx->src/errors.ts + + + + + +src/hooks/web3/index.tsx->src/constants/chains.ts + + + + + +src/hooks/web3/index.tsx->src/hooks/web3/useJsonRpcUrlsMap.tsx + + + + + +src/i18n.tsx->src/constants/locales.ts + + + + + +src/state/index.tsx->src/state/multicall.tsx + + + + + +src/state/routing/slice.ts + + +slice.ts + + + + + +src/state/index.tsx->src/state/routing/slice.ts + + + + + +src/state/multicall.tsx->src/hooks/useBlockNumber.tsx + + + + + +src/state/multicall.tsx->src/hooks/useContract.ts + + + + + +src/components/WidgetWrapper.test.tsx + + +WidgetWrapper.test.tsx + + + + + +src/components/WidgetWrapper.test.tsx->src/hooks/useWidgetWidth.tsx + + + + + +src/components/WidgetWrapper.test.tsx->src/test/index.tsx + + + + + +src/components/WidgetWrapper.test.tsx->src/components/WidgetWrapper.tsx + + + + + +src/constants/chainInfo.ts->src/constants/chains.ts + + + + + +src/constants/chains.test.ts + + +chains.test.ts + + + + + +src/constants/chains.test.ts->src/constants/chains.ts + + + + + +src/constants/jsonRpcEndpoints.ts + + +jsonRpcEndpoints.ts + + + + + +src/constants/jsonRpcEndpoints.ts->src/constants/chains.ts + + + + + +src/cosmos/EventFeed.tsx + + +EventFeed.tsx + + + + + +src/cosmos/EventFeed.tsx->src/components/Row.tsx + + + + + +src/cosmos/EventFeed.tsx->src/theme/type.tsx + + + + + +src/cosmos/EventFeed.tsx->src/index.tsx + + + + + +src/index.tsx->src/theme/index.tsx + + + + + +src/index.tsx->src/constants/chains.ts + + + + + +src/index.tsx->src/state/swap/index.ts + + + + + +src/index.tsx->src/state/swap/settings.ts + + + + + +src/index.tsx->src/components/Swap/Skeleton.tsx + + + + + +src/index.tsx->src/state/transactions.ts + + + + + +src/index.tsx->src/hooks/transactions/index.tsx + + + + + +src/index.tsx->src/hooks/useSyncFlags.ts + + + + + +src/index.tsx->src/components/Swap/index.tsx + + + + + + + +no-circular + + + +src/index.tsx->src/hooks/swap/useSyncController.ts + + + + + +src/index.tsx->src/hooks/swap/useSyncConvenienceFee.ts + + + + + +src/index.tsx->src/hooks/swap/useSyncTokenDefaults.ts + + + + + + + +no-circular + + + +src/index.tsx->src/hooks/useTokenList/index.tsx + + + + + +src/index.tsx->src/components/Widget.tsx + + + + + +src/index.tsx->src/constants/locales.ts + + + + + +src/index.tsx->src/hooks/useSyncWidgetEventHandlers.ts + + + + + +src/index.tsx->src/hooks/routing/types.ts + + + + + +src/index.tsx->src/hooks/web3/useJsonRpcUrlsMap.tsx + + + + + +src/hooks/useTokenList/validateTokenList.ts + + +validateTokenList.ts + + + + + +src/index.tsx->src/hooks/useTokenList/validateTokenList.ts + + + + + +src/polyfills.ts + + +polyfills.ts + + + + + +src/index.tsx->src/polyfills.ts + + + + + +src/cosmos/Swap.fixture.tsx + + +Swap.fixture.tsx + + + + + +src/cosmos/Swap.fixture.tsx->src/components/Row.tsx + + + + + +src/cosmos/Swap.fixture.tsx->src/constants/chains.ts + + + + + +src/cosmos/Swap.fixture.tsx->src/constants/tokens.ts + + + + + +src/cosmos/Swap.fixture.tsx->src/cosmos/EventFeed.tsx + + + + + +src/cosmos/Swap.fixture.tsx->src/index.tsx + + + + + +src/cosmos/useOption.ts + + +useOption.ts + + + + + +src/cosmos/Swap.fixture.tsx->src/cosmos/useOption.ts + + + + + +src/cosmos/useProvider.ts + + +useProvider.ts + + + + + +src/cosmos/Swap.fixture.tsx->src/cosmos/useProvider.ts + + + + + +src/cosmos/useProvider.ts->src/constants/jsonRpcEndpoints.ts + + + + + +src/cosmos/useProvider.ts->src/cosmos/useOption.ts + + + + + +src/cosmos/SwapSkeleton.fixture.tsx + + +SwapSkeleton.fixture.tsx + + + + + +src/cosmos/SwapSkeleton.fixture.tsx->src/index.tsx + + + + + +src/ethereum.d.ts + + +ethereum.d.ts + + + + + +src/hooks/multicall.ts->src/hooks/useBlockNumber.tsx + + + + + +src/hooks/multicall.ts->src/state/multicall.tsx + + + + + +src/hooks/routing/useRouterTrade.ts->src/state/routing/types.ts + + + + + +src/hooks/routing/useRouterTrade.ts->src/hooks/routing/types.ts + + + + + +src/hooks/useStablecoinAmountFromFiatValue.ts + + +useStablecoinAmountFromFiatValue.ts + + + + + +src/hooks/routing/useRouterTrade.ts->src/hooks/useStablecoinAmountFromFiatValue.ts + + + + + +src/hooks/useTimeout.ts + + +useTimeout.ts + + + + + +src/hooks/routing/useRouterTrade.ts->src/hooks/useTimeout.ts + + + + + +src/state/routing/args.ts + + +args.ts + + + + + +src/hooks/routing/useRouterTrade.ts->src/state/routing/args.ts + + + + + +src/hooks/routing/useRouterTrade.ts->src/state/routing/slice.ts + + + + + +src/hooks/useStablecoinAmountFromFiatValue.ts->src/constants/chains.ts + + + + + +src/hooks/useStablecoinAmountFromFiatValue.ts->src/constants/tokens.ts + + + + + +src/state/routing/args.ts->src/state/routing/types.ts + + + + + +src/state/routing/args.ts->src/hooks/routing/types.ts + + + + + +src/state/routing/args.ts->src/hooks/useIsWindowVisible.ts + + + + + +src/state/routing/slice.ts->src/state/routing/types.ts + + + + + +src/state/routing/slice.ts->src/state/routing/args.ts + + + + + +src/hooks/swap/index.test.tsx + + +index.test.tsx + + + + + +src/hooks/swap/index.test.tsx->src/constants/chains.ts + + + + + +src/hooks/swap/index.test.tsx->src/hooks/swap/index.ts + + + + + +src/hooks/swap/index.test.tsx->src/state/swap/index.ts + + + + + +src/hooks/swap/index.test.tsx->src/test/index.tsx + + + + + +src/hooks/swap/index.test.tsx->src/constants/tokens.ts + + + + + +src/hooks/swap/useSendSwapTransaction.tsx->src/state/routing/types.ts + + + + + +src/hooks/swap/useSendSwapTransaction.tsx->src/constants/eip1193.ts + + + + + +src/hooks/useApproval.ts->src/hooks/useContract.ts + + + + + +src/hooks/useApproval.ts->src/hooks/useTokenAllowance.ts + + + + + +src/hooks/usePermit.ts->src/constants/tokens.ts + + + + + +src/hooks/usePermit.ts->src/hooks/multicall.ts + + + + + +src/hooks/usePermit.ts->src/hooks/useContract.ts + + + + + +src/hooks/useIsArgentWallet.ts + + +useIsArgentWallet.ts + + + + + +src/hooks/usePermit.ts->src/hooks/useIsArgentWallet.ts + + + + + +src/hooks/useENSAddress.ts + + +useENSAddress.ts + + + + + +src/hooks/useENS.ts->src/hooks/useENSAddress.ts + + + + + +src/hooks/useENSName.ts + + +useENSName.ts + + + + + +src/hooks/useENS.ts->src/hooks/useENSName.ts + + + + + +src/hooks/useSwapCallArguments.tsx->src/state/routing/types.ts + + + + + +src/hooks/useSwapCallArguments.tsx->src/constants/addresses.ts + + + + + +src/hooks/useSwapCallArguments.tsx->src/hooks/usePermit.ts + + + + + +src/hooks/useSwapCallArguments.tsx->src/hooks/useENS.ts + + + + + +src/hooks/useArgentWalletContract.ts + + +useArgentWalletContract.ts + + + + + +src/hooks/useSwapCallArguments.tsx->src/hooks/useArgentWalletContract.ts + + + + + +src/hooks/useOnSupportedNetwork.ts->src/constants/chains.ts + + + + + +src/hooks/swap/useSyncTokenDefaults.test.tsx + + +useSyncTokenDefaults.test.tsx + + + + + +src/hooks/swap/useSyncTokenDefaults.test.tsx->src/constants/chains.ts + + + + + +src/hooks/swap/useSyncTokenDefaults.test.tsx->src/state/swap/index.ts + + + + + +src/hooks/swap/useSyncTokenDefaults.test.tsx->src/constants/tokens.ts + + + + + +src/hooks/swap/useSyncTokenDefaults.test.tsx->src/hooks/swap/useSyncTokenDefaults.ts + + + + + +src/hooks/useContract.ts->src/constants/addresses.ts + + + + + +src/hooks/useContract.ts->src/constants/tokens.ts + + + + + +src/hooks/transactions/updater.tsx->src/constants/chains.ts + + + + + +src/hooks/transactions/updater.tsx->src/hooks/useBlockNumber.tsx + + + + + +src/hooks/transactions/updater.test.tsx + + +updater.test.tsx + + + + + +src/hooks/transactions/updater.test.tsx->src/test/index.tsx + + + + + +src/hooks/transactions/updater.test.tsx->src/hooks/useBlockNumber.tsx + + + + + +src/hooks/transactions/updater.test.tsx->src/hooks/transactions/updater.tsx + + + + + +src/hooks/useAllCurrencyCombinations.ts + + +useAllCurrencyCombinations.ts + + + + + +src/hooks/useAllCurrencyCombinations.ts->src/constants/routing.ts + + + + + +src/hooks/useTokenAllowance.ts->src/state/transactions.ts + + + + + +src/hooks/useTokenAllowance.ts->src/hooks/multicall.ts + + + + + +src/hooks/useTokenAllowance.ts->src/hooks/useContract.ts + + + + + +src/hooks/useArgentWalletContract.ts->src/hooks/useContract.ts + + + + + +src/hooks/useArgentWalletContract.ts->src/hooks/useIsArgentWallet.ts + + + + + +src/hooks/useIsArgentWallet.ts->src/hooks/multicall.ts + + + + + +src/hooks/useIsArgentWallet.ts->src/hooks/useContract.ts + + + + + +src/hooks/useENSContentHash.ts + + +useENSContentHash.ts + + + + + +src/hooks/useHttpLocations.ts->src/hooks/useENSContentHash.ts + + + + + +src/hooks/useCurrentBlockTimestamp.ts->src/hooks/multicall.ts + + + + + +src/hooks/useCurrentBlockTimestamp.ts->src/hooks/useContract.ts + + + + + +src/hooks/useDebounce.ts + + +useDebounce.ts + + + + + +src/hooks/useENSAddress.ts->src/hooks/multicall.ts + + + + + +src/hooks/useENSAddress.ts->src/hooks/useContract.ts + + + + + +src/hooks/useENSAddress.ts->src/hooks/useDebounce.ts + + + + + +src/hooks/useENSName.ts->src/hooks/multicall.ts + + + + + +src/hooks/useENSName.ts->src/hooks/useContract.ts + + + + + +src/hooks/useENSName.ts->src/hooks/useDebounce.ts + + + + + +src/hooks/useENSName.ts->src/hooks/useENSAddress.ts + + + + + +src/hooks/useENSContentHash.ts->src/hooks/multicall.ts + + + + + +src/hooks/useENSContentHash.ts->src/hooks/useContract.ts + + + + + +src/hooks/useGasPrice.ts + + +useGasPrice.ts + + + + + +src/hooks/useGasPrice.ts->src/hooks/multicall.ts + + + + + +src/hooks/useGasPrice.ts->src/hooks/useContract.ts + + + + + +src/hooks/useGasPrice.ts->src/hooks/useENSAddress.ts + + + + + +src/hooks/useLast.ts + + +useLast.ts + + + + + +src/hooks/usePermit2Allowance.test.ts + + +usePermit2Allowance.test.ts + + + + + +src/hooks/usePermit2Allowance.test.ts->src/constants/chains.ts + + + + + +src/hooks/usePermit2Allowance.test.ts->src/test/index.tsx + + + + + +src/hooks/usePermit2Allowance.test.ts->src/hooks/transactions/index.tsx + + + + + +src/hooks/usePermit2Allowance.test.ts->src/hooks/usePermit2Allowance.ts + + + + + +src/hooks/usePermit2Allowance.test.ts->src/constants/tokens.ts + + + + + +src/hooks/usePermit2Allowance.test.ts->src/hooks/useTokenAllowance.ts + + + + + +src/hooks/usePermit2Allowance.test.ts->src/hooks/usePermitAllowance.ts + + + + + +src/hooks/usePermitAllowance.ts->src/hooks/multicall.ts + + + + + +src/hooks/usePermitAllowance.ts->src/hooks/useContract.ts + + + + + +src/hooks/usePermitAllowance.test.ts + + +usePermitAllowance.test.ts + + + + + +src/hooks/usePermitAllowance.test.ts->src/constants/chains.ts + + + + + +src/hooks/usePermitAllowance.test.ts->src/test/index.tsx + + + + + +src/hooks/usePermitAllowance.test.ts->src/constants/tokens.ts + + + + + +src/hooks/usePermitAllowance.test.ts->src/hooks/multicall.ts + + + + + +src/hooks/usePermitAllowance.test.ts->src/hooks/useContract.ts + + + + + +src/hooks/usePermitAllowance.test.ts->src/hooks/usePermitAllowance.ts + + + + + +src/hooks/web3/useJsonRpcUrlsMap.tsx->src/constants/chains.ts + + + + + +src/hooks/web3/useJsonRpcUrlsMap.tsx->src/constants/jsonRpcEndpoints.ts + + + + + +src/hooks/useTokenAllowance.test.ts + + +useTokenAllowance.test.ts + + + + + +src/hooks/useTokenAllowance.test.ts->src/constants/chains.ts + + + + + +src/hooks/useTokenAllowance.test.ts->src/test/index.tsx + + + + + +src/hooks/useTokenAllowance.test.ts->src/state/transactions.ts + + + + + +src/hooks/useTokenAllowance.test.ts->src/constants/tokens.ts + + + + + +src/hooks/useTokenAllowance.test.ts->src/hooks/multicall.ts + + + + + +src/hooks/useTokenAllowance.test.ts->src/hooks/useContract.ts + + + + + +src/hooks/useTokenAllowance.test.ts->src/hooks/useTokenAllowance.ts + + + + + +src/hooks/useTokenList/fetchTokenList.test.ts + + +fetchTokenList.test.ts + + + + + +src/hooks/useTokenList/fetchTokenList.test.ts->src/test/index.tsx + + + + + +src/hooks/useTokenList/fetchTokenList.test.ts->src/hooks/useTokenList/fetchTokenList.ts + + + + + +src/hooks/useTokenList/fetchTokenList.ts->src/hooks/useTokenList/validateTokenList.ts + + + + + +src/hooks/useTokenList/filtering.ts + + +filtering.ts + + + + + +src/hooks/useTokenList/useQueryTokens.ts->src/constants/tokens.ts + + + + + +src/hooks/useTokenList/useQueryTokens.ts->src/hooks/useCurrencyBalance.ts + + + + + +src/hooks/useTokenList/useQueryTokens.ts->src/hooks/useDebounce.ts + + + + + +src/hooks/useTokenList/useQueryTokens.ts->src/hooks/useTokenList/filtering.ts + + + + + +src/hooks/useTokenList/useQueryTokens.ts->src/state/lists/wrappedTokenInfo.ts + + + + + +src/hooks/useTokenList/sorting.ts + + +sorting.ts + + + + + +src/hooks/useTokenList/useQueryTokens.ts->src/hooks/useTokenList/sorting.ts + + + + + +src/hooks/useTokenList/utils.ts->src/state/lists/wrappedTokenInfo.ts + + + + + +src/hooks/useTokenList/validateTokenList.test.ts + + +validateTokenList.test.ts + + + + + +src/hooks/useTokenList/validateTokenList.test.ts->src/hooks/useTokenList/validateTokenList.ts + + + + + +src/hooks/useUniversalRouter.ts + + +useUniversalRouter.ts + + + + + +src/hooks/useUniversalRouter.ts->src/state/routing/types.ts + + + + + +src/hooks/useUniversalRouter.ts->src/hooks/usePermitAllowance.ts + + + + + +src/state/routing/utils.test.ts + + +utils.test.ts + + + + + +src/state/routing/utils.test.ts->src/state/routing/utils.ts + + + + + +src/state/routing/utils.test.ts->src/constants/tokens.ts + + + + + +src/state/routing/utils.test.ts->src/test/utils.ts + + + + + +src/theme/dynamic.tsx->src/theme/theme.ts + + + + + +src/theme/external.ts->src/theme/theme.ts + + + + + +src/widgets.d.ts + + +widgets.d.ts + + + + + diff --git a/e2e/connect.test.tsx b/e2e/connect.test.tsx index 2ceae32db..02590ff40 100644 --- a/e2e/connect.test.tsx +++ b/e2e/connect.test.tsx @@ -5,7 +5,7 @@ import '@ethersproject/providers' import 'jest-environment-hardhat' -import { SwapWidget } from 'index' +import { WidoWidget } from 'index' import React, { ReactElement } from 'react' import { cleanup, render, waitFor } from './test' @@ -39,20 +39,20 @@ describe('connect', () => { } describe('with no params', () => { - const ui = + const ui = itPromptsForWalletConnection(ui) itExpectsWidgetToBeEnabled(ui) }) describe('with jsonRpcUrlMap', () => { describe('with an array', () => { - const ui = + const ui = itPromptsForWalletConnection(ui) itExpectsWidgetToBeEnabled(ui) }) describe('with a singleton', () => { - const ui = + const ui = itPromptsForWalletConnection(ui) itExpectsWidgetToBeEnabled(ui) }) @@ -62,7 +62,7 @@ describe('connect', () => { // The real hardhat.provider relies on real timeouts when providing data. jest.useRealTimers() - const ui = + const ui = itExpectsWidgetToBeEnabled(ui) it('displays connected account chip', async () => { diff --git a/package.json b/package.json index 83f3f87eb..1fba863f0 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,12 @@ { - "name": "@uniswap/widgets", - "description": "Uniswap Interface", - "homepage": "https://github.com/Uniswap/widgets#readme", - "repository": "https://github.com/Uniswap/widgets", + "name": "wido-widget", + "description": "Wido widget", + "homepage": "https://github.com/widolabs/wido-widget#readme", + "repository": "https://github.com/widolabs/wido-widget", "files": [ - "dist" + "dist", + "src", + "docs" ], "types": "dist/index.d.ts", "main": "dist/cjs/index.cjs", @@ -24,6 +26,7 @@ "require": "./dist/fonts.css" } }, + "version": "1.3.1", "scripts": { "contracts:compile:abi": "typechain --target ethers-v5 --out-dir src/abis/types \"./src/abis/**/*.json\"", "contracts:compile:v3": "typechain --target ethers-v5 --out-dir src/types/v3 \"./node_modules/@uniswap/**/artifacts/contracts/**/*.json\"", @@ -37,13 +40,15 @@ "prepublishOnly": "yarn build", "start": "cosmos", "typecheck": "tsc -p tsconfig.json", - "prebuild": "tsc -p tsconfig.build.json", - "build": "rollup --config --failAfterWarnings", - "release": "semantic-release", + "prebuild": "tsc -p tsconfig.build.json && yarn docs", + "build": "rollup --config", "deduplicate": "yarn-deduplicate --strategy=highest", + "release": "semantic-release", "lint": "eslint .", "test": "jest src", - "test:e2e": "jest e2e" + "test:e2e": "jest e2e", + "docs": "typedoc --out docs src/index.tsx --excludePrivate --excludeInternal --readme none --sort source-order", + "docs:watch": "yarn docs --watch" }, "browserslist": { "production": [ @@ -59,6 +64,7 @@ }, "license": "GPL-3.0-or-later", "dependencies": { + "@argent/get-starknet": "^5.2.0", "@babel/runtime": ">=7.17.0", "@fontsource/ibm-plex-mono": "^4.5.1", "@fontsource/inter": "^4.5.1", @@ -74,20 +80,15 @@ "@uniswap/universal-router-sdk": "^1.3.4", "@uniswap/v2-sdk": "^3.0.1", "@uniswap/v3-sdk": "^3.8.2", - "@web3-react/core": "8.0.35-beta.0", - "@web3-react/eip1193": "8.0.26-beta.0", - "@web3-react/empty": "8.0.20-beta.0", - "@web3-react/metamask": "8.0.28-beta.0", - "@web3-react/network": "8.0.27-beta.0", - "@web3-react/types": "8.0.20-beta.0", - "@web3-react/url": "8.0.25-beta.0", - "@web3-react/walletconnect": "8.0.36-beta.0", + "@web3-react/core": "^6.1.9", + "@web3-react/injected-connector": "^6.0.7", "ajv": "^8.11.0", "ajv-formats": "^2.1.1", "cids": "^1.0.0", "ethers": "^5.6.1", "immer": "^9.0.6", - "jotai": "^1.3.7", + "jotai": "1.4.0", + "jotai-immer": "0.1.0", "jsbi": "^3.1.4", "make-plural": "^7.0.0", "ms.macro": "^2.0.0", @@ -100,18 +101,23 @@ "react": ">=17.0.1", "react-dom": ">=17.0.1", "react-feather": "^2.0.8", + "react-outside-click-handler": "^1.3.0", "react-popper": "^2.2.3", - "react-redux": ">=7.2.2", + "react-redux": "^8.0.5", "react-virtualized-auto-sizer": "^1.0.2", "react-window": "^1.8.5", "rebass": "^4.0.7", "redux": ">=4.1.2", "resize-observer-polyfill": "^1.5.1", "setimmediate": "^1.0.5", + "starknet": "^4.17.1", "styled-components": ">=5", "tiny-invariant": "^1.2.0", + "typedoc": "^0.23.25", "wcag-contrast": "^3.0.0", - "wicg-inert": "^3.1.1" + "web3": "^1.8.2", + "wicg-inert": "^3.1.1", + "wido": "^0.2.6" }, "peerDependencies": { "@babel/runtime": ">=7.17.0", @@ -137,6 +143,7 @@ "@lingui/macro": "^3.15.0", "@lingui/react": "^3.15.0", "@nomiclabs/hardhat-ethers": "^2.0.6", + "@rollup/plugin-alias": "^4.0.3", "@rollup/plugin-babel": "^5.3.0", "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-inject": "^4.0.4", @@ -160,6 +167,7 @@ "@types/qs": "^6.9.2", "@types/react": "^18", "@types/react-dom": "^18", + "@types/react-outside-click-handler": "^1.3.1", "@types/react-redux": "^7.1.16", "@types/react-virtualized-auto-sizer": "^1.0.0", "@types/react-window": "^1.8.2", @@ -178,6 +186,7 @@ "babel-plugin-macros": "^3.1.0", "babel-plugin-module-resolver": "^4.1.0", "babel-runtime": "^6.26.0", + "dependency-cruiser": "^12.7.0", "dotenv": "^16.0.1", "eslint": "^7.11.0", "eslint-config-prettier": "^6.11.0", diff --git a/rollup.config.js b/rollup.config.js index 1f1aee89f..20970f3c6 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -15,15 +15,15 @@ const svgr = require('@svgr/rollup') const { default: multi } = require('rollup-plugin-multi-input') const externals = require('rollup-plugin-node-externals') const sass = require('rollup-plugin-scss') - +const alias = require('@rollup/plugin-alias') const EXTENSIONS = ['.js', '.jsx', '.ts', '.tsx'] /** * This exports scheme works for nextjs and for CRA5. * * It will also work for CRA4 if you use direct imports: - * instead of `import { SwapWidget } from '@uniswap/widgets'`, - * `import { SwapWidget } from '@uniswap/widgets/dist/index.js'`. + * instead of `import { SwapWidget } from 'wido-widget'`, + * `import { SwapWidget } from 'wido-widget/dist/index.js'`. * I do not know why CRA4 does not seem to use exports for resolution. * * Note that chunks are enabled. This is so the tokenlist spec can be loaded async, @@ -40,10 +40,14 @@ const transpile = { return source.startsWith('@ethersproject/') }, plugins: [ + alias({ + entries: [{ find: '@uniswap/conedison/format', replacement: '@uniswap/conedison/format.js' }], + }), // Dependency resolution externals({ exclude: [ 'constants', + '@uniswap/conedison/format.js', /@lingui\/(core|react)/, // @lingui incorrectly exports esm, so it must be bundled in /\.json$/, // esm does not support JSON loading, so it must be bundled in ], // marks dependencies as external so they are not bundled inline diff --git a/src/assets/svg/aurora-logo.svg b/src/assets/svg/aurora-logo.svg new file mode 100644 index 000000000..a9171ca57 --- /dev/null +++ b/src/assets/svg/aurora-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svg/avalanche-logo.svg b/src/assets/svg/avalanche-logo.svg new file mode 100644 index 000000000..ac87f2758 --- /dev/null +++ b/src/assets/svg/avalanche-logo.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/assets/svg/bsc-logo.svg b/src/assets/svg/bsc-logo.svg new file mode 100644 index 000000000..75c89417e --- /dev/null +++ b/src/assets/svg/bsc-logo.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/svg/fantom-logo.svg b/src/assets/svg/fantom-logo.svg new file mode 100644 index 000000000..ee75a7a3e --- /dev/null +++ b/src/assets/svg/fantom-logo.svg @@ -0,0 +1,33 @@ + + + + + + + + + + fa + + + + + + + + + diff --git a/src/assets/svg/logo.svg b/src/assets/svg/logo.svg index 3bd07e1b1..7158de5d6 100644 --- a/src/assets/svg/logo.svg +++ b/src/assets/svg/logo.svg @@ -1,13 +1,6 @@ - - - - - - - - - - - - + + + diff --git a/src/assets/svg/starknet-logo.svg b/src/assets/svg/starknet-logo.svg new file mode 100644 index 000000000..ed7129cba --- /dev/null +++ b/src/assets/svg/starknet-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/BrandedFooter.tsx b/src/components/BrandedFooter.tsx index 0b1825cbe..4481a48fd 100644 --- a/src/components/BrandedFooter.tsx +++ b/src/components/BrandedFooter.tsx @@ -3,7 +3,7 @@ import Row from 'components/Row' import { Logo } from 'icons' import { memo } from 'react' import styled from 'styled-components/macro' -import { AnimationSpeed, brand, ThemedText } from 'theme' +import { ThemedText } from 'theme' import ExternalLink from './ExternalLink' @@ -13,16 +13,8 @@ const UniswapA = styled(ExternalLink)` text-decoration: none; ${Logo} { - fill: ${({ theme }) => theme.secondary}; height: 1em; - transition: transform ${AnimationSpeed.Medium} ease, fill ${AnimationSpeed.Medium} ease; width: 1em; - will-change: transform; - } - - :hover ${Logo} { - fill: ${brand}; - transform: rotate(-5deg); } ` const Wrapper = styled(Row)` @@ -32,11 +24,11 @@ const Wrapper = styled(Row)` export default memo(function BrandedFooter() { return ( - + - Powered by the Uniswap protocol + Powered by Wido diff --git a/src/components/Column.tsx b/src/components/Column.tsx index 47cb75f41..19bce8a74 100644 --- a/src/components/Column.tsx +++ b/src/components/Column.tsx @@ -10,6 +10,7 @@ export interface ColumnProps { flex?: true grow?: true css?: ReturnType + width?: string } const Column = styled.div` @@ -23,6 +24,7 @@ const Column = styled.div` grid-template-columns: 1fr; justify-content: ${({ justify }) => justify ?? 'space-between'}; padding: ${({ padded }) => padded && '0.75em'}; + width: ${({ width }) => width ?? 'auto'}; ${({ css }) => css} ` diff --git a/src/components/ConnectWallet/ConnectWalletDialog.tsx b/src/components/ConnectWallet/ConnectWalletDialog.tsx deleted file mode 100644 index 8430176ad..000000000 --- a/src/components/ConnectWallet/ConnectWalletDialog.tsx +++ /dev/null @@ -1,158 +0,0 @@ -import { Trans } from '@lingui/macro' -import { Connector } from '@web3-react/types' -import METAMASK_ICON_URL from 'assets/images/metamaskIcon.png' -import WALLETCONNECT_ICON_URL from 'assets/images/walletConnectIcon.svg' -import Button from 'components/Button' -import Column from 'components/Column' -import { Header } from 'components/Dialog' -import Row from 'components/Row' -import useConnectors from 'hooks/web3/useConnectors' -import { useCallback, useEffect, useState } from 'react' -import styled from 'styled-components/macro' -import { lightTheme, ThemedText } from 'theme' -import { WalletConnectQR } from 'utils/WalletConnect' - -const NO_WALLET_HELP_CENTER_URL = 'https://help.uniswap.org/en/articles/5391585-how-to-get-a-wallet' - -const Body = styled(Column)` - display: grid; - gap: 12px; - grid-template-columns: repeat(2, calc(50% - 0.5em / 2)); - grid-template-rows: 2fr 1fr; - height: calc(100% - 2.5em); -` - -const StyledButtonContents = styled(Column)` - gap: 0.75em; - justify-items: center; -` - -const StyledMainButton = styled(Button)` - border-radius: ${({ theme }) => theme.borderRadius.small}em; - grid-column: 1 / 3; - height: 100%; - padding: 22px; -` - -const StyledMainButtonRow = styled(Row)` - grid-template-columns: repeat(2, calc(50% - 1em / 2)); - justify-items: center; -` - -const StyledSmallButton = styled(Button)` - border-radius: ${({ theme }) => theme.borderRadius.small}em; - height: 88px; - padding: 16px; -` - -const StyledNoWalletText = styled(ThemedText.Subhead1)` - line-height: 20px; - white-space: pre-wrap; -` - -const QRCodeWrapper = styled.div` - height: 110px; - width: 110px; - path { - /* Maximize contrast: transparent in light theme, otherwise hard-coded to light theme. */ - fill: ${({ theme }) => (theme.container === lightTheme.container ? '#00000000' : lightTheme.container)}; - } -` - -function ButtonContents({ walletName, logoSrc, caption }: ButtonProps) { - return ( - - {walletName} - {walletName} - {caption && ( - - {caption} - - )} - - ) -} - -interface ButtonProps { - walletName?: string - logoSrc?: string - caption?: string - onClick?: () => void -} - -function WalletConnectButton({ - walletName, - logoSrc, - walletConnectQR: walletConnect, - onClick, -}: ButtonProps & { walletConnectQR: WalletConnectQR }) { - const [svg, setSvg] = useState(walletConnect.svg) - useEffect(() => { - if (!svg) walletConnect.activate() - - walletConnect.events.on(WalletConnectQR.SVG_AVAILABLE, setSvg) - return () => { - walletConnect.events.off(WalletConnectQR.SVG_AVAILABLE, setSvg) - } - }, [svg, walletConnect]) - - return ( - - - - {svg && } - - - ) -} - -function MetaMaskButton({ walletName, logoSrc, onClick }: ButtonProps) { - return ( - - - - ) -} - -function NoWalletButton() { - return ( - window.open(NO_WALLET_HELP_CENTER_URL)}> - - {`I don't have a wallet`} - - - ) -} - -export function ConnectWalletDialog() { - const connectors = useConnectors() - const onActivate = useCallback(async (connector: Connector) => { - try { - await connector.activate() - } catch (error) {} - }, []) - - return ( - <> -
Connect wallet} /> - - onActivate(connectors.walletConnect)} - /> - onActivate(connectors.metaMask)} - /> - - - - ) -} diff --git a/src/components/ConnectWallet/ConnectedWalletChip.tsx b/src/components/ConnectWallet/ConnectedWalletChip.tsx deleted file mode 100644 index e8dc61592..000000000 --- a/src/components/ConnectWallet/ConnectedWalletChip.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { Trans } from '@lingui/macro' -import { useWeb3React } from '@web3-react/core' -import { TextButton } from 'components/Button' -import Row from 'components/Row' -import { WalletDisconnect as WalletDisconnectIcon } from 'icons' -import Identicon from 'icons/identicon' -import { useState } from 'react' -import styled from 'styled-components/macro' -import { ThemedText } from 'theme' - -const AccountButton = styled(TextButton)<{ hidden?: boolean }>` - filter: none; - visibility: ${({ hidden }) => (hidden ? 'hidden' : 'visible')}; -` - -export default function ConnectedWalletChip({ disabled, account }: { disabled?: boolean; account?: string }) { - const [hover, setHover] = useState(false) - const { connector } = useWeb3React() - - return ( - <> - - - ) -} diff --git a/src/components/ConnectWallet/index.tsx b/src/components/ConnectWallet/index.tsx deleted file mode 100644 index 627ebfb36..000000000 --- a/src/components/ConnectWallet/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { useWeb3React } from '@web3-react/core' - -import ConnectedWalletChip from './ConnectedWalletChip' - -interface WalletProps { - disabled?: boolean -} - -export default function Wallet({ disabled }: WalletProps) { - const { account, isActive } = useWeb3React() - if (!isActive || !Boolean(account)) { - return null - } - return -} diff --git a/src/components/Dialog.tsx b/src/components/Dialog.tsx index 1ea766671..9c731e2ca 100644 --- a/src/components/Dialog.tsx +++ b/src/components/Dialog.tsx @@ -2,7 +2,8 @@ import 'wicg-inert' import { globalFontStyles } from 'css/font' import { useOnEscapeHandler } from 'hooks/useOnEscapeHandler' -import { largeIconCss } from 'icons' +import { useLargeTokenSelect } from 'hooks/useSyncWidgetSettings' +import { largeIconCss, X } from 'icons' import { ArrowLeft } from 'icons' import ms from 'ms.macro' import { @@ -16,6 +17,7 @@ import { useState, } from 'react' import { createPortal } from 'react-dom' +import OutsideClickHandler from 'react-outside-click-handler' import styled, { keyframes } from 'styled-components/macro' import { AnimationSpeed, Color, Layer, Provider as ThemeProvider, ThemedText, TransitionDuration } from 'theme' import { useUnmountingAnimation } from 'utils/animations' @@ -88,13 +90,61 @@ const HeaderRow = styled(Row)` position: relative; ` -const StyledBackButton = styled(ArrowLeft)` +const slideInLeft = keyframes` + from { + transform: translateX(calc(100% - 0.25em)); + } +` +const slideOutLeft = keyframes` + to { + transform: translateX(calc(0.25em - 100%)); + } +` +const slideOutRight = keyframes` + to { + transform: translateX(calc(100% - 0.25em)); + } +` + +const fadeIn = keyframes` + from { + opacity: 0; + } +` +const fadeOut = keyframes` + to { + opacity: 1; + } +` + +const StyledBackButtonArrow = styled(ArrowLeft)` + :hover { + cursor: pointer; + opacity: 0.6; + } +` + +const StyledBackButtonCross = styled(X)` :hover { cursor: pointer; opacity: 0.6; } ` +const Backdrop = styled.div` + animation: ${fadeIn} ${AnimationSpeed.Slow} ease-out; + background-color: rgba(13, 17, 28, 0.6); + bottom: 0; + cursor: pointer; + height: 100%; + left: 0; + position: fixed; + right: 0; + top: 0; + width: 100%; + z-index: ${Layer.OVERLAY}; +` + const Title = styled.div` left: 50%; position: absolute; @@ -107,9 +157,12 @@ interface HeaderProps { export function Header({ title }: HeaderProps) { const onClose = useCloseDialog() + const largeTokenSelect = useLargeTokenSelect() + const ButtonComponent = largeTokenSelect ? StyledBackButtonCross : StyledBackButtonArrow + return ( - + <ThemedText.Subhead1>{title}</ThemedText.Subhead1> @@ -133,24 +186,7 @@ export const Modal = styled.div<{ color: Color }>` z-index: ${Layer.DIALOG}; ` -const slideInLeft = keyframes` - from { - transform: translateX(calc(100% - 0.25em)); - } -` -const slideOutLeft = keyframes` - to { - transform: translateX(calc(0.25em - 100%)); - } -` -const slideOutRight = keyframes` - to { - transform: translateX(calc(100% - 0.25em)); - } -` - const HiddenWrapper = styled.div` - border-radius: ${({ theme }) => theme.borderRadius}em; height: 100%; left: 0; overflow: hidden; @@ -163,8 +199,22 @@ const HiddenWrapper = styled.div` overflow: clip; } ` +const LargeHiddenWrapper = styled.div` + left: -2px; + max-height: 72vh; + min-height: 72vh; + overflow: hidden; + padding: 0.5em; + position: absolute; + top: -2px; + width: calc(100% + 4px); + + @supports (overflow: clip) { + overflow: clip; + } +` -const AnimationWrapper = styled.div` +const SlideInAnimationWrapper = styled.div` ${Modal} { animation: ${slideInLeft} ${AnimationSpeed.Medium} ease-in; @@ -177,6 +227,13 @@ const AnimationWrapper = styled.div` } ` +const NoAnimationWrapper = styled.div` + ${Modal} { + border: 1px solid ${({ theme }) => theme.outline}; + border-radius: ${({ theme }) => theme.borderRadius.large}em; + } +` + // Accounts for any animation lag const PopoverAnimationUpdateDelay = ms`100` @@ -189,13 +246,17 @@ function AnimatedPopoverProvider({ children }: PropsWithChildren) { setUpdatePopover(true) }, TransitionDuration.Medium + PopoverAnimationUpdateDelay) }, []) + const largeTokenSelect = useLargeTokenSelect() + + const AnimationComponent = largeTokenSelect ? NoAnimationWrapper : SlideInAnimationWrapper + const WrapperComponent = largeTokenSelect ? LargeHiddenWrapper : HiddenWrapper return (
- - {children} - + + {children} +
) @@ -223,6 +284,7 @@ export default function Dialog({ color, children, onClose }: DialogProps) { }) useOnEscapeHandler(onClose) + const largeTokenSelect = useLargeTokenSelect() return ( context.element && @@ -230,9 +292,28 @@ export default function Dialog({ color, children, onClose }: DialogProps) { - - {children} - + {largeTokenSelect ? ( + <> + + { + // eslint-disable-next-line @typescript-eslint/no-empty-function + } + } + > + + {children} + + + + ) : ( + + {children} + + )} , diff --git a/src/components/EtherscanLink.tsx b/src/components/EtherscanLink.tsx index 125fda563..0c905ae31 100644 --- a/src/components/EtherscanLink.tsx +++ b/src/components/EtherscanLink.tsx @@ -1,5 +1,5 @@ -import { useWeb3React } from '@web3-react/core' import { SupportedChainId } from 'constants/chains' +import { useEvmChainId } from 'hooks/useSyncWidgetSettings' import { Link } from 'icons' import { ReactNode, useMemo } from 'react' import styled from 'styled-components/macro' @@ -11,7 +11,6 @@ import Row from './Row' const StyledExternalLink = styled(ExternalLink)<{ color: Color }>` color: ${({ theme, color }) => theme[color]}; - text-decoration: none; ` interface EtherscanLinkProps { @@ -20,6 +19,7 @@ interface EtherscanLinkProps { color?: Color children: ReactNode showIcon?: boolean + chainIdOverride?: number } export default function EtherscanLink({ @@ -28,8 +28,10 @@ export default function EtherscanLink({ color = 'currentColor', children, showIcon = true, + chainIdOverride, }: EtherscanLinkProps) { - const { chainId } = useWeb3React() + const evmChainId = useEvmChainId() + const chainId = chainIdOverride || evmChainId const url = useMemo( () => data && getExplorerLink(chainId || SupportedChainId.MAINNET, data, type), [chainId, data, type] diff --git a/src/components/RouteBreakdown.tsx b/src/components/RouteBreakdown.tsx new file mode 100644 index 000000000..35a788a4f --- /dev/null +++ b/src/components/RouteBreakdown.tsx @@ -0,0 +1,176 @@ +import { Trans } from '@lingui/macro' +import { ReactComponent as DotLine } from 'assets/svg/dot_line.svg' +import Row from 'components/Row' +import { useChainTokenMapContext } from 'hooks/useTokenList' +import { NATIVE_ADDRESS, TokenListItem } from 'hooks/useTokenList/utils' +import { ChevronRight, HelpCircle } from 'icons' +import React, { ComponentProps, forwardRef, useState } from 'react' +import { WrappedTokenInfo } from 'state/lists/wrappedTokenInfo' +import styled from 'styled-components/macro' +import { Layer, ThemedText } from 'theme' +import { Body2LineHeightRem } from 'theme/type' +import { ExplorerDataType } from 'utils/getExplorerLink' +import { Step, ZERO_ADDRESS } from 'wido' + +import { IconButton } from './Button' +import Column from './Column' +import EtherscanLink from './EtherscanLink' +import Popover from './Popover' +import Rule from './Rule' +import TokenImg from './TokenImg' +import { useTooltip } from './Tooltip' + +export const RouteSummary = styled(ThemedText.Body2)` + align-items: center; + color: ${({ theme, color }) => color ?? theme.primary}; + display: flex; +` + +export const ForwardedRow = forwardRef>(function ForwardedRow(props, ref) { + return +}) + +const RouteNode = styled(Row)` + background-color: ${({ theme }) => theme.interactive}; + border-radius: ${({ theme }) => `${(theme.borderRadius.medium ?? 1) * 0.5}em`}; + margin: 0 1em; + margin-bottom: 1rem; + padding: 0.25em 0.375em; + width: max-content; +` +// const RouteBadge = styled.div` +// background-color: ${({ theme }) => theme.module}; +// border-radius: ${({ theme }) => `${(theme.borderRadius.medium ?? 1) * 0.25}em`}; +// padding: 0.125em; +// ` + +const Dots = styled(DotLine)` + color: ${({ theme }) => theme.outline}; + margin-bottom: 1rem; + position: absolute; + z-index: ${Layer.UNDERLAYER}; +` + +const ExpandButton = styled(IconButton)` + margin-left: 0.5em; +` + +const CONTAINER_VERTICAL_PADDING_EM = 1 +export const ORDER_ROUTING_HEIGHT_EM = CONTAINER_VERTICAL_PADDING_EM * 2 + Body2LineHeightRem /* Body2 line height */ + +const OrderRoutingRow = styled(Row)` + height: ${ORDER_ROUTING_HEIGHT_EM}em; + margin: 0 1em; + padding: ${CONTAINER_VERTICAL_PADDING_EM}em 0; +` +const TokenInfoContainer = styled(Column)`` + +export function getToken(chainTokenMap: any, chainId: any, address: any): TokenListItem { + const actualAddress = address === ZERO_ADDRESS ? NATIVE_ADDRESS : address + return chainTokenMap[chainId][actualAddress].token +} + +export function ExpandedRouteBreakdown(props: { steps: Step[]; chainTokenMap: any; gasLabel: string }) { + const { steps, chainTokenMap, gasLabel } = props + return ( + + + {steps.map((step, index) => { + return ( + + {index === 0 && ( + + + + {getToken(chainTokenMap, step.chainId, step.fromToken).symbol} + + + )} + + + + {step.protocol} + {/* + {step.functionName} + */} + + + + + {getToken(chainTokenMap, step.toChainId, step.toToken).symbol} + + + ) + })} + + + + + Best price route costs {gasLabel} in gas. Your price is optimized by considering split routes, multiple hops, + and gas costs. + + + + ) +} + +export function RouteBreakdown(props: { steps: Step[]; gasLabel: string }) { + const { steps, gasLabel } = props + + const chainTokenMap = useChainTokenMapContext() + const [tooltip, setTooltip] = useState(null) + const showTooltip = useTooltip(tooltip) + + return ( + + + Route preview + + } + show={showTooltip} + placement="bottom" + offset={12} + > + + + {steps.map((step, index) => { + const fromToken = getToken(chainTokenMap, step.chainId, step.fromToken) + const toToken = getToken(chainTokenMap, step.toChainId, step.toToken) + + return ( + + {index === 0 && ( + + {fromToken.symbol} + + )} + + + {toToken.symbol} + + + ) + })} + {/* */} + + + + + + ) +} diff --git a/src/components/Row.tsx b/src/components/Row.tsx index b909df8f6..fdec4c234 100644 --- a/src/components/Row.tsx +++ b/src/components/Row.tsx @@ -12,6 +12,7 @@ export interface RowProps { grow?: true | 'first' | 'last' children?: ReactNode theme: Theme + width?: string } const Row = styled.div` @@ -30,6 +31,7 @@ const Row = styled.div` }}; justify-content: ${({ justify }) => justify ?? 'space-between'}; padding: ${({ pad }) => pad && `0 ${pad}em`}; + width: ${({ width }) => width ?? 'auto'}; ` export default Row diff --git a/src/components/Swap/Input.tsx b/src/components/Swap/Input.tsx index b81012195..9f071739f 100644 --- a/src/components/Swap/Input.tsx +++ b/src/components/Swap/Input.tsx @@ -2,18 +2,23 @@ import { t, Trans } from '@lingui/macro' import { formatCurrencyAmount, NumberType } from '@uniswap/conedison/format' import { Currency, CurrencyAmount } from '@uniswap/sdk-core' import { TextButton } from 'components/Button' +import EtherscanLink from 'components/EtherscanLink' import { loadingTransitionCss } from 'css/loading' import { useIsSwapFieldIndependent, useSwapAmount, useSwapCurrency, useSwapInfo } from 'hooks/swap' import { SwapApprovalState } from 'hooks/swap/useSwapApproval' import { useIsWrap } from 'hooks/swap/useWrapCallback' import { usePrefetchCurrencyColor } from 'hooks/useCurrencyColor' +import usePresetCurrency from 'hooks/usePresetCurrency' import { PriceImpact } from 'hooks/usePriceImpact' +import { useWidgetFromToken } from 'hooks/useSyncWidgetSettings' import { useIsWideWidget } from 'hooks/useWidgetWidth' -import { MouseEvent, useCallback, useMemo, useRef, useState } from 'react' +import { MouseEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { WrappedTokenInfo } from 'state/lists/wrappedTokenInfo' import { TradeState } from 'state/routing/types' import { Field } from 'state/swap' import styled from 'styled-components/macro' import { AnimationSpeed, ThemedText } from 'theme' +import { ExplorerDataType } from 'utils/getExplorerLink' import { maxAmountSpend } from 'utils/maxAmountSpend' import Column from '../Column' @@ -86,6 +91,8 @@ interface FieldWrapperProps { approved?: boolean impact?: PriceImpact subheader: string + presetCurrency?: Currency + showBalance: boolean } export function FieldWrapper({ @@ -95,6 +102,8 @@ export function FieldWrapper({ impact, className, subheader, + presetCurrency, + showBalance, }: FieldWrapperProps & { className?: string }) { const { [field]: { balance, amount: currencyAmount, usdc }, @@ -106,6 +115,12 @@ export function FieldWrapper({ const [currency, updateCurrency] = useSwapCurrency(field) const isWideWidget = useIsWideWidget() + useEffect(() => { + if (presetCurrency) { + updateCurrency(presetCurrency) + } + }, [presetCurrency, updateCurrency]) + const wrapper = useRef(null) const [input, setInput] = useState(null) const onClick = useCallback( @@ -120,7 +135,7 @@ export function FieldWrapper({ // extract eagerly in case of reversal usePrefetchCurrencyColor(currency) - const isDisabled = error !== undefined + const isDisabled = false //error !== undefined const isRouteLoading = isDisabled || tradeState === TradeState.LOADING const isDependentField = !useIsSwapFieldIndependent(field) const isLoading = isRouteLoading && isDependentField @@ -147,6 +162,22 @@ export function FieldWrapper({ > {subheader} + {balance && ( + + {showBalance && ( + + Balance: {formatCurrencyAmount(balance)} + + )} + {maxAmount && ( + + + Max + + + )} + + )} + + {currency?.name} + {usdc && `${formatCurrencyAmount(usdc, NumberType.FiatTokenQuantity)}`} {impact && ( @@ -169,20 +209,6 @@ export function FieldWrapper({ )} - {balance && ( - - - Balance: {formatCurrencyAmount(balance)} - - {maxAmount && ( - - - Max - - - )} - - )} @@ -205,12 +231,17 @@ export default function Input() { return max.toExact() }, [balance, currencyAmount]) + const fromToken = useWidgetFromToken() + const presetCurrency = usePresetCurrency(fromToken?.chainId, fromToken?.address) + return ( ) } diff --git a/src/components/Swap/Output.tsx b/src/components/Swap/Output.tsx index 77b417f1c..0d12b99e3 100644 --- a/src/components/Swap/Output.tsx +++ b/src/components/Swap/Output.tsx @@ -1,6 +1,8 @@ import { t } from '@lingui/macro' import { useSwapCurrency, useSwapInfo } from 'hooks/swap' import useCurrencyColor from 'hooks/useCurrencyColor' +import usePresetCurrency from 'hooks/usePresetCurrency' +import { useWidgetToToken } from 'hooks/useSyncWidgetSettings' import { useIsWideWidget } from 'hooks/useWidgetWidth' import { atom } from 'jotai' import { useAtomValue } from 'jotai/utils' @@ -40,6 +42,9 @@ export default function Output() { // different state true/null/false allow smoother color transition const hasColor = currency ? Boolean(color) || null : false + const toToken = useWidgetToToken() + const presetCurrency = usePresetCurrency(toToken?.chainId, toToken?.address) + return ( ) diff --git a/src/components/Swap/Price.tsx b/src/components/Swap/Price.tsx index d01e5f096..e20f988b7 100644 --- a/src/components/Swap/Price.tsx +++ b/src/components/Swap/Price.tsx @@ -2,13 +2,13 @@ import { formatCurrencyAmount, formatPrice, NumberType } from '@uniswap/conediso import { Currency, CurrencyAmount } from '@uniswap/sdk-core' import Row from 'components/Row' import { useCallback, useMemo, useState } from 'react' -import { InterfaceTrade } from 'state/routing/types' +import { WidoTrade } from 'state/routing/types' import { ThemedText } from 'theme' import { TextButton } from '../Button' export function useTradeExchangeRate( - trade: InterfaceTrade, + trade: WidoTrade, outputUSDC?: CurrencyAmount, base: 'input' | 'output' = 'input' ): [string, string | undefined] { @@ -42,7 +42,7 @@ export function useTradeExchangeRate( } interface PriceProps { - trade: InterfaceTrade + trade: WidoTrade outputUSDC?: CurrencyAmount } diff --git a/src/components/Swap/ReverseButton.tsx b/src/components/Swap/ReverseButton.tsx index b9acb3427..ce2d757be 100644 --- a/src/components/Swap/ReverseButton.tsx +++ b/src/components/Swap/ReverseButton.tsx @@ -1,4 +1,3 @@ -import { useSwapInfo, useSwitchSwapCurrencies } from 'hooks/swap' import { LargeIcon, Reverse } from 'icons' import styled from 'styled-components/macro' import { Layer } from 'theme' @@ -25,16 +24,19 @@ const StyledReverseButton = styled(Button)` display: flex; justify-content: center; width: 100%; + :disabled { + filter: opacity(1); + } ` export default function ReverseButton() { - const { error } = useSwapInfo() - const isDisabled = error !== undefined - const switchCurrencies = useSwitchSwapCurrencies() + // const { error } = useSwapInfo() + // const isDisabled = error !== undefined + // const switchCurrencies = useSwitchSwapCurrencies() return ( - + diff --git a/src/components/Swap/RoutingDiagram/index.tsx b/src/components/Swap/RoutingDiagram/index.tsx index 1c725680a..0cd53880a 100644 --- a/src/components/Swap/RoutingDiagram/index.tsx +++ b/src/components/Swap/RoutingDiagram/index.tsx @@ -9,7 +9,7 @@ import Rule from 'components/Rule' import TokenImg from 'components/TokenImg' import { AutoRouter } from 'icons' import { ComponentProps, forwardRef, useMemo } from 'react' -import { InterfaceTrade } from 'state/routing/types' +import { WidoTrade } from 'state/routing/types' import styled from 'styled-components/macro' import { Layer, ThemedText } from 'theme' @@ -136,7 +136,7 @@ export default function RoutingDiagram({ gasUseEstimateUSD, hideHeader, }: { - trade: InterfaceTrade + trade: WidoTrade gasUseEstimateUSD?: CurrencyAmount | null hideHeader?: boolean }) { diff --git a/src/components/Swap/RoutingDiagram/utils.ts b/src/components/Swap/RoutingDiagram/utils.ts index 5902f8e5e..e31cc87a7 100644 --- a/src/components/Swap/RoutingDiagram/utils.ts +++ b/src/components/Swap/RoutingDiagram/utils.ts @@ -1,9 +1,9 @@ import { Protocol } from '@uniswap/router-sdk' import { Currency, Percent } from '@uniswap/sdk-core' import { FeeAmount } from '@uniswap/v3-sdk' -import { InterfaceTrade } from 'state/routing/types' -import { getFeeAmount } from 'utils/prices' -import { isExactInput } from 'utils/tradeType' +import { WidoTrade } from 'state/routing/types' +// import { getFeeAmount } from 'utils/prices' +// import { isExactInput } from 'utils/tradeType' export interface RoutingDiagramEntry { percent: Percent @@ -14,24 +14,25 @@ export interface RoutingDiagramEntry { /** * Loops through all routes on a trade and returns an array of diagram entries. */ -export function getTokenPath(trade: InterfaceTrade): RoutingDiagramEntry[] { - return trade.swaps.map(({ route: { path: tokenPath, pools, protocol }, inputAmount, outputAmount }) => { - const portion = isExactInput(trade.tradeType) - ? inputAmount.divide(trade.inputAmount) - : outputAmount.divide(trade.outputAmount) - const percent = new Percent(portion.numerator, portion.denominator) - const path: RoutingDiagramEntry['path'] = [] - for (let i = 0; i < pools.length; i++) { - const nextPool = pools[i] - const tokenIn = tokenPath[i] - const tokenOut = tokenPath[i + 1] - const entry: RoutingDiagramEntry['path'][0] = [tokenIn, tokenOut, getFeeAmount(nextPool)] - path.push(entry) - } - return { - percent, - path, - protocol, - } - }) +export function getTokenPath(trade: WidoTrade): RoutingDiagramEntry[] { + return [] + // return trade.swaps.map(({ route: { path: tokenPath, pools, protocol }, inputAmount, outputAmount }) => { + // const portion = isExactInput(trade.tradeType) + // ? inputAmount.divide(trade.inputAmount) + // : outputAmount.divide(trade.outputAmount) + // const percent = new Percent(portion.numerator, portion.denominator) + // const path: RoutingDiagramEntry['path'] = [] + // for (let i = 0; i < pools.length; i++) { + // const nextPool = pools[i] + // const tokenIn = tokenPath[i] + // const tokenOut = tokenPath[i + 1] + // const entry: RoutingDiagramEntry['path'][0] = [tokenIn, tokenOut, getFeeAmount(nextPool)] + // path.push(entry) + // } + // return { + // percent, + // path, + // protocol, + // } + // }) } diff --git a/src/components/Swap/Settings/MaxSlippageSelect.tsx b/src/components/Swap/Settings/MaxSlippageSelect.tsx index 363400498..08c4afa55 100644 --- a/src/components/Swap/Settings/MaxSlippageSelect.tsx +++ b/src/components/Swap/Settings/MaxSlippageSelect.tsx @@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro' import Expando from 'components/Expando' import Popover from 'components/Popover' import { useTooltip } from 'components/Tooltip' -import { getSlippageWarning, toPercent } from 'hooks/useSlippage' +import { DEFAULT_SLIPPAGE_PERCENT, getSlippageWarning, toPercent } from 'hooks/useSlippage' import { AlertTriangle, Check, Icon, LargeIcon, XOctagon } from 'icons' import { useAtom } from 'jotai' import { useAtomValue } from 'jotai/utils' @@ -18,6 +18,8 @@ import { DecimalInput, inputCss } from '../../Input' import Row from '../../Row' import { Label, optionCss } from './components' +const DEFAULT_SLIPPAGE_LABEL = `${DEFAULT_SLIPPAGE_PERCENT.toFixed(0)}%` + const Button = styled(TextButton)<{ selected: boolean }>` ${({ selected }) => optionCss(selected)} ` @@ -94,7 +96,7 @@ export default function MaxSlippageSelect() { }, [onSlippageChange, setSlippageBase] ) - const setAutoSlippage = useCallback(() => setSlippage({ ...slippage, auto: true }), [setSlippage, slippage]) + const setDefaultSlippage = useCallback(() => setSlippage({ ...slippage, default: true }), [setSlippage, slippage]) const [maxSlippageInput, setMaxSlippageInput] = useState(slippage.max?.toString() || '') const option = useRef(null) @@ -113,8 +115,8 @@ export default function MaxSlippageSelect() { focus() const percent = toPercent(slippage.max) const warning = getSlippageWarning(percent) - const auto = !percent || warning === 'error' - setSlippage({ ...slippage, auto }) + const isDefault = !percent || warning === 'error' + setSlippage({ ...slippage, default: isDefault }) }, [focus, slippage, setSlippage]) const processInput = useCallback( @@ -122,8 +124,8 @@ export default function MaxSlippageSelect() { setMaxSlippageInput(max || '') const percent = toPercent(max) const warning = getSlippageWarning(percent) - const auto = !percent || warning === 'error' - setSlippage({ auto, max }) + const isDefault = !percent || warning === 'error' + setSlippage({ default: isDefault, max }) }, [setSlippage] ) @@ -147,20 +149,25 @@ export default function MaxSlippageSelect() { /> } - iconPrefix={slippage.auto ? Auto : `${maxSlippageInput}%`} + iconPrefix={slippage.default ? {DEFAULT_SLIPPAGE_LABEL} : `${maxSlippageInput}%`} maxHeight={5} open={open} onExpand={() => setOpen(!open)} > -