Skip to content

Commit

Permalink
chore: merge widgets work into main (gnosis/cowswap#3065)
Browse files Browse the repository at this point in the history
* feat: design system (gnosis/cowswap#2622)

* refactor: mv setInterval to lib (gnosis/cowswap#2621)

* chore: widget tooling (gnosis/cowswap#2620)

* chore: remove global styles from cosmos viewer

* chore: add generated svgs to bundle

* chore: alias lib within lib

* feat: widgets swap settings and arch (gnosis/cowswap#2629)

* style: update theme

* feat: grid-based row/column

* feat: widget/modal arch

* feat: tooltip arch

* feat: atoms arch

* feat: swap settings

* chore: update deps

* fix: input width

* refactor: modularize Tooltip

* feat: add grow to Row

* style: true prop

* refactor: clean NumericInput

* fix: customizable data structure

* chore: sort styled-components

* fix: import ReactNode

* fix: svgr index generation

* chore: run tests on widgets (gnosis/cowswap#2635)

* chore: widgets nits (gnosis/cowswap#2636)

* fix: restrict type color to theme

* feat: add types

* fix: input width

* fix: header divider

* fix: eslint

* fix: color name

* fix: use inputs for a11y (gnosis/cowswap#2646)

* fix: clearable customizable

* feat: accent hovered select option

* feat: custom slippage color

* fix: use buttons for a11y

* fix: widgets styles (gnosis/cowswap#2654)

* style: add body1

* refactor: modularize theme/components

* refactor: modularize all text Input

* fix: toggle opacity

* test: fixture arch

* feat: rm gas price select

* fix: toggle styles/strings

* feat: mock toggle

* fix: dialog overflow clipping

* fix: mix-blend-mode for safari

* fix: clip-path for safari svg

* fix: mock toggle content

* fix: input margin

* fix: input and cursor

* fix: validate . input

* fix: unused useMemo

* feat: widgets empty state (gnosis/cowswap#2657)

* refactor: TextButton

* feat: inline icons

* feat: swap empty state

* feat: define TokenSelect

* fix: always inline icons

* feat: recent transactions (gnosis/cowswap#2661)

* feat: wallet button

* fix: tx deps

* feat: widgets token select (gnosis/cowswap#2685)

* fix: line height of 1

* fix: button margin

* fix: update styles

* feat: token select

* refactor: mocks and types

* feat: close dialog on esc

* feat: focus input on token select

* refactor: layer swap elements

* feat: use token color

* fix: widget theme

* fix: use vibrant

* chore: lodash types

* fix: fixture props

* feat: smoother color extraction

* fix: vibrant dep

* perf: extract input token color too

* feat: eased token background

* feat: token color prefetching

* chore: mv polished to deps

* chore: package management

* fix: token background transition

* fix: better color transitions

* feat: widgets UI (gnosis/cowswap#2742)

* feat: add swap states

* fix: widget-global box-sizing

* feat: desaturate and opacity on token approval

* feat: red balance on balance insufficient

* fix: states

* feat: action button

* refactor: action button

* feat: loading spinner border

* fix: typescript errors

* fix: token color transition

* fix: unused typings

* feat: swap summary sans tooltip

* refactor: swap state

* feat: swap summary

* refactor: simpler swap names

* fix: cutoffs around footer

* refactor: recent txs

* refactor: buttons

* feat: tx status

* fix: consistent formatting

* feat: tx error

* test: tx error

* test: widget decorator

* style: theming

* fix: clean up dialogs

* fix: clean up swap

* fix: clean up overlays

* fix: action button text on hover

* fix: pickAtom

* fix: pickAtom typings

* fix: smoother error transition

* feat: enter for toggle

* fix: select tabbing

* refactor: simplify dialogs

* feat: widgets polish (gnosis/cowswap#2757)

* fix: loading spinner fallback for safari

* fix: use border for focus

* refactor: token options

* fix: use react toggle event

* fix: token select

* fix: inert content when modal

* fix: windowed token select

* chore: mv windowing utils to deps

* fix: windowing with no rerender

* feat: widget i18n (gnosis/cowswap#2765)

* feat: configure widget i18n

* i18n: wrap translatable strings in macros

* fix: rm lib/locales

* refactor: t to trans

* feat: cosmos locale selector

* chore: widgets nits (gnosis/cowswap#2786)

* fix: tooltip color

* fix: tx ttl tooltip

* fix: tooltip positioning

* fix: token list padding top

* style: responsive tx

* nit: fix summary copy

* chore: change byline

* feat(widgets): add new @web3-react cosmos decorator (gnosis/cowswap#2799)

 add new @web3-react cosmos decorator and provider api to widget

* feat: token color mock (gnosis/cowswap#2878)

* chore: merge main into widgets (gnosis/cowswap#2893)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: center focused outline card (gnosis/cowswap#2625)

* fix: add usdc to arbitrum/optimism common bases (gnosis/cowswap#2641)

* remove WETH from optimism bases (gnosis/cowswap#2640)

* use l2 logos in base pairs (gnosis/cowswap#2634)

* fix: split calls into more chunks if they fail due to out of gas errors (gnosis/cowswap#2630)

* fix: split calls into more chunks if they fail due to out of gas errors

* set to 100m gas

* back to 25m so we batch fewer calls

* do not pass through gas limit, some simplification of the code

* unused import

* fix: restrict @davatar usage to avoid 3p fetches (gnosis/cowswap#2649)

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): ensure chainIds match before fetching pool data (gnosis/cowswap#2652)

* ensure chainIds match before fetching pool data

* debounce both input currencies, and only look for pairs on currencies that share a chainId

* pr feedback

* fix: use optional operator for chainId (gnosis/cowswap#2666)

* chore: update token list (gnosis/cowswap#2670)

* update token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: update token list (gnosis/cowswap#2671)

* update token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: extend privacy and terms (gnosis/cowswap#2623)

* initial iteration

* add logging

* added hook

* polish

* remove unused import

* add hash

* addressed pr feedback

* remove autorouter icon

* use firebase store

* style

* adjust recat ga

* log remove liquidity

* update copy

* addressed pr feedback

* addressed pr feedback

* prevent privacy content from dismissing modal

* make top-level key origin

* use hostname

* restore trm

* chore(i18n): synchronize translations from crowdin [skip ci]

* log full signed tx (gnosis/cowswap#2681)

* refactor monitoring (gnosis/cowswap#2682)

* chore: set final privacy learn more link' (gnosis/cowswap#2684)

* add learn more button

* add final link

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: back arrow bug in wallet modal and fill tx for wallet (gnosis/cowswap#2687)

* add tx to wallet connect

* remove id from env

* restore env

* block import of unsupported tokens (gnosis/cowswap#2673)

generalize custom import token block ui

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(deps-dev): bump @uniswap/token-lists (gnosis/cowswap#2699)

* chore(i18n): synchronize translations from crowdin [skip ci]

* try out 'dimension1' (gnosis/cowswap#2704)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: walletconnect modal re-open after user rejection (gnosis/cowswap#2693)

Co-authored-by: M0kY <[email protected]>

* chore: update unsupported token list (gnosis/cowswap#2689)

* chore: update unsupported token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: memoize the list stuff so the tokens are consistently clickable (gnosis/cowswap#2724)

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: update cmc list link (gnosis/cowswap#2710)

* update cmc lists

* update CMC url

* add token to unsupported list (gnosis/cowswap#2732)

* don't overwrite localstorage lists when fetch throws (gnosis/cowswap#2723)

* try cd1 for custom dimension (gnosis/cowswap#2734)

* fix: Update walletlink-connector to 6.2.8 (gnosis/cowswap#2655)

* Update walletlink-connector to 6.2.5 which has a walletlink update to support addEthereumChain+switchEthereumChain requests

* Update walletlink-connector to 6.2.7

* Update walletlink-connector to 6.2.8

* fix: Parse latest proposal description correctly

* add proposal start time (gnosis/cowswap#2738)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: #2741 Increase liquidity form off center (gnosis/cowswap#2746)

* fix: bump to latest token list including ENS token

* fix: remove deprecated optimism status url (gnosis/cowswap#2771)

* feat: Menu update. Add help center & feature requests. Remove analytics & github. (gnosis/cowswap#2709)

* Add help center, remove analytics from menu

* Add canny feature requests link, remove github link

* add coffee icon

* no unused imports eslint rule (gnosis/cowswap#2773)

* chore(i18n): synchronize translations from crowdin [skip ci]

* add protocols param to quote endpoint (gnosis/cowswap#2774)

* add protocols param to quote endpoint

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: lint error (gnosis/cowswap#2775)

* fix(optimism): Optimism regenesis support (gnosis/cowswap#2703)

* feat(optimism): optimistic kovan local regenesis changes

* use the regenesis version of the sdk

* remove the override no longer necessary

* diff rpc url

* back to kovan url

* lint error

* Optimism mainnet regenesis test (gnosis/cowswap#2695)

* remove the optimism mainnet specific code and point to the mainnet regenesis rpc url

* point at the old mainnet multicall address

* bump the sdk version

* copy the list

* multicall address regenesis change

* revert the gas limit special casing for optimism

* bump the sdk version

* remove a couple other temporary edits

* unused test case

* specific version of v3-sdk

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: add support for 0.01% tier (gnosis/cowswap#2769)

* chore: add support for 0.01% tier

* only show 1bps on mainnet

* rename VERY_LOW to LOWEST

* upgrade to v3-sdk 3.7.0

* add snapshot testing for lowest tier

* fix integration test

* fix integration test

* use ALL_SUPPORTED_CHAIN_IDS over string all

* consider 0.01% tier in pool (gnosis/cowswap#2770)

* merge main and only consider lowest tier for mainnet

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): update block warning updater to check most recent block timestamp (gnosis/cowswap#2777)

* update block warning updater to check most recent block timestamp

* stop doing dumb state manipulation

* fix: copy in network alert

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): remove redux from chain connectivity (gnosis/cowswap#2781)

* remove redux from chain connectivity

* useMachineTimeMs instead of Date.now to force updates, useCurrentBlockTimestamp

* use useInterval

* change not created font size to 10 (gnosis/cowswap#2785)

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: format date using Date.toLocaleString (gnosis/cowswap#2459)

* fix: format date using Date.toLocaleString

Fixes #2458

* fix: date typings

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: broken link to docs (gnosis/cowswap#2816)

* chore: fix typo in useAllCurrencyCombinations.ts (gnosis/cowswap#2778)

occurence -> occurrence

* chore: update typechain scripts for Windows (gnosis/cowswap#2707)

There are two errors when deploying on Windows system:
1. Using single quotes in path argument doesn't seem to be accepted in typechain command
2. `?(v3-core|v3-periphery)` operator doesn't work

Here are fixes/workarounds.

* perf: lazy load vote related routes (gnosis/cowswap#2468)

* perf: lazy load vote related routes

* wrap Switch in Suspense

* remove exact to match nested routes

* fix nested routes

* split Landing

* fix

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: Enable 3085 requests for coinbase wallet (gnosis/cowswap#2753)

enable 3085 requests for coinbase wallet

* feat: set the auto slippage tolerance by the dollar value of gas (gnosis/cowswap#2815)

* feat: set the auto slippage tolerance by the dollar value of gas

* comments

* min/max at 0.5% to 25%

* oops on constant

* address review feedback

* Fixing #2818 (gnosis/cowswap#2820)

* Fix code style issues with ESLint

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: fix #2818

* chore(i18n): synchronize translations from crowdin [skip ci]

* log an event on max click (gnosis/cowswap#2827)

* Add trailing slash to L2 info links (gnosis/cowswap#2696)

Some links were broken. For example on /pools/ page click the 'Top Pools' CTA. It would mistakenly direct you to info.uniswap.org/optimismpools instead of optimism/pools

* fix(L2): block L2 tokens explicitly linked to L1 tokens that are blocked (gnosis/cowswap#2721)

* block L2 tokens explicitly linked to L1 tokens that are blocked

* Fix code style issues with ESLint

* check for support on all connectors, and disable when the connector (or lack thereof) no longer supports 3085 (gnosis/cowswap#2824)

* feat: display an ENS avatar (gnosis/cowswap#2806)

* feat: ens avatar resolution

* chore: uninstall @davatar/react

* fix: add avatar alt

* feat: support data uris

* feat: support arweave uris

* feat: support erc721 avatars

* feat: support erc1155 avatars

* fix: jazzicon integration

* fix: clean usage of status icon

* fix: fix jazzicon svg offset

* refactor: share status icon component

* fix: pass memoized args to multicall

* Update locales.ts (gnosis/cowswap#2825)

update Finnish from person (Suomalainen) to language (suomi)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore: fix the build blocking linter error

* chore: run linters with auto_fix = false for forks (gnosis/cowswap#2852)

* fix: do not show urls if issue is not occurring on app.uniswap.org (gnosis/cowswap#2855)

* fix: do not show urls if issue is not occurring on app.uniswap.org

fixes https://github.com/Uniswap/interface/issues/2572

* address comment

* fix: remove orphaned node (gnosis/cowswap#2863)

* fix: remove orphaned node

* fix: react cleanup

* refactor: use ref for jazzicon (gnosis/cowswap#2874)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(deps): bump ws from 5.2.2 to 5.2.3 (gnosis/cowswap#2759)

Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...5.2.3)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump url-parse from 1.5.1 to 1.5.3 (gnosis/cowswap#2504)

Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add more tests for tryParseTick (gnosis/cowswap#2110)

* fix(lint): clean up the eslint config (gnosis/cowswap#2886)

* fix(lint): clean up the eslint config

* Fix code style issues with ESLint

* fix the linter errors that arose from using the proper config

* clean up the rebass text renames

* fix if statement, use the config

* use the same name prefix for both steps

* `TextPreset` -> `ThemedText`

Co-authored-by: Lint Action <[email protected]>

* fix: Add routes for stakewise tokens (gnosis/cowswap#2832)

* Add additional routes for stakewise tokens

* Reference StakeWise addresses with sdk tokens

* Sort token imports

* chore: yarn-deduplicate

* chore: lint widgets

* fix: use lib useInterval

Co-authored-by: Crowdin Bot <[email protected]>
Co-authored-by: Micael Rodrigues <[email protected]>
Co-authored-by: Justin Domingue <[email protected]>
Co-authored-by: Moody Salem <[email protected]>
Co-authored-by: Jordan Frankfurt <[email protected]>
Co-authored-by: Ian Lapham <[email protected]>
Co-authored-by: Lint Action <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: M0kY <[email protected]>
Co-authored-by: M0kY <[email protected]>
Co-authored-by: Will Hennessy <[email protected]>
Co-authored-by: Brendan Weinstein <[email protected]>
Co-authored-by: Noah Zinsmeister <[email protected]>
Co-authored-by: Ben Krochta <[email protected]>
Co-authored-by: Moody Salem <[email protected]>
Co-authored-by: Raj <[email protected]>
Co-authored-by: Ikko Ashimine <[email protected]>
Co-authored-by: Matthew Salamon <[email protected]>
Co-authored-by: Sam Chen <[email protected]>
Co-authored-by: Ali Eray Kısabacak <[email protected]>
Co-authored-by: Kimmo S <[email protected]>
Co-authored-by: Dmitri Tsumak <[email protected]>

* chore: merge main into widgets (gnosis/cowswap#2923)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: center focused outline card (gnosis/cowswap#2625)

* fix: add usdc to arbitrum/optimism common bases (gnosis/cowswap#2641)

* remove WETH from optimism bases (gnosis/cowswap#2640)

* use l2 logos in base pairs (gnosis/cowswap#2634)

* fix: split calls into more chunks if they fail due to out of gas errors (gnosis/cowswap#2630)

* fix: split calls into more chunks if they fail due to out of gas errors

* set to 100m gas

* back to 25m so we batch fewer calls

* do not pass through gas limit, some simplification of the code

* unused import

* fix: restrict @davatar usage to avoid 3p fetches (gnosis/cowswap#2649)

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): ensure chainIds match before fetching pool data (gnosis/cowswap#2652)

* ensure chainIds match before fetching pool data

* debounce both input currencies, and only look for pairs on currencies that share a chainId

* pr feedback

* fix: use optional operator for chainId (gnosis/cowswap#2666)

* chore: update token list (gnosis/cowswap#2670)

* update token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: update token list (gnosis/cowswap#2671)

* update token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: extend privacy and terms (gnosis/cowswap#2623)

* initial iteration

* add logging

* added hook

* polish

* remove unused import

* add hash

* addressed pr feedback

* remove autorouter icon

* use firebase store

* style

* adjust recat ga

* log remove liquidity

* update copy

* addressed pr feedback

* addressed pr feedback

* prevent privacy content from dismissing modal

* make top-level key origin

* use hostname

* restore trm

* chore(i18n): synchronize translations from crowdin [skip ci]

* log full signed tx (gnosis/cowswap#2681)

* refactor monitoring (gnosis/cowswap#2682)

* chore: set final privacy learn more link' (gnosis/cowswap#2684)

* add learn more button

* add final link

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: back arrow bug in wallet modal and fill tx for wallet (gnosis/cowswap#2687)

* add tx to wallet connect

* remove id from env

* restore env

* block import of unsupported tokens (gnosis/cowswap#2673)

generalize custom import token block ui

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(deps-dev): bump @uniswap/token-lists (gnosis/cowswap#2699)

* chore(i18n): synchronize translations from crowdin [skip ci]

* try out 'dimension1' (gnosis/cowswap#2704)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: walletconnect modal re-open after user rejection (gnosis/cowswap#2693)

Co-authored-by: M0kY <[email protected]>

* chore: update unsupported token list (gnosis/cowswap#2689)

* chore: update unsupported token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: memoize the list stuff so the tokens are consistently clickable (gnosis/cowswap#2724)

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: update cmc list link (gnosis/cowswap#2710)

* update cmc lists

* update CMC url

* add token to unsupported list (gnosis/cowswap#2732)

* don't overwrite localstorage lists when fetch throws (gnosis/cowswap#2723)

* try cd1 for custom dimension (gnosis/cowswap#2734)

* fix: Update walletlink-connector to 6.2.8 (gnosis/cowswap#2655)

* Update walletlink-connector to 6.2.5 which has a walletlink update to support addEthereumChain+switchEthereumChain requests

* Update walletlink-connector to 6.2.7

* Update walletlink-connector to 6.2.8

* fix: Parse latest proposal description correctly

* add proposal start time (gnosis/cowswap#2738)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: #2741 Increase liquidity form off center (gnosis/cowswap#2746)

* fix: bump to latest token list including ENS token

* fix: remove deprecated optimism status url (gnosis/cowswap#2771)

* feat: Menu update. Add help center & feature requests. Remove analytics & github. (gnosis/cowswap#2709)

* Add help center, remove analytics from menu

* Add canny feature requests link, remove github link

* add coffee icon

* no unused imports eslint rule (gnosis/cowswap#2773)

* chore(i18n): synchronize translations from crowdin [skip ci]

* add protocols param to quote endpoint (gnosis/cowswap#2774)

* add protocols param to quote endpoint

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: lint error (gnosis/cowswap#2775)

* fix(optimism): Optimism regenesis support (gnosis/cowswap#2703)

* feat(optimism): optimistic kovan local regenesis changes

* use the regenesis version of the sdk

* remove the override no longer necessary

* diff rpc url

* back to kovan url

* lint error

* Optimism mainnet regenesis test (gnosis/cowswap#2695)

* remove the optimism mainnet specific code and point to the mainnet regenesis rpc url

* point at the old mainnet multicall address

* bump the sdk version

* copy the list

* multicall address regenesis change

* revert the gas limit special casing for optimism

* bump the sdk version

* remove a couple other temporary edits

* unused test case

* specific version of v3-sdk

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: add support for 0.01% tier (gnosis/cowswap#2769)

* chore: add support for 0.01% tier

* only show 1bps on mainnet

* rename VERY_LOW to LOWEST

* upgrade to v3-sdk 3.7.0

* add snapshot testing for lowest tier

* fix integration test

* fix integration test

* use ALL_SUPPORTED_CHAIN_IDS over string all

* consider 0.01% tier in pool (gnosis/cowswap#2770)

* merge main and only consider lowest tier for mainnet

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): update block warning updater to check most recent block timestamp (gnosis/cowswap#2777)

* update block warning updater to check most recent block timestamp

* stop doing dumb state manipulation

* fix: copy in network alert

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): remove redux from chain connectivity (gnosis/cowswap#2781)

* remove redux from chain connectivity

* useMachineTimeMs instead of Date.now to force updates, useCurrentBlockTimestamp

* use useInterval

* change not created font size to 10 (gnosis/cowswap#2785)

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: format date using Date.toLocaleString (gnosis/cowswap#2459)

* fix: format date using Date.toLocaleString

Fixes #2458

* fix: date typings

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: broken link to docs (gnosis/cowswap#2816)

* chore: fix typo in useAllCurrencyCombinations.ts (gnosis/cowswap#2778)

occurence -> occurrence

* chore: update typechain scripts for Windows (gnosis/cowswap#2707)

There are two errors when deploying on Windows system:
1. Using single quotes in path argument doesn't seem to be accepted in typechain command
2. `?(v3-core|v3-periphery)` operator doesn't work

Here are fixes/workarounds.

* perf: lazy load vote related routes (gnosis/cowswap#2468)

* perf: lazy load vote related routes

* wrap Switch in Suspense

* remove exact to match nested routes

* fix nested routes

* split Landing

* fix

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: Enable 3085 requests for coinbase wallet (gnosis/cowswap#2753)

enable 3085 requests for coinbase wallet

* feat: set the auto slippage tolerance by the dollar value of gas (gnosis/cowswap#2815)

* feat: set the auto slippage tolerance by the dollar value of gas

* comments

* min/max at 0.5% to 25%

* oops on constant

* address review feedback

* Fixing #2818 (gnosis/cowswap#2820)

* Fix code style issues with ESLint

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: fix #2818

* chore(i18n): synchronize translations from crowdin [skip ci]

* log an event on max click (gnosis/cowswap#2827)

* Add trailing slash to L2 info links (gnosis/cowswap#2696)

Some links were broken. For example on /pools/ page click the 'Top Pools' CTA. It would mistakenly direct you to info.uniswap.org/optimismpools instead of optimism/pools

* fix(L2): block L2 tokens explicitly linked to L1 tokens that are blocked (gnosis/cowswap#2721)

* block L2 tokens explicitly linked to L1 tokens that are blocked

* Fix code style issues with ESLint

* check for support on all connectors, and disable when the connector (or lack thereof) no longer supports 3085 (gnosis/cowswap#2824)

* feat: display an ENS avatar (gnosis/cowswap#2806)

* feat: ens avatar resolution

* chore: uninstall @davatar/react

* fix: add avatar alt

* feat: support data uris

* feat: support arweave uris

* feat: support erc721 avatars

* feat: support erc1155 avatars

* fix: jazzicon integration

* fix: clean usage of status icon

* fix: fix jazzicon svg offset

* refactor: share status icon component

* fix: pass memoized args to multicall

* Update locales.ts (gnosis/cowswap#2825)

update Finnish from person (Suomalainen) to language (suomi)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore: fix the build blocking linter error

* chore: run linters with auto_fix = false for forks (gnosis/cowswap#2852)

* fix: do not show urls if issue is not occurring on app.uniswap.org (gnosis/cowswap#2855)

* fix: do not show urls if issue is not occurring on app.uniswap.org

fixes https://github.com/Uniswap/interface/issues/2572

* address comment

* fix: remove orphaned node (gnosis/cowswap#2863)

* fix: remove orphaned node

* fix: react cleanup

* refactor: use ref for jazzicon (gnosis/cowswap#2874)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(deps): bump ws from 5.2.2 to 5.2.3 (gnosis/cowswap#2759)

Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...5.2.3)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump url-parse from 1.5.1 to 1.5.3 (gnosis/cowswap#2504)

Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add more tests for tryParseTick (gnosis/cowswap#2110)

* fix(lint): clean up the eslint config (gnosis/cowswap#2886)

* fix(lint): clean up the eslint config

* Fix code style issues with ESLint

* fix the linter errors that arose from using the proper config

* clean up the rebass text renames

* fix if statement, use the config

* use the same name prefix for both steps

* `TextPreset` -> `ThemedText`

Co-authored-by: Lint Action <[email protected]>

* fix: Add routes for stakewise tokens (gnosis/cowswap#2832)

* Add additional routes for stakewise tokens

* Reference StakeWise addresses with sdk tokens

* Sort token imports

* fix: fix layout of proposal list items on the vote page on mobile (gnosis/cowswap#2898)

* fix: fixing layout from using grid to flexbox

* fix: setting WrapSmall to nowrap due to layout issue on mobile

* fix: using width auto instead of disabling flex wrap

Co-authored-by: Julian Anderson <[email protected]>

* fix: typo in arweave URI recognition (gnosis/cowswap#2901)

* deleted files

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

This reverts commit ced39e5bbf22589154a86dccc3da9bf641baeb9b, reversing
changes made to 363ca2634472bcdbf0a7dc3a8547f485b3b0b87f.

* fix: inadvertent merges/reverts (gnosis/cowswap#2915)

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

This reverts commit d3abe84bf7842cd97981676ab7e27698e1ec3999.

* Revert "deleted files"

This reverts commit 363ca2634472bcdbf0a7dc3a8547f485b3b0b87f.

* refactor: Replace multicall implementation with library (gnosis/cowswap#2768)

- Replace the local implementation of multicall with the new redux-multicall lib
- Create wrappers for redux-multicall hooks to inject block number and chainId

Co-authored-by: Crowdin Bot <[email protected]>
Co-authored-by: Micael Rodrigues <[email protected]>
Co-authored-by: Justin Domingue <[email protected]>
Co-authored-by: Moody Salem <[email protected]>
Co-authored-by: Zach Pomerantz <[email protected]>
Co-authored-by: Ian Lapham <[email protected]>
Co-authored-by: Lint Action <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: M0kY <[email protected]>
Co-authored-by: M0kY <[email protected]>
Co-authored-by: Will Hennessy <[email protected]>
Co-authored-by: Brendan Weinstein <[email protected]>
Co-authored-by: Noah Zinsmeister <[email protected]>
Co-authored-by: Ben Krochta <[email protected]>
Co-authored-by: Moody Salem <[email protected]>
Co-authored-by: Raj <[email protected]>
Co-authored-by: Ikko Ashimine <[email protected]>
Co-authored-by: Matthew Salamon <[email protected]>
Co-authored-by: Sam Chen <[email protected]>
Co-authored-by: Ali Eray Kısabacak <[email protected]>
Co-authored-by: Kimmo S <[email protected]>
Co-authored-by: Dmitri Tsumak <[email protected]>
Co-authored-by: Julian Anderson <[email protected]>
Co-authored-by: Carlos Diaz-Padron <[email protected]>
Co-authored-by: J M Rossy <[email protected]>

* feat: Multicall lib integration for widgets (gnosis/cowswap#2946)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: center focused outline card (gnosis/cowswap#2625)

* fix: add usdc to arbitrum/optimism common bases (gnosis/cowswap#2641)

* remove WETH from optimism bases (gnosis/cowswap#2640)

* use l2 logos in base pairs (gnosis/cowswap#2634)

* fix: split calls into more chunks if they fail due to out of gas errors (gnosis/cowswap#2630)

* fix: split calls into more chunks if they fail due to out of gas errors

* set to 100m gas

* back to 25m so we batch fewer calls

* do not pass through gas limit, some simplification of the code

* unused import

* fix: restrict @davatar usage to avoid 3p fetches (gnosis/cowswap#2649)

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): ensure chainIds match before fetching pool data (gnosis/cowswap#2652)

* ensure chainIds match before fetching pool data

* debounce both input currencies, and only look for pairs on currencies that share a chainId

* pr feedback

* fix: use optional operator for chainId (gnosis/cowswap#2666)

* chore: update token list (gnosis/cowswap#2670)

* update token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: update token list (gnosis/cowswap#2671)

* update token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: extend privacy and terms (gnosis/cowswap#2623)

* initial iteration

* add logging

* added hook

* polish

* remove unused import

* add hash

* addressed pr feedback

* remove autorouter icon

* use firebase store

* style

* adjust recat ga

* log remove liquidity

* update copy

* addressed pr feedback

* addressed pr feedback

* prevent privacy content from dismissing modal

* make top-level key origin

* use hostname

* restore trm

* chore(i18n): synchronize translations from crowdin [skip ci]

* log full signed tx (gnosis/cowswap#2681)

* refactor monitoring (gnosis/cowswap#2682)

* chore: set final privacy learn more link' (gnosis/cowswap#2684)

* add learn more button

* add final link

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: back arrow bug in wallet modal and fill tx for wallet (gnosis/cowswap#2687)

* add tx to wallet connect

* remove id from env

* restore env

* block import of unsupported tokens (gnosis/cowswap#2673)

generalize custom import token block ui

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(deps-dev): bump @uniswap/token-lists (gnosis/cowswap#2699)

* chore(i18n): synchronize translations from crowdin [skip ci]

* try out 'dimension1' (gnosis/cowswap#2704)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: walletconnect modal re-open after user rejection (gnosis/cowswap#2693)

Co-authored-by: M0kY <[email protected]>

* chore: update unsupported token list (gnosis/cowswap#2689)

* chore: update unsupported token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: memoize the list stuff so the tokens are consistently clickable (gnosis/cowswap#2724)

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: update cmc list link (gnosis/cowswap#2710)

* update cmc lists

* update CMC url

* add token to unsupported list (gnosis/cowswap#2732)

* don't overwrite localstorage lists when fetch throws (gnosis/cowswap#2723)

* try cd1 for custom dimension (gnosis/cowswap#2734)

* fix: Update walletlink-connector to 6.2.8 (gnosis/cowswap#2655)

* Update walletlink-connector to 6.2.5 which has a walletlink update to support addEthereumChain+switchEthereumChain requests

* Update walletlink-connector to 6.2.7

* Update walletlink-connector to 6.2.8

* fix: Parse latest proposal description correctly

* add proposal start time (gnosis/cowswap#2738)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: #2741 Increase liquidity form off center (gnosis/cowswap#2746)

* fix: bump to latest token list including ENS token

* fix: remove deprecated optimism status url (gnosis/cowswap#2771)

* feat: Menu update. Add help center & feature requests. Remove analytics & github. (gnosis/cowswap#2709)

* Add help center, remove analytics from menu

* Add canny feature requests link, remove github link

* add coffee icon

* no unused imports eslint rule (gnosis/cowswap#2773)

* chore(i18n): synchronize translations from crowdin [skip ci]

* add protocols param to quote endpoint (gnosis/cowswap#2774)

* add protocols param to quote endpoint

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: lint error (gnosis/cowswap#2775)

* fix(optimism): Optimism regenesis support (gnosis/cowswap#2703)

* feat(optimism): optimistic kovan local regenesis changes

* use the regenesis version of the sdk

* remove the override no longer necessary

* diff rpc url

* back to kovan url

* lint error

* Optimism mainnet regenesis test (gnosis/cowswap#2695)

* remove the optimism mainnet specific code and point to the mainnet regenesis rpc url

* point at the old mainnet multicall address

* bump the sdk version

* copy the list

* multicall address regenesis change

* revert the gas limit special casing for optimism

* bump the sdk version

* remove a couple other temporary edits

* unused test case

* specific version of v3-sdk

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: add support for 0.01% tier (gnosis/cowswap#2769)

* chore: add support for 0.01% tier

* only show 1bps on mainnet

* rename VERY_LOW to LOWEST

* upgrade to v3-sdk 3.7.0

* add snapshot testing for lowest tier

* fix integration test

* fix integration test

* use ALL_SUPPORTED_CHAIN_IDS over string all

* consider 0.01% tier in pool (gnosis/cowswap#2770)

* merge main and only consider lowest tier for mainnet

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): update block warning updater to check most recent block timestamp (gnosis/cowswap#2777)

* update block warning updater to check most recent block timestamp

* stop doing dumb state manipulation

* fix: copy in network alert

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): remove redux from chain connectivity (gnosis/cowswap#2781)

* remove redux from chain connectivity

* useMachineTimeMs instead of Date.now to force updates, useCurrentBlockTimestamp

* use useInterval

* change not created font size to 10 (gnosis/cowswap#2785)

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: format date using Date.toLocaleString (gnosis/cowswap#2459)

* fix: format date using Date.toLocaleString

Fixes #2458

* fix: date typings

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: broken link to docs (gnosis/cowswap#2816)

* chore: fix typo in useAllCurrencyCombinations.ts (gnosis/cowswap#2778)

occurence -> occurrence

* chore: update typechain scripts for Windows (gnosis/cowswap#2707)

There are two errors when deploying on Windows system:
1. Using single quotes in path argument doesn't seem to be accepted in typechain command
2. `?(v3-core|v3-periphery)` operator doesn't work

Here are fixes/workarounds.

* perf: lazy load vote related routes (gnosis/cowswap#2468)

* perf: lazy load vote related routes

* wrap Switch in Suspense

* remove exact to match nested routes

* fix nested routes

* split Landing

* fix

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: Enable 3085 requests for coinbase wallet (gnosis/cowswap#2753)

enable 3085 requests for coinbase wallet

* feat: set the auto slippage tolerance by the dollar value of gas (gnosis/cowswap#2815)

* feat: set the auto slippage tolerance by the dollar value of gas

* comments

* min/max at 0.5% to 25%

* oops on constant

* address review feedback

* Fixing #2818 (gnosis/cowswap#2820)

* Fix code style issues with ESLint

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: fix #2818

* chore(i18n): synchronize translations from crowdin [skip ci]

* log an event on max click (gnosis/cowswap#2827)

* Add trailing slash to L2 info links (gnosis/cowswap#2696)

Some links were broken. For example on /pools/ page click the 'Top Pools' CTA. It would mistakenly direct you to info.uniswap.org/optimismpools instead of optimism/pools

* fix(L2): block L2 tokens explicitly linked to L1 tokens that are blocked (gnosis/cowswap#2721)

* block L2 tokens explicitly linked to L1 tokens that are blocked

* Fix code style issues with ESLint

* check for support on all connectors, and disable when the connector (or lack thereof) no longer supports 3085 (gnosis/cowswap#2824)

* feat: display an ENS avatar (gnosis/cowswap#2806)

* feat: ens avatar resolution

* chore: uninstall @davatar/react

* fix: add avatar alt

* feat: support data uris

* feat: support arweave uris

* feat: support erc721 avatars

* feat: support erc1155 avatars

* fix: jazzicon integration

* fix: clean usage of status icon

* fix: fix jazzicon svg offset

* refactor: share status icon component

* fix: pass memoized args to multicall

* Update locales.ts (gnosis/cowswap#2825)

update Finnish from person (Suomalainen) to language (suomi)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore: fix the build blocking linter error

* chore: run linters with auto_fix = false for forks (gnosis/cowswap#2852)

* fix: do not show urls if issue is not occurring on app.uniswap.org (gnosis/cowswap#2855)

* fix: do not show urls if issue is not occurring on app.uniswap.org

fixes https://github.com/Uniswap/interface/issues/2572

* address comment

* fix: remove orphaned node (gnosis/cowswap#2863)

* fix: remove orphaned node

* fix: react cleanup

* refactor: use ref for jazzicon (gnosis/cowswap#2874)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(deps): bump ws from 5.2.2 to 5.2.3 (gnosis/cowswap#2759)

Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...5.2.3)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump url-parse from 1.5.1 to 1.5.3 (gnosis/cowswap#2504)

Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add more tests for tryParseTick (gnosis/cowswap#2110)

* fix(lint): clean up the eslint config (gnosis/cowswap#2886)

* fix(lint): clean up the eslint config

* Fix code style issues with ESLint

* fix the linter errors that arose from using the proper config

* clean up the rebass text renames

* fix if statement, use the config

* use the same name prefix for both steps

* `TextPreset` -> `ThemedText`

Co-authored-by: Lint Action <[email protected]>

* fix: Add routes for stakewise tokens (gnosis/cowswap#2832)

* Add additional routes for stakewise tokens

* Reference StakeWise addresses with sdk tokens

* Sort token imports

* fix: fix layout of proposal list items on the vote page on mobile (gnosis/cowswap#2898)

* fix: fixing layout from using grid to flexbox

* fix: setting WrapSmall to nowrap due to layout issue on mobile

* fix: using width auto instead of disabling flex wrap

Co-authored-by: Julian Anderson <[email protected]>

* fix: typo in arweave URI recognition (gnosis/cowswap#2901)

* deleted files

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

This reverts commit ced39e5bbf22589154a86dccc3da9bf641baeb9b, reversing
changes made to 363ca2634472bcdbf0a7dc3a8547f485b3b0b87f.

* fix: inadvertent merges/reverts (gnosis/cowswap#2915)

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

This reverts commit d3abe84bf7842cd97981676ab7e27698e1ec3999.

* Revert "deleted files"

This reverts commit 363ca2634472bcdbf0a7dc3a8547f485b3b0b87f.

* refactor: Replace multicall implementation with library (gnosis/cowswap#2768)

- Replace the local implementation of multicall with the new redux-multicall lib
- Create wrappers for redux-multicall hooks to inject block number and chainId

* package.json tweaks

* add multicall lib and some basic provider things

Co-authored-by: Crowdin Bot <[email protected]>
Co-authored-by: Micael Rodrigues <[email protected]>
Co-authored-by: Justin Domingue <[email protected]>
Co-authored-by: Moody Salem <[email protected]>
Co-authored-by: Zach Pomerantz <[email protected]>
Co-authored-by: Ian Lapham <[email protected]>
Co-authored-by: Lint Action <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: M0kY <[email protected]>
Co-authored-by: M0kY <[email protected]>
Co-authored-by: Will Hennessy <[email protected]>
Co-authored-by: Brendan Weinstein <[email protected]>
Co-authored-by: Noah Zinsmeister <[email protected]>
Co-authored-by: Ben Krochta <[email protected]>
Co-authored-by: Moody Salem <[email protected]>
Co-authored-by: Raj <[email protected]>
Co-authored-by: Ikko Ashimine <[email protected]>
Co-authored-by: Matthew Salamon <[email protected]>
Co-authored-by: Sam Chen <[email protected]>
Co-authored-by: Ali Eray Kısabacak <[email protected]>
Co-authored-by: Kimmo S <[email protected]>
Co-authored-by: Dmitri Tsumak <[email protected]>
Co-authored-by: Julian Anderson <[email protected]>
Co-authored-by: Carlos Diaz-Padron <[email protected]>
Co-authored-by: J M Rossy <[email protected]>

* feat: widgets style update (gnosis/cowswap#2939)

* feat: widgets empty state (gnosis/cowswap#2951)

* chore: mv onHover to computed theme; reduce to 0.16

* chore: transparentize primary on hover

* chore: transparentize dynamic primary on hover

* style: restrict icon usage

Restricts icons to lib/icons. This ensures that icons are loaded as singletons outside of the React lifecycle. Doing otherwise hinders performance.

* fix: logo mix-blend-mode

* wip: empty states

* fix: accent/active colors

* wip: empty states

* fix: input hover states

* nit: specific user select

* nit: button transition

* nit: no button transition

* chore: better cosmos toggles

* chore: load inter

* make cosmos work with new required widget props (gnosis/cowswap#2956)

* separate connector atoms (gnosis/cowswap#2959)

* fix: widgets nits sans summary/status (gnosis/cowswap#2960)

* fix: dynamic scrollbar

* feat: system theme hook

* nit: settings

* nit: large settings icons

* fix: accessible color computation

* fix: ignore status scroll for now

* fix: ignore txs scroll for now

* feat: widgets summary (gnosis/cowswap#2980)

* fix: output first in toolbar

* fix: widget height

* feat: token color extraction toggle

* fix: header sizing

* fix: height nits

* chore: re-arch sub pages

* nit: height

* feat: border radius as range

* fix: exclude cosmos setter from hook deps

* feat: default width to 360

* feat: type classes

* fix: header height

* fix: default cosmos width to 360

* refactor: icon button

* wip: summary

* fix: scrollbar

* feat: summary

* fix: summary expando

* fix: widgets transitions (gnosis/cowswap#2983)

* fix: action button height

* fix: summary scrollbar fading

* fix: summary fixture

* fix: action button transitions

* feat: widgets status (gnosis/cowswap#2987)

* fix: action button height

* fix: summary scrollbar fading

* fix: summary fixture

* fix: action button transitions

* refactor: commit spinner as svg asset

* feat: status dialog

* fix: spinner rounding

* feat: widgets fonts and transitions (gnosis/cowswap#2998)

* feat: fonts using @fontsource

* feat: dialog transitions

* fix: swap transitions

* Refactor use active web3 react (gnosis/cowswap#3002)

* separate connector atoms

* refactor cosmos and set up widgets env var

* fix: cosmos modularization (gnosis/cowswap#3014)

* fix: cosmos modularization

* fix: web3 in atom provider

* feat: make connectors resettable

* drop empty test (gnosis/cowswap#3022)

* Revert "feat: make connectors resettable"

This reverts commit db5af68b9be1edf4d6e1b7dc8ed2004f19e33f16.

* undo dumb open reorder

* bump widget web3-react versions

* bump to fix tests

Co-authored-by: Jordan Frankfurt <[email protected]>
Co-authored-by: Noah Zinsmeister <[email protected]>

* chore(widgets): Merge main into widgets (gnosis/cowswap#3013)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: center focused outline card (gnosis/cowswap#2625)

* fix: add usdc to arbitrum/optimism common bases (gnosis/cowswap#2641)

* remove WETH from optimism bases (gnosis/cowswap#2640)

* use l2 logos in base pairs (gnosis/cowswap#2634)

* fix: split calls into more chunks if they fail due to out of gas errors (gnosis/cowswap#2630)

* fix: split calls into more chunks if they fail due to out of gas errors

* set to 100m gas

* back to 25m so we batch fewer calls

* do not pass through gas limit, some simplification of the code

* unused import

* fix: restrict @davatar usage to avoid 3p fetches (gnosis/cowswap#2649)

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): ensure chainIds match before fetching pool data (gnosis/cowswap#2652)

* ensure chainIds match before fetching pool data

* debounce both input currencies, and only look for pairs on currencies that share a chainId

* pr feedback

* fix: use optional operator for chainId (gnosis/cowswap#2666)

* chore: update token list (gnosis/cowswap#2670)

* update token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: update token list (gnosis/cowswap#2671)

* update token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: extend privacy and terms (gnosis/cowswap#2623)

* initial iteration

* add logging

* added hook

* polish

* remove unused import

* add hash

* addressed pr feedback

* remove autorouter icon

* use firebase store

* style

* adjust recat ga

* log remove liquidity

* update copy

* addressed pr feedback

* addressed pr feedback

* prevent privacy content from dismissing modal

* make top-level key origin

* use hostname

* restore trm

* chore(i18n): synchronize translations from crowdin [skip ci]

* log full signed tx (gnosis/cowswap#2681)

* refactor monitoring (gnosis/cowswap#2682)

* chore: set final privacy learn more link' (gnosis/cowswap#2684)

* add learn more button

* add final link

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: back arrow bug in wallet modal and fill tx for wallet (gnosis/cowswap#2687)

* add tx to wallet connect

* remove id from env

* restore env

* block import of unsupported tokens (gnosis/cowswap#2673)

generalize custom import token block ui

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(deps-dev): bump @uniswap/token-lists (gnosis/cowswap#2699)

* chore(i18n): synchronize translations from crowdin [skip ci]

* try out 'dimension1' (gnosis/cowswap#2704)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: walletconnect modal re-open after user rejection (gnosis/cowswap#2693)

Co-authored-by: M0kY <[email protected]>

* chore: update unsupported token list (gnosis/cowswap#2689)

* chore: update unsupported token list

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: memoize the list stuff so the tokens are consistently clickable (gnosis/cowswap#2724)

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: update cmc list link (gnosis/cowswap#2710)

* update cmc lists

* update CMC url

* add token to unsupported list (gnosis/cowswap#2732)

* don't overwrite localstorage lists when fetch throws (gnosis/cowswap#2723)

* try cd1 for custom dimension (gnosis/cowswap#2734)

* fix: Update walletlink-connector to 6.2.8 (gnosis/cowswap#2655)

* Update walletlink-connector to 6.2.5 which has a walletlink update to support addEthereumChain+switchEthereumChain requests

* Update walletlink-connector to 6.2.7

* Update walletlink-connector to 6.2.8

* fix: Parse latest proposal description correctly

* add proposal start time (gnosis/cowswap#2738)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: #2741 Increase liquidity form off center (gnosis/cowswap#2746)

* fix: bump to latest token list including ENS token

* fix: remove deprecated optimism status url (gnosis/cowswap#2771)

* feat: Menu update. Add help center & feature requests. Remove analytics & github. (gnosis/cowswap#2709)

* Add help center, remove analytics from menu

* Add canny feature requests link, remove github link

* add coffee icon

* no unused imports eslint rule (gnosis/cowswap#2773)

* chore(i18n): synchronize translations from crowdin [skip ci]

* add protocols param to quote endpoint (gnosis/cowswap#2774)

* add protocols param to quote endpoint

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>

* fix: lint error (gnosis/cowswap#2775)

* fix(optimism): Optimism regenesis support (gnosis/cowswap#2703)

* feat(optimism): optimistic kovan local regenesis changes

* use the regenesis version of the sdk

* remove the override no longer necessary

* diff rpc url

* back to kovan url

* lint error

* Optimism mainnet regenesis test (gnosis/cowswap#2695)

* remove the optimism mainnet specific code and point to the mainnet regenesis rpc url

* point at the old mainnet multicall address

* bump the sdk version

* copy the list

* multicall address regenesis change

* revert the gas limit special casing for optimism

* bump the sdk version

* remove a couple other temporary edits

* unused test case

* specific version of v3-sdk

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(i18n): synchronize translations from crowdin [skip ci]

* feat: add support for 0.01% tier (gnosis/cowswap#2769)

* chore: add support for 0.01% tier

* only show 1bps on mainnet

* rename VERY_LOW to LOWEST

* upgrade to v3-sdk 3.7.0

* add snapshot testing for lowest tier

* fix integration test

* fix integration test

* use ALL_SUPPORTED_CHAIN_IDS over string all

* consider 0.01% tier in pool (gnosis/cowswap#2770)

* merge main and only consider lowest tier for mainnet

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): update block warning updater to check most recent block timestamp (gnosis/cowswap#2777)

* update block warning updater to check most recent block timestamp

* stop doing dumb state manipulation

* fix: copy in network alert

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix(L2): remove redux from chain connectivity (gnosis/cowswap#2781)

* remove redux from chain connectivity

* useMachineTimeMs instead of Date.now to force updates, useCurrentBlockTimestamp

* use useInterval

* change not created font size to 10 (gnosis/cowswap#2785)

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: format date using Date.toLocaleString (gnosis/cowswap#2459)

* fix: format date using Date.toLocaleString

Fixes #2458

* fix: date typings

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: broken link to docs (gnosis/cowswap#2816)

* chore: fix typo in useAllCurrencyCombinations.ts (gnosis/cowswap#2778)

occurence -> occurrence

* chore: update typechain scripts for Windows (gnosis/cowswap#2707)

There are two errors when deploying on Windows system:
1. Using single quotes in path argument doesn't seem to be accepted in typechain command
2. `?(v3-core|v3-periphery)` operator doesn't work

Here are fixes/workarounds.

* perf: lazy load vote related routes (gnosis/cowswap#2468)

* perf: lazy load vote related routes

* wrap Switch in Suspense

* remove exact to match nested routes

* fix nested routes

* split Landing

* fix

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: Enable 3085 requests for coinbase wallet (gnosis/cowswap#2753)

enable 3085 requests for coinbase wallet

* feat: set the auto slippage tolerance by the dollar value of gas (gnosis/cowswap#2815)

* feat: set the auto slippage tolerance by the dollar value of gas

* comments

* min/max at 0.5% to 25%

* oops on constant

* address review feedback

* Fixing #2818 (gnosis/cowswap#2820)

* Fix code style issues with ESLint

* chore(i18n): synchronize translations from crowdin [skip ci]

* fix: fix #2818

* chore(i18n): synchronize translations from crowdin [skip ci]

* log an event on max click (gnosis/cowswap#2827)

* Add trailing slash to L2 info links (gnosis/cowswap#2696)

Some links were broken. For example on /pools/ page click the 'Top Pools' CTA. It would mistakenly direct you to info.uniswap.org/optimismpools instead of optimism/pools

* fix(L2): block L2 tokens explicitly linked to L1 tokens that are blocked (gnosis/cowswap#2721)

* block L2 tokens explicitly linked to L1 tokens that are blocked

* Fix code style issues with ESLint

* check for support on all connectors, and disable when the connector (or lack thereof) no longer supports 3085 (gnosis/cowswap#2824)

* feat: display an ENS avatar (gnosis/cowswap#2806)

* feat: ens avatar resolution

* chore: uninstall @davatar/react

* fix: add avatar alt

* feat: support data uris

* feat: support arweave uris

* feat: support erc721 avatars

* feat: support erc1155 avatars

* fix: jazzicon integration

* fix: clean usage of status icon

* fix: fix jazzicon svg offset

* refactor: share status icon component

* fix: pass memoized args to multicall

* Update locales.ts (gnosis/cowswap#2825)

update Finnish from person (Suomalainen) to language (suomi)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore: fix the build blocking linter error

* chore: run linters with auto_fix = false for forks (gnosis/cowswap#2852)

* fix: do not show urls if issue is not occurring on app.uniswap.org (gnosis/cowswap#2855)

* fix: do not show urls if issue is not occurring on app.uniswap.org

fixes https://github.com/Uniswap/interface/issues/2572

* address comment

* fix: remove orphaned node (gnosis/cowswap#2863)

* fix: remove orphaned node

* fix: react cleanup

* refactor: use ref for jazzicon (gnosis/cowswap#2874)

* chore(i18n): synchronize translations from crowdin [skip ci]

* chore(deps): bump ws from 5.2.2 to 5.2.3 (gnosis/cowswap#2759)

Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...5.2.3)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump url-parse from 1.5.1 to 1.5.3 (gnosis/co…
  • Loading branch information
1 parent e650cce commit 149b6b6
Show file tree
Hide file tree
Showing 134 changed files with 4,903 additions and 80,667 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_INFURA_KEY="4bf032f2d38a4ed6bb975b80d6340847"
REACT_APP_INFURA_KEY="4bf032f2d38a4ed6bb975b80d6340847"
43 changes: 43 additions & 0 deletions .github/workflows/depcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Bundle Dependency Check
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
depcheck:
name: Bundle depcheck
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Bundle
run: yarn bundle

- name: Depcheck
run: yarn bundle:depcheck
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
# generated contract types
/src/types/v3
/src/abis/types
/src/lib/locales/**/*.js
/src/lib/locales/**/en-US.po
/src/lib/locales/**/pseudo.po
/src/locales/**/*.js
/src/locales/**/en-US.po
/src/locales/**/pseudo.po
/src/state/data/generated.ts

# generated assets
/src/lib/assets/svg/*.tsx
/src/lib/assets/fonts/*.css

# dependencies
/node_modules

Expand Down
10 changes: 6 additions & 4 deletions cosmos.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"staticPath": "public",
"watchDirs": ["src"],
"watchDirs": [
"src"
],
"webpack": {
"configPath": "react-scripts/config/webpack.config"
"configPath": "react-scripts/config/webpack.config",
"overridePath": "cosmos.override.js"
}
}
}
14 changes: 14 additions & 0 deletions cosmos.override.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const HtmlWebpackPlugin = require('html-webpack-plugin')

// Renders the cosmos fixtures in isolation, instead of using public/index.html.
module.exports = (webpackConfig) => ({
...webpackConfig,
plugins: webpackConfig.plugins.map((plugin) =>
plugin instanceof HtmlWebpackPlugin
? new HtmlWebpackPlugin({
templateContent: '<body></body>',
})
: plugin
),
})
28 changes: 28 additions & 0 deletions depcheck.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/node
/**
* Checks if any dependencies have been bundled with the interface library.
* Exits with non-zero status if dependencies are included in the bundle.
*/
/* eslint-disable */

const { readFile } = require('fs')

function checkDeps(err, sourcemap) {
if (err) {
console.error(err)
process.exit(1)
}

const includesDeps = sourcemap.includes('node_modules')
if (includesDeps) {
const deps = [...sourcemap.toString().matchAll(/node_modules[\\\/]([^\\\/]*)/g)].map(([, match]) => match)
console.error(`
Sourcemap includes node_modules folder(s). External deps must be bundled under "dependencies".
To fix, run: \`yarn add ${deps.join(' ')}\`
`)
process.exit(1)
}
}

readFile('dist/interface.esm.js.map', checkDeps)
2 changes: 2 additions & 0 deletions lingui.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ const linguiConfig = {
'vi-VN',
'zh-CN',
'zh-TW',
'pseudo',
],
orderBy: 'messageId',
rootDir: '.',
runtimeConfigModule: ['@lingui/core', 'i18n'],
sourceLocale: 'en-US',
pseudoLocale: 'pseudo',
}

export default linguiConfig
67 changes: 47 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
"@graphql-codegen/typescript-operations": "^1.18.2",
"@graphql-codegen/typescript-rtk-query": "^1.1.1",
"@lingui/cli": "^3.9.0",
"@lingui/macro": "^3.9.0",
"@lingui/react": "^3.9.0",
"@metamask/jazzicon": "^2.0.0",
"@popperjs/core": "^2.4.4",
"@reach/dialog": "^0.10.3",
"@reach/portal": "^0.10.3",
"@react-hook/window-scroll": "^1.3.0",
"@reduxjs/toolkit": "^1.6.1",
"@svgr/cli": "^5.5.0",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@testing-library/react-hooks": "^7.0.2",
Expand Down Expand Up @@ -54,13 +52,13 @@
"@types/wcag-contrast": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^4.1.0",
"@typescript-eslint/parser": "^4.1.0",
"@uniswap/default-token-list": "^2.1.0",
"@uniswap/governance": "^1.0.2",
"@uniswap/liquidity-staker": "^1.0.2",
"@uniswap/merkle-distributor": "1.0.1",
"@uniswap/redux-multicall": "^1.0.0",
"@uniswap/router-sdk": "^1.0.1",
"@uniswap/router-sdk": "^1.0.3",
"@uniswap/sdk-core": "^3.0.1",
"@uniswap/smart-order-router": "^2.5.7",
"@uniswap/smart-order-router": "^2.5.4",
"@uniswap/token-lists": "^1.0.0-beta.27",
"@uniswap/v2-core": "1.0.0",
"@uniswap/v2-periphery": "^1.1.0-beta.0",
Expand All @@ -84,6 +82,7 @@
"d3": "^7.0.0",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-better-styled-components": "^1.1.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.0.0",
Expand All @@ -99,32 +98,23 @@
"ms.macro": "^2.0.0",
"multicodec": "^3.0.1",
"multihashes": "^4.0.2",
"node-vibrant": "^3.2.1-alpha.1",
"polished": "^3.3.2",
"polyfill-object.fromentries": "^1.0.1",
"prettier": "^2.2.1",
"qs": "^6.9.4",
"react": "^17.0.1",
"react-confetti": "^6.0.0",
"react-cosmos": "^5.6.3",
"react-dom": "^17.0.1",
"react-feather": "^2.0.8",
"react-ga": "^2.5.7",
"react-is": "^17.0.2",
"react-markdown": "^4.3.1",
"react-popper": "^2.2.3",
"react-redux": "^7.2.2",
"react-router-dom": "^5.0.0",
"react-scripts": "^4.0.3",
"react-spring": "^8.0.27",
"react-use-gesture": "^6.0.14",
"react-virtualized-auto-sizer": "^1.0.2",
"react-window": "^1.8.5",
"rebass": "^4.0.7",
"redux-localstorage-simple": "^2.3.1",
"sass": "^1.45.1",
"serve": "^11.3.2",
"start-server-and-test": "^1.11.0",
"styled-components": "^5.3.0",
"typechain": "^5.0.0",
"typescript": "^4.2.3",
"ua-parser-js": "^0.7.28",
Expand All @@ -147,13 +137,18 @@
"prei18n:extract": "touch src/locales/en-US.po",
"i18n:extract": "lingui extract --locale en-US",
"i18n:compile": "yarn i18n:extract && lingui compile",
"postinstall": "yarn contracts:compile && yarn graphql:generate && yarn i18n:compile",
"i18n:pseudo": "lingui extract --locale pseudo && lingui compile",
"postinstall": "yarn contracts:compile && yarn graphql:generate && yarn i18n:compile && yarn assets:generate",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=./custom-test-env.js",
"test:e2e": "start-server-and-test 'serve build -l 3000' http://localhost:3000 'cypress run --record'",
"bundle": "microbundle --tsconfig tsconfig.lib.json src/lib/index.tsx --format esm,cjs",
"cosmos": "open http://localhost:5000 && cross-env FAST_REFRESH=false cosmos"
"assets:generate": "yarn assets:svg:generate && yarn assets:font:generate",
"assets:svg:generate": "svgr -d src/lib/assets/svg --ext tsx --typescript src/lib/assets/svg && rm src/lib/assets/svg/index.tsx",
"assets:font:generate": "sass src/lib/assets/fonts/index.scss src/lib/assets/fonts/index.css --no-source-map -I node_modules",
"bundle": "microbundle --define process.env.REACT_APP_IS_WIDGET=true --tsconfig tsconfig.lib.json src/lib/index.tsx --format esm,cjs",
"bundle:depcheck": "node depcheck.js",
"cosmos": "cross-env FAST_REFRESH=false REACT_APP_IS_WIDGET=true cosmos"
},
"browserslist": {
"production": [
Expand All @@ -168,5 +163,37 @@
]
},
"license": "GPL-3.0-or-later",
"dependencies": {}
"dependencies": {
"@fontsource/ibm-plex-mono": "^4.5.1",
"@fontsource/inter": "^4.5.1",
"@lingui/core": "^3.9.0",
"@lingui/macro": "^3.9.0",
"@lingui/react": "^3.9.0",
"@popperjs/core": "^2.4.4",
"@uniswap/redux-multicall": "^1.0.0",
"immer": "^9.0.6",
"jotai": "^1.3.7",
"lodash": "^4.17.21",
"make-plural": "^7.0.0",
"node-vibrant": "^3.2.1-alpha.1",
"polished": "^3.3.2",
"popper-max-size-modifier": "^0.2.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-feather": "^2.0.8",
"react-popper": "^2.2.3",
"react-virtualized-auto-sizer": "^1.0.2",
"react-window": "^1.8.5",
"rebass": "^4.0.7",
"redux": "^4.1.2",
"styled-components": "^5.3.0",
"tiny-invariant": "^1.2.0",
"wcag-contrast": "^3.0.0",
"wicg-inert": "^3.1.1",
"widgets-web3-react/core": "npm:@web3-react/[email protected]",
"widgets-web3-react/eip1193": "npm:@web3-react/[email protected]",
"widgets-web3-react/metamask": "npm:@web3-react/[email protected]",
"widgets-web3-react/network": "npm:@web3-react/[email protected]",
"widgets-web3-react/types": "npm:@web3-react/[email protected]"
}
}
3 changes: 2 additions & 1 deletion src/components/AccountDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useCallback, useContext } from 'react'
import { ExternalLink as LinkIcon } from 'react-feather'
import { useAppDispatch } from 'state/hooks'
import styled, { ThemeContext } from 'styled-components/macro'
import { Connector } from 'widgets-web3-react/types'

import { ReactComponent as Close } from '../../assets/images/x.svg'
import { injected, portis, walletlink } from '../../connectors'
Expand Down Expand Up @@ -176,7 +177,7 @@ const IconWrapper = styled.div<{ size?: number }>`
`};
`

function WrappedStatusIcon({ connector }: { connector: AbstractConnector }) {
function WrappedStatusIcon({ connector }: { connector: AbstractConnector | Connector }) {
return (
<IconWrapper size={16}>
<StatusIcon connector={connector} />
Expand Down
3 changes: 2 additions & 1 deletion src/components/Identicon/StatusIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AbstractConnector } from '@web3-react/abstract-connector'
import { Connector } from 'widgets-web3-react/types'

import CoinbaseWalletIcon from '../../assets/images/coinbaseWalletIcon.svg'
import FortmaticIcon from '../../assets/images/fortmaticIcon.png'
Expand All @@ -7,7 +8,7 @@ import WalletConnectIcon from '../../assets/images/walletConnectIcon.svg'
import { fortmatic, injected, portis, walletconnect, walletlink } from '../../connectors'
import Identicon from '../Identicon'

export default function StatusIcon({ connector }: { connector: AbstractConnector }) {
export default function StatusIcon({ connector }: { connector: AbstractConnector | Connector }) {
switch (connector) {
case injected:
return <Identicon />
Expand Down
3 changes: 1 addition & 2 deletions src/components/Popover/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Options, Placement } from '@popperjs/core'
import Portal from '@reach/portal'
import useInterval from 'lib/hooks/useInterval'
import React, { useCallback, useMemo, useState } from 'react'
import { usePopper } from 'react-popper'
import styled from 'styled-components/macro'

import useInterval from '../../hooks/useInterval'

const PopoverContainer = styled.div<{ show: boolean }>`
z-index: 9999;
visibility: ${(props) => (props.show ? 'visible' : 'hidden')};
Expand Down
3 changes: 2 additions & 1 deletion src/components/Web3Status/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { darken } from 'polished'
import { useMemo } from 'react'
import { Activity } from 'react-feather'
import styled, { css } from 'styled-components/macro'
import { Connector } from 'widgets-web3-react/types'

import { NetworkContextName } from '../../constants/misc'
import useENSName from '../../hooks/useENSName'
Expand Down Expand Up @@ -130,7 +131,7 @@ function Sock() {
)
}

function WrappedStatusIcon({ connector }: { connector: AbstractConnector }) {
function WrappedStatusIcon({ connector }: { connector: AbstractConnector | Connector }) {
return (
<IconWrapper size={16}>
<StatusIcon connector={connector} />
Expand Down
8 changes: 5 additions & 3 deletions src/constants/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ export const SUPPORTED_LOCALES = [
'zh-CN',
'zh-TW',
] as const
export type SupportedLocale = typeof SUPPORTED_LOCALES[number]
export type SupportedLocale = typeof SUPPORTED_LOCALES[number] | 'pseudo'

// eslint-disable-next-line import/first
import * as enUS from '../locales/en-US'
export const DEFAULT_LOCALE: SupportedLocale = 'en-US'

export { messages as DEFAULT_MESSAGES } from '../locales/en-US'
export const DEFAULT_CATALOG = enUS

export const LOCALE_LABEL: { [locale in SupportedLocale]: string } = {
'af-ZA': 'Afrikaans',
Expand Down Expand Up @@ -72,4 +73,5 @@ export const LOCALE_LABEL: { [locale in SupportedLocale]: string } = {
'vi-VN': 'Tiếng Việt',
'zh-CN': '简体中文',
'zh-TW': '繁体中文',
pseudo: 'ƥƨèúδô',
}
22 changes: 22 additions & 0 deletions src/hooks/useActiveWeb3React.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Web3Provider } from '@ethersproject/providers'
import { useWeb3React } from '@web3-react/core'
import { default as useWidgetsWeb3React } from 'lib/hooks/useActiveWeb3React'

import { NetworkContextName } from '../constants/misc'

export default function useActiveWeb3React() {
const widgetsContext = useWidgetsWeb3React()
const interfaceContext = useWeb3React<Web3Provider>()
const interfaceNetworkContext = useWeb3React<Web3Provider>(
process.env.REACT_APP_IS_WIDGET ? undefined : NetworkContextName
)

if (process.env.REACT_APP_IS_WIDGET) {
return widgetsContext
}
if (interfaceContext.active) {
return interfaceContext
}

return interfaceNetworkContext
}
3 changes: 1 addition & 2 deletions src/hooks/useMachineTime.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import useInterval from 'lib/hooks/useInterval'
import { useState } from 'react'

import useInterval from './useInterval'

const useMachineTimeMs = (updateInterval: number): number => {
const [now, setNow] = useState(Date.now())

Expand Down
Loading

0 comments on commit 149b6b6

Please sign in to comment.