Compare commits
105 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ebc467c58 | ||
|
|
7b7e4e61d2 | ||
|
|
e8936f500b | ||
|
|
3d8a5ed6fe | ||
|
|
c3d2c43861 | ||
|
|
de5816e573 | ||
|
|
5a2f81c4bf | ||
|
|
c34742c23b | ||
|
|
6225462645 | ||
|
|
c21b9379fd | ||
|
|
1610356a18 | ||
|
|
1b8cee7e87 | ||
|
|
a7c6ce499d | ||
|
|
e9fc55550d | ||
|
|
3eeb467266 | ||
|
|
585d67c44a | ||
|
|
521b9b8e52 | ||
|
|
cba1b83cd6 | ||
|
|
498d4bf667 | ||
|
|
34bed922ab | ||
|
|
b026db3db3 | ||
|
|
912eb82971 | ||
|
|
2ddf3fe6bd | ||
|
|
79ad611e79 | ||
|
|
e6d0d96ce4 | ||
|
|
dcb660d052 | ||
|
|
1f0b8ffaf0 | ||
|
|
c59b3d7d88 | ||
|
|
513c90723b | ||
|
|
ef388e17d5 | ||
|
|
e2f5041707 | ||
|
|
ac8d294ef6 | ||
|
|
2df0ca178c | ||
|
|
02c970a077 | ||
|
|
a965c3792b | ||
|
|
e8c689e1d4 | ||
|
|
70cd7272a1 | ||
|
|
2b5769ac86 | ||
|
|
b811afd134 | ||
|
|
6131e6bfab | ||
|
|
5979635939 | ||
|
|
5399bdb550 | ||
|
|
1df9da9eff | ||
|
|
b1e6d0ab7a | ||
|
|
a7fcbb4cfc | ||
|
|
a5a6a037e5 | ||
|
|
8bfebd37a2 | ||
|
|
4029819090 | ||
|
|
021ae5e74e | ||
|
|
2b9720705f | ||
|
|
8f1ea32e5e | ||
|
|
23acb3b395 | ||
|
|
772416cc7a | ||
|
|
f15e5725f1 | ||
|
|
83c8393f19 | ||
|
|
1348eb3322 | ||
|
|
a2271ba428 | ||
|
|
1845cb3b7b | ||
|
|
6a02bde8e0 | ||
|
|
c18522159b | ||
|
|
5ea7b1de3f | ||
|
|
6efe8f3260 | ||
|
|
9ac28a4571 | ||
|
|
bde1421ffb | ||
|
|
3dceb45d9e | ||
|
|
7b589561bc | ||
|
|
c9d3dc36b8 | ||
|
|
ef4d8fc269 | ||
|
|
ff9cc5cb69 | ||
|
|
719fd524ed | ||
|
|
f15dd1e61e | ||
|
|
8c372c6142 | ||
|
|
8c0998bd59 | ||
|
|
ad3a4ea808 | ||
|
|
d30c5173f5 | ||
|
|
689100afa2 | ||
|
|
d546ffec1c | ||
|
|
4a72d8835c | ||
|
|
19c6023601 | ||
|
|
a4a954c8af | ||
|
|
82dcdcec55 | ||
|
|
27e20d7230 | ||
|
|
95eafbab7d | ||
|
|
639fe2f73b | ||
|
|
72cd27f045 | ||
|
|
4e64c0e88f | ||
|
|
fda28d9be3 | ||
|
|
bc92af6c15 | ||
|
|
9a257e0ca8 | ||
|
|
82646b77dd | ||
|
|
1992c5de06 | ||
|
|
0208ccd7d2 | ||
|
|
12df4b3981 | ||
|
|
3eaeb65b07 | ||
|
|
6df2f3677e | ||
|
|
80edf5a0d6 | ||
|
|
96f6929127 | ||
|
|
4ec95d0927 | ||
|
|
fba6cc9e02 | ||
|
|
bc2f68565b | ||
|
|
f232643d8e | ||
|
|
527270e33f | ||
|
|
18cd5ec9d9 | ||
|
|
5ddb565805 | ||
|
|
f0b4b92b88 |
1
.env
@@ -1,5 +1,6 @@
|
||||
# These API keys are intentionally public. Please do not report them - thank you for your concern.
|
||||
REACT_APP_AMPLITUDE_PROXY_URL="https://api.uniswap.org/v1/amplitude-proxy"
|
||||
REACT_APP_STATSIG_PROXY_URL="https://api.uniswap.org/v1/statsig-proxy"
|
||||
REACT_APP_AWS_API_REGION="us-east-2"
|
||||
REACT_APP_AWS_API_ENDPOINT="https://beta.api.uniswap.org/v1/graphql"
|
||||
REACT_APP_TEMP_API_URL="https://temp.api.uniswap.org/v1"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# These API keys are intentionally public. Please do not report them - thank you for your concern.
|
||||
REACT_APP_AMPLITUDE_PROXY_URL="https://api.uniswap.org/v1/amplitude-proxy"
|
||||
REACT_APP_STATSIG_PROXY_URL="https://api.uniswap.org/v1/statsig-proxy"
|
||||
REACT_APP_AWS_API_ENDPOINT="https://api.uniswap.org/v1/graphql"
|
||||
REACT_APP_FORTMATIC_KEY="pk_live_F937DF033A1666BF"
|
||||
REACT_APP_GOOGLE_ANALYTICS_ID="G-KDP9B6W4H8"
|
||||
|
||||
2
.github/dependabot.yml
vendored
@@ -9,3 +9,5 @@ updates:
|
||||
- dependency-name: '@uniswap/default-token-list'
|
||||
- dependency-name: '@uniswap/token-lists'
|
||||
- dependency-name: '@uniswap/widgets'
|
||||
reviewers:
|
||||
- 'Uniswap/dependabot-reviewers'
|
||||
|
||||
4
.github/workflows/release.yaml
vendored
@@ -62,7 +62,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
timeout-minutes: 2
|
||||
with:
|
||||
cid: ${{ steps.upload.outputs.hash }}
|
||||
cid: ${{ steps.pinata.outputs.hash }}
|
||||
seeds: ${{ secrets.CRUST_SEEDS }}
|
||||
|
||||
- name: Convert CIDv0 to CIDv1
|
||||
@@ -93,7 +93,7 @@ jobs:
|
||||
IPFS gateways:
|
||||
- https://${{ steps.convert-cidv0.outputs.cidv1 }}.ipfs.dweb.link/
|
||||
- https://${{ steps.convert-cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/
|
||||
- [ipfs://${{ steps.upload.outputs.hash }}/](ipfs://${{ steps.pinata.outputs.hash }}/)
|
||||
- [ipfs://${{ steps.pinata.outputs.hash }}/](ipfs://${{ steps.pinata.outputs.hash }}/)
|
||||
|
||||
${{ needs.tag.outputs.changelog }}
|
||||
|
||||
|
||||
25
.github/workflows/test.yml
vendored
@@ -36,13 +36,12 @@ jobs:
|
||||
fail_ci_if_error: false
|
||||
verbose: true
|
||||
|
||||
cypress-build:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
- run: yarn prepare
|
||||
|
||||
- run: yarn build
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
@@ -50,6 +49,24 @@ jobs:
|
||||
path: build
|
||||
if-no-files-found: error
|
||||
|
||||
size-tests:
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
- run: yarn test:size
|
||||
|
||||
|
||||
cypress-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
- uses: actions/cache@v3
|
||||
id: cypress-cache
|
||||
with:
|
||||
@@ -59,7 +76,7 @@ jobs:
|
||||
run: yarn cypress install
|
||||
|
||||
cypress-test-matrix:
|
||||
needs: cypress-build
|
||||
needs: [build, cypress-build]
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -96,7 +113,7 @@ jobs:
|
||||
|
||||
# Included as a single job to check against for cypress test success, as cypress runs in a matrix.
|
||||
cypress-tests:
|
||||
needs: cypress-test-matrix
|
||||
needs: [cypress-test-matrix]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo 'Finished cypress tests https\://dashboard.cypress.io/projects/yp82ef'
|
||||
|
||||
@@ -64,6 +64,14 @@ To run _all_ cypress integration tests _from the command line_:
|
||||
yarn cypress:run
|
||||
```
|
||||
|
||||
## Adding a new dependency
|
||||
|
||||
Adding many new dependencies would cause bloat, so we have a test to guard against this: `scripts/test-size.js`. This will run as part of CI with every PR.
|
||||
|
||||
If you *need* to add a new dependency, and it causes the generated build to exceed its size quota, you'll need to increase the quota. Do so in `scripts/test-size.js`.
|
||||
|
||||
You can also run the test on your last build using `yarn build && yarn test:size`. If you exceed the size quota, it will let you know what to do :).
|
||||
|
||||
## Engineering standards
|
||||
|
||||
Code merged into the `main` branch of this repository should adhere to high standards of correctness and maintainability.
|
||||
|
||||
@@ -22,7 +22,7 @@ module.exports = {
|
||||
},
|
||||
webpack: {
|
||||
plugins: [
|
||||
new VanillaExtractPlugin(),
|
||||
new VanillaExtractPlugin({ identifiers: 'short' }),
|
||||
new DefinePlugin({
|
||||
'process.env.REACT_APP_GIT_COMMIT_HASH': JSON.stringify(commitHash.toString()),
|
||||
}),
|
||||
|
||||
@@ -10,28 +10,28 @@ describe('Add Liquidity', () => {
|
||||
})
|
||||
|
||||
it('loads the two correct tokens', () => {
|
||||
cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/0xc778417E063141139Fce010982780140Aa0cD5Ab/500')
|
||||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'MKR')
|
||||
cy.visit('/add/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6/500')
|
||||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'UNI')
|
||||
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'ETH')
|
||||
})
|
||||
|
||||
it('does not crash if ETH is duplicated', () => {
|
||||
cy.visit('/add/0xc778417E063141139Fce010982780140Aa0cD5Ab/0xc778417E063141139Fce010982780140Aa0cD5Ab')
|
||||
cy.visit('/add/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6')
|
||||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'ETH')
|
||||
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('not.contain.text', 'ETH')
|
||||
})
|
||||
|
||||
it.skip('token not in storage is loaded', () => {
|
||||
cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
|
||||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'SKL')
|
||||
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'MKR')
|
||||
cy.visit('/add/0x07865c6e87b9f70255377e024ace6630c1eaa37f/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984')
|
||||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'USDC')
|
||||
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'UNI')
|
||||
})
|
||||
|
||||
it.skip('single token can be selected', () => {
|
||||
cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d')
|
||||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'SKL')
|
||||
cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
|
||||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'MKR')
|
||||
cy.visit('/add/0x07865c6e87b9f70255377e024ace6630c1eaa37f')
|
||||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'USDC')
|
||||
cy.visit('/add/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984')
|
||||
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'UNI')
|
||||
})
|
||||
|
||||
it.skip('loads fee tier distribution', () => {
|
||||
@@ -53,7 +53,7 @@ describe('Add Liquidity', () => {
|
||||
}
|
||||
})
|
||||
|
||||
cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/0xc778417E063141139Fce010982780140Aa0cD5Ab')
|
||||
cy.visit('/add/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6')
|
||||
|
||||
cy.wait('@FeeTierDistributionQuery')
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ describe('Landing Page', () => {
|
||||
})
|
||||
|
||||
it('allows navigation to pool', () => {
|
||||
cy.get('#pool-nav-link').click()
|
||||
cy.get(getTestSelector('pool-nav-link')).first().click()
|
||||
cy.url().should('include', '/pool')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -5,8 +5,9 @@ const BONSAI_COLLECTION_ADDRESS = '0xec9c519d49856fd2f8133a0741b4dbe002ce211b'
|
||||
|
||||
describe('Testing nfts', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/')
|
||||
cy.get(getTestSelector('FiatOnrampAnnouncement-close')).first().click()
|
||||
cy.visit('/').then(() => {
|
||||
cy.get(getTestSelector('FiatOnrampAnnouncement-close')).first().click()
|
||||
})
|
||||
})
|
||||
|
||||
it('should load nft leaderboard', () => {
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
import { getTestSelector } from '../utils'
|
||||
|
||||
describe('Pool', () => {
|
||||
beforeEach(() => cy.visit('/pool'))
|
||||
beforeEach(() => {
|
||||
cy.visit('/pool').then(() => {
|
||||
cy.wait('@eth_blockNumber')
|
||||
})
|
||||
})
|
||||
|
||||
it('add liquidity links to /add/ETH', () => {
|
||||
cy.get(getTestSelector('FiatOnrampAnnouncement-close')).first().click()
|
||||
cy.get('#join-pool-button').click()
|
||||
cy.url().should('contain', '/add/ETH')
|
||||
cy.get('body')
|
||||
.then((body) => {
|
||||
if (body.find(getTestSelector('FiatOnrampAnnouncement-close')).length > 0) {
|
||||
cy.get(getTestSelector('FiatOnrampAnnouncement-close')).click()
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
cy.get('#join-pool-button')
|
||||
.click()
|
||||
.then(() => {
|
||||
cy.url().should('contain', '/add/ETH')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
describe('Remove Liquidity', () => {
|
||||
it('eth remove', () => {
|
||||
cy.visit('/remove/v2/ETH/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
|
||||
cy.visit('/remove/v2/ETH/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984')
|
||||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'ETH')
|
||||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR')
|
||||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'UNI')
|
||||
})
|
||||
|
||||
it('eth remove swap order', () => {
|
||||
cy.visit('/remove/v2/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/ETH')
|
||||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'MKR')
|
||||
cy.visit('/remove/v2/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984/ETH')
|
||||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'UNI')
|
||||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'ETH')
|
||||
})
|
||||
|
||||
it('loads the two correct tokens', () => {
|
||||
cy.visit('/remove/v2/0xc778417E063141139Fce010982780140Aa0cD5Ab/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
|
||||
cy.visit('/remove/v2/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984')
|
||||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH')
|
||||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR')
|
||||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'UNI')
|
||||
})
|
||||
|
||||
it('does not crash if ETH is duplicated', () => {
|
||||
cy.visit('/remove/v2/0xc778417E063141139Fce010982780140Aa0cD5Ab/0xc778417E063141139Fce010982780140Aa0cD5Ab')
|
||||
cy.visit('/remove/v2/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6')
|
||||
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH')
|
||||
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'WETH')
|
||||
})
|
||||
|
||||
@@ -10,14 +10,6 @@ describe('Universal search bar', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('should yield no results found when contract address is search term', () => {
|
||||
// Search for uni token contract address.
|
||||
cy.get('[data-cy="search-bar-input"]').last().type('0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984')
|
||||
cy.get('[data-cy="search-bar"]')
|
||||
.should('contain.text', 'No tokens found.')
|
||||
.and('contain.text', 'No NFT collections found.')
|
||||
})
|
||||
|
||||
it('should yield clickable result for regular token or nft collection search term', () => {
|
||||
// Search for uni token by name.
|
||||
cy.get('[data-cy="search-bar-input"]').last().clear().type('uni')
|
||||
@@ -43,7 +35,7 @@ describe('Universal search bar', () => {
|
||||
cy.contains('UNI is the governance token for Uniswap').should('exist')
|
||||
})
|
||||
|
||||
it('should show recent tokens and popular tokens with empty search term', () => {
|
||||
it.skip('should show recent tokens and popular tokens with empty search term', () => {
|
||||
cy.get('[data-cy="magnifying-icon"]')
|
||||
.parent()
|
||||
.then(($navIcon) => {
|
||||
|
||||
@@ -13,8 +13,8 @@ describe('Wallet Dropdown', () => {
|
||||
|
||||
it('should select a language', () => {
|
||||
cy.get(getTestSelector('wallet-select-language')).click()
|
||||
cy.get(getTestSelector('wallet-language-item')).contains('Afrikaans').click({ force: true })
|
||||
cy.get(getTestSelector('wallet-header')).should('contain', 'Taal')
|
||||
cy.get(getTestSelector('wallet-language-item')).contains('Deutsch').click({ force: true })
|
||||
cy.get(getTestSelector('wallet-header')).should('contain', 'Sprache')
|
||||
cy.get(getTestSelector('wallet-language-item')).contains('English').click({ force: true })
|
||||
cy.get(getTestSelector('wallet-header')).should('contain', 'Language')
|
||||
cy.get(getTestSelector('wallet-back')).click()
|
||||
@@ -36,8 +36,8 @@ describe('Wallet Dropdown', () => {
|
||||
|
||||
it('should select a language when not connected', () => {
|
||||
cy.get(getTestSelector('wallet-select-language')).click()
|
||||
cy.get(getTestSelector('wallet-language-item')).contains('Afrikaans').click({ force: true })
|
||||
cy.get(getTestSelector('wallet-header')).should('contain', 'Taal')
|
||||
cy.get(getTestSelector('wallet-language-item')).contains('Deutsch').click({ force: true })
|
||||
cy.get(getTestSelector('wallet-header')).should('contain', 'Sprache')
|
||||
cy.get(getTestSelector('wallet-language-item')).contains('English').click({ force: true })
|
||||
cy.get(getTestSelector('wallet-header')).should('contain', 'Language')
|
||||
cy.get(getTestSelector('wallet-back')).click()
|
||||
|
||||
@@ -36,7 +36,9 @@ Cypress.Commands.overwrite(
|
||||
cy.intercept('/service-worker.js', options?.serviceWorker ? undefined : { statusCode: 404 }).then(() => {
|
||||
original({
|
||||
...options,
|
||||
url: (url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url) + '?chain=goerli',
|
||||
url:
|
||||
(url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url) +
|
||||
`${url.includes('?') ? '&' : '?'}chain=goerli`,
|
||||
onBeforeLoad(win) {
|
||||
options?.onBeforeLoad?.(win)
|
||||
win.localStorage.clear()
|
||||
@@ -70,6 +72,7 @@ beforeEach(() => {
|
||||
// These are stripped by cypress because chromeWebSecurity === false; this adds them back in.
|
||||
cy.intercept(/infura.io/, (res) => {
|
||||
res.headers['origin'] = 'http://localhost:3000'
|
||||
res.alias = res.body.method
|
||||
res.continue()
|
||||
})
|
||||
|
||||
|
||||
@@ -7,17 +7,21 @@ import { Eip1193Bridge } from '@ethersproject/experimental/lib/eip1193-bridge'
|
||||
import { JsonRpcProvider } from '@ethersproject/providers'
|
||||
import { Wallet } from '@ethersproject/wallet'
|
||||
|
||||
import { SupportedChainId } from '../../src/constants/chains'
|
||||
|
||||
// todo: figure out how env vars actually work in CI
|
||||
// const TEST_PRIVATE_KEY = Cypress.env('INTEGRATION_TEST_PRIVATE_KEY')
|
||||
const TEST_PRIVATE_KEY = '0xe580410d7c37d26c6ad1a837bbae46bc27f9066a466fb3a66e770523b4666d19'
|
||||
|
||||
// address of the above key
|
||||
const TEST_ADDRESS_NEVER_USE = new Wallet(TEST_PRIVATE_KEY).address
|
||||
const CHAIN_ID = SupportedChainId.GOERLI
|
||||
const HEXLIFIED_CHAIN_ID = `0x${CHAIN_ID.toString(16)}`
|
||||
|
||||
const provider = new JsonRpcProvider('https://goerli.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847', 4)
|
||||
const provider = new JsonRpcProvider('https://goerli.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847', 5)
|
||||
const signer = new Wallet(TEST_PRIVATE_KEY, provider)
|
||||
export const injected = new (class extends Eip1193Bridge {
|
||||
chainId = /* GOERLI= */ 5
|
||||
chainId = CHAIN_ID
|
||||
|
||||
async sendAsync(...args: any[]) {
|
||||
console.debug('sendAsync called', ...args)
|
||||
@@ -46,9 +50,9 @@ export const injected = new (class extends Eip1193Bridge {
|
||||
}
|
||||
if (method === 'eth_chainId') {
|
||||
if (isCallbackForm) {
|
||||
callback(null, { result: '0x4' })
|
||||
callback(null, { result: HEXLIFIED_CHAIN_ID })
|
||||
} else {
|
||||
return Promise.resolve('0x4')
|
||||
return Promise.resolve(HEXLIFIED_CHAIN_ID)
|
||||
}
|
||||
}
|
||||
try {
|
||||
|
||||
48
package.json
@@ -8,11 +8,11 @@
|
||||
"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/**/*[!dbg].json\"",
|
||||
"contracts:compile": "yarn contracts:compile:abi && yarn contracts:compile:v3",
|
||||
"graphql:fetch": "node fetch-schema.js",
|
||||
"graphql:fetch": "node scripts/fetch-schema.js",
|
||||
"graphql:generate:data": "graphql-codegen --config apollo-codegen.ts",
|
||||
"graphql:generate:thegraph": "graphql-codegen --config apollo-codegen_thegraph.ts",
|
||||
"graphql:generate": "yarn graphql:generate:data && yarn graphql:generate:thegraph",
|
||||
"prei18n:extract": "node prei18n-extract.js",
|
||||
"prei18n:extract": "node scripts/prei18n-extract.js",
|
||||
"i18n:extract": "lingui extract --locale en-US",
|
||||
"i18n:compile": "yarn i18n:extract && lingui compile",
|
||||
"i18n:pseudo": "lingui extract --locale pseudo && lingui compile",
|
||||
@@ -23,6 +23,7 @@
|
||||
"deduplicate": "yarn-deduplicate --strategy=highest",
|
||||
"lint": "yarn eslint .",
|
||||
"test": "craco test --coverage",
|
||||
"test:size": "node scripts/test-size.js",
|
||||
"cypress:open": "cypress open --browser chrome --e2e",
|
||||
"cypress:run": "cypress run --browser chrome --e2e",
|
||||
"postinstall": "patch-package"
|
||||
@@ -111,7 +112,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.7.2",
|
||||
"@coinbase/wallet-sdk": "^3.3.0",
|
||||
"@coinbase/wallet-sdk": "^3.6.4",
|
||||
"@fontsource/ibm-plex-mono": "^4.5.1",
|
||||
"@fontsource/inter": "^4.5.1",
|
||||
"@graphql-codegen/cli": "^2.15.0",
|
||||
@@ -125,7 +126,7 @@
|
||||
"@lingui/react": "^3.14.0",
|
||||
"@looksrare/sdk": "^0.10.2",
|
||||
"@metamask/jazzicon": "^2.0.0",
|
||||
"@opensea/seaport-js": "^1.0.2",
|
||||
"@opensea/seaport-js": "^1.0.10",
|
||||
"@popperjs/core": "^2.4.4",
|
||||
"@reach/dialog": "^0.10.3",
|
||||
"@reach/portal": "^0.10.3",
|
||||
@@ -133,26 +134,26 @@
|
||||
"@reduxjs/toolkit": "^1.6.1",
|
||||
"@sentry/react": "^7.29.0",
|
||||
"@types/react-window-infinite-loader": "^1.0.6",
|
||||
"@uniswap/analytics": "1.2.0",
|
||||
"@uniswap/analytics-events": "^2.1.0",
|
||||
"@uniswap/conedison": "^1.2.1",
|
||||
"@uniswap/analytics": "^1.3.1",
|
||||
"@uniswap/analytics-events": "^2.5.1",
|
||||
"@uniswap/conedison": "^1.4.0",
|
||||
"@uniswap/governance": "^1.0.2",
|
||||
"@uniswap/liquidity-staker": "^1.0.2",
|
||||
"@uniswap/merkle-distributor": "1.0.1",
|
||||
"@uniswap/permit2-sdk": "1.2.0",
|
||||
"@uniswap/redux-multicall": "^1.1.8",
|
||||
"@uniswap/router-sdk": "^1.3.0",
|
||||
"@uniswap/sdk-core": "^3.0.1",
|
||||
"@uniswap/smart-order-router": "^2.10.0",
|
||||
"@uniswap/sdk-core": "^3.2.0",
|
||||
"@uniswap/smart-order-router": "^3.6.0",
|
||||
"@uniswap/token-lists": "^1.0.0-beta.30",
|
||||
"@uniswap/universal-router-sdk": "1.3.4",
|
||||
"@uniswap/universal-router-sdk": "^1.3.6",
|
||||
"@uniswap/v2-core": "1.0.0",
|
||||
"@uniswap/v2-periphery": "^1.1.0-beta.0",
|
||||
"@uniswap/v2-sdk": "^3.0.1",
|
||||
"@uniswap/v3-core": "1.0.0",
|
||||
"@uniswap/v3-periphery": "^1.1.1",
|
||||
"@uniswap/v3-sdk": "^3.9.0",
|
||||
"@uniswap/widgets": "^2.27.0",
|
||||
"@uniswap/widgets": "^2.47.1",
|
||||
"@vanilla-extract/css": "^1.7.2",
|
||||
"@vanilla-extract/css-utils": "^0.1.2",
|
||||
"@vanilla-extract/dynamic": "^2.0.2",
|
||||
@@ -165,23 +166,23 @@
|
||||
"@visx/responsive": "^2.10.0",
|
||||
"@visx/shape": "^2.11.1",
|
||||
"@walletconnect/ethereum-provider": "^1.8.0",
|
||||
"@web3-react/coinbase-wallet": "8.0.35-beta.0",
|
||||
"@web3-react/core": "8.0.35-beta.0",
|
||||
"@web3-react/eip1193": "8.0.27-beta.0",
|
||||
"@web3-react/empty": "8.0.20-beta.0",
|
||||
"@web3-react/gnosis-safe": "8.0.7-beta.0",
|
||||
"@web3-react/metamask": "8.0.30-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.37-beta.0",
|
||||
"@web3-react/coinbase-wallet": "8.1.2-beta.0",
|
||||
"@web3-react/core": "8.1.2-beta.0",
|
||||
"@web3-react/eip1193": "8.1.2-beta.0",
|
||||
"@web3-react/empty": "8.1.2-beta.0",
|
||||
"@web3-react/gnosis-safe": "8.1.2-beta.0",
|
||||
"@web3-react/metamask": "8.1.2-beta.0",
|
||||
"@web3-react/network": "8.1.2-beta.0",
|
||||
"@web3-react/types": "8.1.2-beta.0",
|
||||
"@web3-react/url": "8.1.2-beta.0",
|
||||
"@web3-react/walletconnect": "8.1.2-beta.0",
|
||||
"array.prototype.flat": "^1.2.4",
|
||||
"array.prototype.flatmap": "^1.2.4",
|
||||
"cids": "^1.0.0",
|
||||
"clsx": "^1.1.1",
|
||||
"copy-to-clipboard": "^3.2.0",
|
||||
"d3": "^7.6.1",
|
||||
"ethers": "^5.1.4",
|
||||
"ethers": "^5.7.2",
|
||||
"firebase": "^9.1.3",
|
||||
"focus-visible": "^5.2.0",
|
||||
"get-graphql-schema": "^2.1.2",
|
||||
@@ -222,6 +223,7 @@
|
||||
"redux": "^4.1.2",
|
||||
"redux-localstorage-simple": "^2.3.1",
|
||||
"setimmediate": "^1.0.5",
|
||||
"statsig-react": "^1.22.0",
|
||||
"styled-components": "^5.3.5",
|
||||
"tiny-invariant": "^1.2.0",
|
||||
"ua-parser-js": "^0.7.28",
|
||||
@@ -235,7 +237,7 @@
|
||||
"workbox-navigation-preload": "^6.1.0",
|
||||
"workbox-precaching": "^6.1.0",
|
||||
"workbox-routing": "^6.1.0",
|
||||
"zustand": "^4.0.0-rc.1"
|
||||
"zustand": "^4.3.6"
|
||||
},
|
||||
"engines": {
|
||||
"npm": "please-use-yarn",
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
require('dotenv').config({ path: '.env.production' })
|
||||
|
||||
const { exec } = require('child_process')
|
||||
const dataConfig = require('./graphql.config')
|
||||
const thegraphConfig = require('./graphql_thegraph.config')
|
||||
const dataConfig = require('../graphql.config')
|
||||
const thegraphConfig = require('../graphql_thegraph.config')
|
||||
|
||||
function fetchSchema(url, outputFile) {
|
||||
exec(
|
||||
58
scripts/test-size.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/* eslint-disable no-undef */
|
||||
const assert = require('assert')
|
||||
const chalk = require('chalk')
|
||||
const fs = require('fs')
|
||||
const gzipSize = require('gzip-size').sync
|
||||
const path = require('path')
|
||||
|
||||
const buildDir = path.join(__dirname, '../build')
|
||||
|
||||
let entrypoints
|
||||
try {
|
||||
entrypoints = require(path.join(buildDir, 'asset-manifest.json')).entrypoints
|
||||
} catch (e) {
|
||||
console.log(chalk.yellow('You must build first: `yarn build`'))
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
// The last recorded size for these assets, as reported by `yarn build`.
|
||||
const MAX_SIZE_MAIN_KB = 361.36
|
||||
|
||||
// This is the async-loaded js, called <number>.<hash>.js, with a matching css file.
|
||||
const MAX_SIZE_ENTRY_MB = 1.38
|
||||
|
||||
const SIZE_TOLERANCE_KB = 5
|
||||
|
||||
const jsEntrypoints = entrypoints.filter((entrypoint) => entrypoint.endsWith('js'))
|
||||
assert(jsEntrypoints.length === 3)
|
||||
|
||||
let fail = false
|
||||
console.log('File sizes after gzip:\n')
|
||||
jsEntrypoints.forEach((entrypoint) => {
|
||||
const name = entrypoint.match(/\/([\w\d-]*)\./)[1]
|
||||
const size = gzipSize(fs.readFileSync(path.join(buildDir, entrypoint)))
|
||||
|
||||
let maxSize = MAX_SIZE_ENTRY_MB * 1024 * 1024
|
||||
if (name === 'runtime-main') {
|
||||
return
|
||||
} else if (name === 'main') {
|
||||
maxSize = MAX_SIZE_MAIN_KB * 1024
|
||||
}
|
||||
maxSize += SIZE_TOLERANCE_KB * 1024
|
||||
|
||||
if (maxSize > size) {
|
||||
console.log(chalk.green(`\t${toKb(maxSize)}\t${entrypoint}`))
|
||||
} else {
|
||||
console.log(chalk.red(`\t${toKb(maxSize)}\t${entrypoint}`), '\tdid you import an unnecessary dependency?')
|
||||
fail = true
|
||||
}
|
||||
})
|
||||
if (fail) {
|
||||
console.log(chalk.yellow('\nOne or more of your files has grown too large.'))
|
||||
console.log(chalk.yellow('Reduce the file size or update the size limit (in scripts/test-size.js)'))
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
function toKb(bytes) {
|
||||
return ((bytes / 1024).toFixed(2) + ' kB').padEnd(8)
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
<svg width="9" height="10" viewBox="0 0 9 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.2981 -1.65714e-07L4.24041 -2.13061e-07L4.24041 7.91103L4.16486 7.91103L1.25623 4.9323L0.538514 5.66731L4.76926 10L9 5.66731L8.28228 4.9323L5.37365 7.91103L5.2981 7.91103L5.2981 -1.65714e-07Z" fill="#2F80ED"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 326 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="9" height="10" viewBox="0 0 9 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.2981 -1.65714e-07L4.24041 -2.13061e-07L4.24041 7.91103L4.16486 7.91103L1.25623 4.9323L0.538514 5.66731L4.76926 10L9 5.66731L8.28228 4.9323L5.37365 7.91103L5.2981 7.91103L5.2981 -1.65714e-07Z" fill="#737373"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 326 B |
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 9.27455 20.9097 6.80375 19.1414 5" stroke="#AEAEAE" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 321 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 9.27455 20.9097 6.80375 19.1414 5" stroke="#2F80ED" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 321 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="12" height="7" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0.97168 1L6.20532 6L11.439 1" stroke="#2F80ED"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 164 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="12" height="7" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.4673 6L6.23364 1L0.999995 6" stroke="#388DFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 162 B |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 24 24" focusable="false" role="presentation" aria-hidden="true" class="css-yyruks"><g fill="none" stroke="currentColor" stroke-linecap="full" stroke-width="2"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><path d="M15 3h6v6"></path><path d="M10 14L21 3"></path></g></svg>
|
||||
|
Before Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 8.2 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 6H6M11 6L6 6M6 1V6M6 6L6 11" stroke="#2F80ED" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 190 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 6H6M11 6L6 6M6 1V6M6 6L6 11" stroke="#737373" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 190 B |
@@ -1,4 +0,0 @@
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="9" cy="9" r="9" fill="#E1E1E1"/>
|
||||
<path d="M8.06493 10.8317H9.15706V10.7592C9.17233 9.88089 9.42436 9.48757 10.0735 9.08662C10.7571 8.67421 11.1771 8.09378 11.1771 7.23459C11.1771 5.99354 10.2377 5.15344 8.83629 5.15344C7.54942 5.15344 6.51839 5.90571 6.46875 7.28041H7.62961C7.67543 6.47086 8.25204 6.11573 8.83629 6.11573C9.48546 6.11573 10.0124 6.54724 10.0124 7.22313C10.0124 7.79211 9.65729 8.19306 9.20288 8.47564C8.49262 8.91096 8.07257 9.34246 8.06493 10.7592V10.8317ZM8.64154 13.1534C9.05777 13.1534 9.40527 12.8136 9.40527 12.3897C9.40527 11.9735 9.05777 11.6298 8.64154 11.6298C8.22149 11.6298 7.87782 11.9735 7.87782 12.3897C7.87782 12.8136 8.22149 13.1534 8.64154 13.1534Z" fill="#737373"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 818 B |
@@ -1,4 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="8" cy="8" r="8" fill="#EDEEF2"/>
|
||||
<path d="M7.09618 9.67828H8.18831V9.60573C8.20358 8.72745 8.45561 8.33413 9.10477 7.93317C9.78831 7.52076 10.2084 6.94033 10.2084 6.08115C10.2084 4.8401 9.26897 4 7.86754 4C6.58067 4 5.54964 4.75227 5.5 6.12697H6.66086C6.70668 5.31742 7.28329 4.96229 7.86754 4.96229C8.51671 4.96229 9.04368 5.39379 9.04368 6.06969C9.04368 6.63866 8.68854 7.03962 8.23413 7.3222C7.52387 7.75752 7.10382 8.18902 7.09618 9.60573V9.67828ZM7.67279 12C8.08902 12 8.43652 11.6601 8.43652 11.2363C8.43652 10.82 8.08902 10.4764 7.67279 10.4764C7.25274 10.4764 6.90907 10.82 6.90907 11.2363C6.90907 11.6601 7.25274 12 7.67279 12Z" fill="#565A69"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 770 B |
@@ -1,12 +0,0 @@
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_988_5781)">
|
||||
<path d="M11.3333 12.5C7.33329 12.5 6.66663 8.5 3.99996 8.5M3.99996 8.5C6.66663 8.5 7.33329 4.5 11.3333 4.5M3.99996 8.5H1.66663" stroke="#888D9B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<circle cx="13.3334" cy="4.5" r="2" stroke="#888D9B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<circle cx="13.3334" cy="12.5" r="2" stroke="#888D9B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_988_5781">
|
||||
<rect width="16" height="16" fill="white" transform="translate(0 0.5)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 733 B |
|
Before Width: | Height: | Size: 235 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
@@ -1,17 +0,0 @@
|
||||
<!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
|
||||
<svg width="38" height="38" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#fff">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(1 1)" stroke-width="2">
|
||||
<circle stroke-opacity=".5" cx="18" cy="18" r="18"/>
|
||||
<path d="M36 18c0-9.94-8.06-18-18-18">
|
||||
<animateTransform
|
||||
attributeName="transform"
|
||||
type="rotate"
|
||||
from="0 18 18"
|
||||
to="360 18 18"
|
||||
dur="1s"
|
||||
repeatCount="indefinite"/>
|
||||
</path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 694 B |
|
Before Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 572 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 106 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 1.5H1.5V7.5H7.5V1.5ZM1.5 0H0V1.5V7.5V9H1.5H7.5H9V7.5V1.5V0H7.5H1.5ZM4.5 3H3V4.5V6H4.5H6V4.5V3H4.5ZM1.5 19.5V13.5H7.5V19.5H1.5ZM0 12H1.5H7.5H9V13.5V19.5V21H7.5H1.5H0V19.5V13.5V12ZM4.5 15H3V16.5V18H4.5H6V16.5V15H4.5ZM13.5 1.5H19.5V7.5H13.5V1.5ZM12 0H13.5H19.5H21V1.5V7.5V9H19.5H13.5H12V7.5V1.5V0ZM16.5 3H15V4.5V6H16.5H18V4.5V3H16.5ZM16.5 12H12V21H13.5V16.5H15V18H21V12H19.5V13.5H16.5V12ZM18 19.5H16.5V21H18V19.5ZM19.5 19.5H21V21H19.5V19.5Z" fill="black"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 611 B |
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 52 (66869) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Path</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g id="check-circle-(1)" transform="translate(1.000000, 0.000000)" stroke="#D9EAFF" stroke-width="2">
|
||||
<path d="M20,10.08 L20,11 C19.9974678,15.4286859 17.082294,19.328213 12.8353524,20.583901 C8.58841086,21.839589 4.02139355,20.1523121 1.61095509,16.4370663 C-0.799483376,12.7218205 -0.479136554,7.86363898 2.39827419,4.49707214 C5.27568494,1.13050531 10.0247126,0.0575252842 14.07,1.86" id="Path"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 911 B |
@@ -1,13 +0,0 @@
|
||||
<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g style="mix-blend-mode:darken">
|
||||
<path d="M4.15217 1.55141C3.96412 1.52242 3.95619 1.51902 4.04468 1.5055C4.21427 1.47958 4.61472 1.51491 4.89067 1.58012C5.53489 1.73232 6.12109 2.12221 6.74683 2.81466L6.91307 2.99862L7.15088 2.96062C8.15274 2.8006 9.17194 2.92778 10.0244 3.31918C10.2589 3.42686 10.6287 3.64121 10.6749 3.69629C10.6896 3.71384 10.7166 3.82684 10.7349 3.94742C10.7982 4.36458 10.7665 4.68434 10.6382 4.92317C10.5683 5.05313 10.5644 5.09432 10.6114 5.20554C10.6489 5.2943 10.7534 5.35999 10.8569 5.35985C11.0687 5.35956 11.2967 5.0192 11.4024 4.54561L11.4444 4.3575L11.5275 4.45109C11.9835 4.96459 12.3417 5.66488 12.4032 6.16335L12.4192 6.29332L12.3426 6.17517C12.2107 5.97186 12.0781 5.83346 11.9084 5.72183C11.6024 5.52062 11.2789 5.45215 10.4222 5.40727C9.64839 5.36675 9.21045 5.30106 8.77621 5.16032C8.03738 4.9209 7.66493 4.60204 6.78729 3.4576C6.39748 2.94928 6.15654 2.66804 5.91687 2.44155C5.37228 1.92691 4.83716 1.65701 4.15217 1.55141Z" fill="#FF007A"/>
|
||||
<path d="M10.8494 2.68637C10.8689 2.34575 10.9153 2.12108 11.0088 1.9159C11.0458 1.83469 11.0804 1.76822 11.0858 1.76822C11.0911 1.76822 11.075 1.82816 11.05 1.90142C10.9821 2.10054 10.9709 2.3729 11.0177 2.68978C11.0771 3.09184 11.1109 3.14985 11.5385 3.58416C11.739 3.78788 11.9723 4.0448 12.0568 4.15511L12.2106 4.35568L12.0568 4.21234C11.8688 4.03705 11.4364 3.6952 11.3409 3.64633C11.2768 3.61356 11.2673 3.61413 11.2278 3.65321C11.1914 3.68922 11.1837 3.74333 11.1787 3.99915C11.1708 4.39786 11.1161 4.65377 10.9842 4.90965C10.9128 5.04805 10.9015 5.01851 10.9661 4.8623C11.0143 4.74566 11.0192 4.69439 11.0189 4.30842C11.0181 3.53291 10.9255 3.34647 10.3823 3.02709C10.2447 2.94618 10.0179 2.8295 9.87839 2.76778C9.73887 2.70606 9.62805 2.6523 9.63208 2.64828C9.64746 2.63307 10.1772 2.78675 10.3905 2.86828C10.7077 2.98954 10.76 3.00526 10.7985 2.99063C10.8244 2.98082 10.8369 2.90608 10.8494 2.68637Z" fill="#FF007A"/>
|
||||
<path d="M4.51745 4.01304C4.13569 3.49066 3.89948 2.68973 3.95062 2.091L3.96643 1.90572L4.05333 1.92148C4.21652 1.95106 4.49789 2.05515 4.62964 2.13469C4.9912 2.35293 5.14773 2.64027 5.30697 3.37811C5.35362 3.59423 5.41482 3.8388 5.44298 3.9216C5.48831 4.05487 5.65962 4.36617 5.7989 4.56834C5.89922 4.71395 5.83258 4.78295 5.61082 4.76305C5.27215 4.73267 4.8134 4.41799 4.51745 4.01304Z" fill="#FF007A"/>
|
||||
<path d="M10.3863 7.90088C8.60224 7.18693 7.97389 6.56721 7.97389 5.52157C7.97389 5.36769 7.97922 5.24179 7.98571 5.24179C7.99221 5.24179 8.06124 5.29257 8.1391 5.35465C8.50088 5.64305 8.906 5.76623 10.0275 5.92885C10.6875 6.02455 11.0589 6.10185 11.4015 6.21477C12.4904 6.57371 13.1641 7.30212 13.3248 8.29426C13.3715 8.58255 13.3441 9.12317 13.2684 9.4081C13.2087 9.63315 13.0263 10.0388 12.9779 10.0544C12.9645 10.0587 12.9514 10.0076 12.9479 9.93809C12.9296 9.56554 12.7402 9.20285 12.4221 8.93116C12.0604 8.62227 11.5745 8.37633 10.3863 7.90088Z" fill="#FF007A"/>
|
||||
<path d="M9.13385 8.19748C9.11149 8.06527 9.07272 7.89643 9.04769 7.82228L9.00217 7.68748L9.08672 7.7818C9.20374 7.91234 9.2962 8.07937 9.37457 8.30185C9.43438 8.47165 9.44111 8.52215 9.44066 8.79807C9.4402 9.06896 9.43273 9.12575 9.3775 9.27859C9.29042 9.51959 9.18233 9.69048 9.00097 9.87391C8.67507 10.2036 8.25607 10.3861 7.65143 10.4618C7.54633 10.4749 7.24 10.4971 6.97069 10.511C6.292 10.5461 5.84531 10.6186 5.44393 10.7587C5.38623 10.7788 5.3347 10.7911 5.32947 10.7859C5.31323 10.7698 5.58651 10.6079 5.81223 10.4998C6.1305 10.3474 6.44733 10.2643 7.15719 10.1468C7.50785 10.0887 7.86998 10.0183 7.96194 9.99029C8.83033 9.72566 9.27671 9.04276 9.13385 8.19748Z" fill="#FF007A"/>
|
||||
<path d="M9.95169 9.64109C9.71465 9.13463 9.66022 8.64564 9.79008 8.18961C9.80399 8.14088 9.82632 8.101 9.83976 8.101C9.85319 8.101 9.90913 8.13105 9.96404 8.16777C10.0733 8.24086 10.2924 8.36395 10.876 8.68023C11.6043 9.0749 12.0196 9.3805 12.302 9.72965C12.5493 10.0354 12.7023 10.3837 12.776 10.8084C12.8177 11.0489 12.7932 11.6277 12.7311 11.8699C12.5353 12.6337 12.0802 13.2336 11.4311 13.5837C11.336 13.635 11.2506 13.6771 11.2414 13.6773C11.2321 13.6775 11.2668 13.5899 11.3184 13.4827C11.5367 13.029 11.5616 12.5877 11.3965 12.0965C11.2954 11.7957 11.0893 11.4287 10.6732 10.8084C10.1893 10.0873 10.0707 9.89539 9.95169 9.64109Z" fill="#FF007A"/>
|
||||
<path d="M3.25046 12.3737C3.91252 11.8181 4.73629 11.4234 5.48666 11.3022C5.81005 11.25 6.34877 11.2707 6.64823 11.3469C7.12824 11.469 7.55763 11.7425 7.78094 12.0683C7.99918 12.3867 8.09281 12.6642 8.19029 13.2816C8.22875 13.5252 8.27057 13.7697 8.28323 13.8251C8.35644 14.1451 8.4989 14.4008 8.67544 14.5293C8.95583 14.7333 9.43865 14.7459 9.91362 14.5618C9.99423 14.5305 10.0642 14.5089 10.0691 14.5138C10.0864 14.5308 9.84719 14.6899 9.67847 14.7737C9.45143 14.8864 9.2709 14.93 9.03102 14.93C8.59601 14.93 8.23486 14.7101 7.9335 14.2616C7.87419 14.1733 7.7409 13.909 7.63729 13.6741C7.3191 12.9528 7.16199 12.7331 6.79255 12.4926C6.47104 12.2834 6.05641 12.2459 5.74449 12.3979C5.33475 12.5976 5.22043 13.118 5.51389 13.4478C5.63053 13.5789 5.84803 13.6919 6.02588 13.7139C6.35861 13.7551 6.64455 13.5035 6.64455 13.1696C6.64455 12.9528 6.56071 12.8291 6.34966 12.7344C6.0614 12.6051 5.75156 12.7563 5.75304 13.0254C5.75368 13.1402 5.80396 13.2122 5.91971 13.2643C5.99397 13.2977 5.99569 13.3003 5.93514 13.2878C5.67066 13.2333 5.6087 12.9164 5.82135 12.706C6.07667 12.4535 6.60461 12.5649 6.78591 12.9097C6.86208 13.0545 6.87091 13.3429 6.80451 13.517C6.6559 13.9068 6.22256 14.1117 5.78297 14.0002C5.48368 13.9242 5.36181 13.842 5.00097 13.4726C4.37395 12.8306 4.13053 12.7062 3.22657 12.566L3.05335 12.5391L3.25046 12.3737Z" fill="#FF007A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.308383 0.883984C2.40235 3.40996 3.84457 4.45213 4.00484 4.67231C4.13717 4.85412 4.08737 5.01757 3.86067 5.14567C3.7346 5.21689 3.47541 5.28905 3.34564 5.28905C3.19887 5.28905 3.14847 5.23278 3.14847 5.23278C3.06337 5.15255 3.01544 5.16658 2.5784 4.39555C1.97166 3.45981 1.46389 2.68357 1.45004 2.67057C1.41801 2.64052 1.41856 2.64153 2.51654 4.59413C2.69394 5.0011 2.55182 5.15049 2.55182 5.20845C2.55182 5.32636 2.51946 5.38834 2.37311 5.55059C2.12914 5.8211 2.02008 6.12505 1.94135 6.7541C1.8531 7.45926 1.60492 7.95737 0.917156 8.80989C0.514562 9.30893 0.448686 9.4004 0.3471 9.60153C0.219144 9.85482 0.183961 9.99669 0.169701 10.3165C0.154629 10.6547 0.183983 10.8732 0.287934 11.1965C0.378939 11.4796 0.473932 11.6665 0.716778 12.0403C0.926352 12.3629 1.04702 12.6027 1.04702 12.6965C1.04702 12.7711 1.06136 12.7712 1.38611 12.6983C2.16328 12.5239 2.79434 12.2171 3.14925 11.8411C3.36891 11.6084 3.42048 11.4799 3.42215 11.1611C3.42325 10.9525 3.41587 10.9088 3.35914 10.7888C3.2668 10.5935 3.09869 10.4311 2.72817 10.1794C2.2427 9.84953 2.03534 9.58398 1.97807 9.21878C1.93108 8.91913 1.98559 8.70771 2.25416 8.14825C2.53214 7.56916 2.60103 7.32239 2.64763 6.73869C2.67773 6.36158 2.71941 6.21286 2.82842 6.09348C2.94212 5.969 3.04447 5.92684 3.32584 5.88863C3.78457 5.82635 4.07667 5.70839 4.31677 5.48849C4.52505 5.29772 4.61221 5.11391 4.62558 4.8372L4.63574 4.62747L4.51934 4.49259C4.09783 4.00411 0.0261003 0.5 0.000160437 0.5C-0.00538105 0.5 0.133325 0.672804 0.308383 0.883984ZM1.28364 10.6992C1.37894 10.5314 1.3283 10.3158 1.16889 10.2104C1.01827 10.1109 0.78428 10.1578 0.78428 10.2875C0.78428 10.3271 0.806303 10.3559 0.855937 10.3813C0.939514 10.424 0.945581 10.4721 0.879823 10.5703C0.81323 10.6698 0.818604 10.7573 0.894991 10.8167C1.0181 10.9125 1.19237 10.8598 1.28364 10.6992Z" fill="#FF007A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.92523 5.99865C4.70988 6.06439 4.50054 6.29124 4.43574 6.5291C4.39621 6.67421 4.41864 6.92875 4.47785 7.00736C4.57351 7.13433 4.66602 7.16778 4.91651 7.16603C5.40693 7.16263 5.83327 6.95358 5.88284 6.69224C5.92347 6.47801 5.73622 6.18112 5.4783 6.05078C5.34521 5.98355 5.06217 5.95688 4.92523 5.99865ZM5.49853 6.44422C5.57416 6.33741 5.54107 6.22198 5.41245 6.14391C5.1675 5.99525 4.79708 6.11827 4.79708 6.34826C4.79708 6.46274 4.99025 6.58765 5.16731 6.58765C5.28516 6.58765 5.44644 6.5178 5.49853 6.44422Z" fill="#FF007A"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 7.9 KiB |
@@ -1,5 +0,0 @@
|
||||
<svg width="500" height="500" viewBox="0 0 500 500" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="250" cy="250" r="250" fill="#FF0420"/>
|
||||
<path d="M177.133 316.446C162.247 316.446 150.051 312.943 140.544 305.938C131.162 298.808 126.471 288.676 126.471 275.541C126.471 272.789 126.784 269.411 127.409 265.408C129.036 256.402 131.35 245.581 134.352 232.947C142.858 198.547 164.812 181.347 200.213 181.347C209.845 181.347 218.476 182.973 226.107 186.225C233.738 189.352 239.742 194.106 244.12 200.486C248.498 206.74 250.688 214.246 250.688 223.002C250.688 225.629 250.375 228.944 249.749 232.947C247.873 244.08 245.621 254.901 242.994 265.408C238.616 282.546 231.048 295.368 220.29 303.874C209.532 312.255 195.147 316.446 177.133 316.446ZM179.76 289.426C186.766 289.426 192.707 287.362 197.586 283.234C202.59 279.106 206.155 272.789 208.281 264.283C211.158 252.524 213.348 242.266 214.849 233.51C215.349 230.883 215.599 228.194 215.599 225.441C215.599 214.058 209.657 208.366 197.774 208.366C190.768 208.366 184.764 210.43 179.76 214.558C174.882 218.687 171.379 225.004 169.253 233.51C167.001 241.891 164.749 252.149 162.498 264.283C161.997 266.784 161.747 269.411 161.747 272.163C161.747 283.672 167.752 289.426 179.76 289.426Z" fill="white"/>
|
||||
<path d="M259.303 314.57C257.927 314.57 256.863 314.132 256.113 313.256C255.487 312.255 255.3 311.13 255.55 309.879L281.444 187.914C281.694 186.538 282.382 185.412 283.508 184.536C284.634 183.661 285.822 183.223 287.073 183.223H336.985C350.87 183.223 362.003 186.1 370.384 191.854C378.891 197.609 383.144 205.927 383.144 216.81C383.144 219.937 382.769 223.19 382.018 226.567C378.891 240.953 372.574 251.586 363.067 258.466C353.685 265.346 340.8 268.786 324.413 268.786H299.082L290.451 309.879C290.2 311.255 289.512 312.38 288.387 313.256C287.261 314.132 286.072 314.57 284.822 314.57H259.303ZM325.727 242.892C330.98 242.892 335.546 241.453 339.424 238.576C343.427 235.699 346.054 231.571 347.305 226.192C347.68 224.065 347.868 222.189 347.868 220.563C347.868 216.935 346.805 214.183 344.678 212.307C342.551 210.305 338.924 209.305 333.795 209.305H311.278L304.148 242.892H325.727Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.80333 4.8863C7.51044 5.17919 7.51044 5.65406 7.80333 5.94696C8.09622 6.23985 8.5711 6.23985 8.86399 5.94696L7.80333 4.8863ZM12.0837 1.66663L12.614 1.1363C12.3211 0.843403 11.8462 0.843403 11.5533 1.1363L12.0837 1.66663ZM15.3033 5.94696C15.5962 6.23985 16.0711 6.23985 16.364 5.94696C16.6569 5.65406 16.6569 5.17919 16.364 4.8863L15.3033 5.94696ZM11.3337 9.99996C11.3337 10.4142 11.6694 10.75 12.0837 10.75C12.4979 10.75 12.8337 10.4142 12.8337 9.99996H11.3337ZM12.1973 15.1136C12.4902 14.8207 12.4902 14.3459 12.1973 14.053C11.9044 13.7601 11.4296 13.7601 11.1367 14.053L12.1973 15.1136ZM7.91699 18.3333L7.38666 18.8636C7.52731 19.0043 7.71808 19.0833 7.91699 19.0833C8.1159 19.0833 8.30667 19.0043 8.44732 18.8636L7.91699 18.3333ZM4.69732 14.053C4.40443 13.7601 3.92956 13.7601 3.63666 14.053C3.34377 14.3459 3.34377 14.8207 3.63666 15.1136L4.69732 14.053ZM8.66699 10.8333C8.66699 10.4191 8.33121 10.0833 7.91699 10.0833C7.50278 10.0833 7.16699 10.4191 7.16699 10.8333H8.66699ZM8.86399 5.94696L12.614 2.19696L11.5533 1.1363L7.80333 4.8863L8.86399 5.94696ZM11.5533 2.19696L15.3033 5.94696L16.364 4.8863L12.614 1.1363L11.5533 2.19696ZM11.3337 1.66663V9.99996H12.8337V1.66663H11.3337ZM11.1367 14.053L7.38666 17.803L8.44732 18.8636L12.1973 15.1136L11.1367 14.053ZM8.44732 17.803L4.69732 14.053L3.63666 15.1136L7.38666 18.8636L8.44732 17.803ZM8.66699 18.3333L8.66699 10.8333H7.16699L7.16699 18.3333H8.66699Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,6 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 2.5L12.5 5L10 7.5" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M3 5L12.3333 5" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M5.5 13.5L3 11L5.5 8.5" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12.3333 11L3 11" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 476 B |
@@ -1,30 +0,0 @@
|
||||
<svg width="225" height="225" viewBox="0 0 225 225" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M74.8125 190.529C65.7561 190.513 55.5298 183.748 51.9715 175.42L19.9417 100.456C16.3834 92.1277 20.8404 85.39 29.8968 85.4068L111.417 85.5579C120.473 85.5747 130.699 92.3395 134.258 100.668L166.288 175.632C169.846 183.96 165.389 190.697 156.332 190.681L74.8125 190.529Z" fill="#131313"/>
|
||||
<path d="M92.1541 164.065C83.0977 164.049 72.8715 157.284 69.3132 148.956L28.3003 52.9672C24.7419 44.6391 29.199 37.9015 38.2554 37.9182L142.638 38.1117C151.695 38.1285 161.921 44.8933 165.479 53.2214L206.492 149.21C210.051 157.538 205.594 164.276 196.537 164.259L92.1541 164.065Z" fill="white"/>
|
||||
<path d="M92.1541 164.065C83.0977 164.049 72.8715 157.284 69.3132 148.956L28.3003 52.9672C24.7419 44.6391 29.199 37.9015 38.2554 37.9182L142.638 38.1117C151.695 38.1285 161.921 44.8933 165.479 53.2214L206.492 149.21C210.051 157.538 205.594 164.276 196.537 164.259L92.1541 164.065Z" fill="url(#paint0_radial)"/>
|
||||
<path d="M92.1541 164.065C83.0977 164.049 72.8715 157.284 69.3132 148.956L28.3003 52.9672C24.7419 44.6391 29.199 37.9015 38.2554 37.9182L142.638 38.1117C151.695 38.1285 161.921 44.8933 165.479 53.2214L206.492 149.21C210.051 157.538 205.594 164.276 196.537 164.259L92.1541 164.065Z" fill="url(#paint1_radial)"/>
|
||||
<path d="M92.1541 164.065C83.0977 164.049 72.8715 157.284 69.3132 148.956L28.3003 52.9672C24.7419 44.6391 29.199 37.9015 38.2554 37.9182L142.638 38.1117C151.695 38.1285 161.921 44.8933 165.479 53.2214L206.492 149.21C210.051 157.538 205.594 164.276 196.537 164.259L92.1541 164.065Z" fill="url(#paint2_radial)"/>
|
||||
<path d="M92.1541 164.065C83.0977 164.049 72.8715 157.284 69.3132 148.956L28.3003 52.9672C24.7419 44.6391 29.199 37.9015 38.2554 37.9182L142.638 38.1117C151.695 38.1285 161.921 44.8933 165.479 53.2214L206.492 149.21C210.051 157.538 205.594 164.276 196.537 164.259L92.1541 164.065Z" fill="url(#paint3_radial)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M92.958 165.95C82.7695 165.931 71.265 158.321 67.2619 148.952L26.2489 52.9632C22.2458 43.5941 27.26 36.0143 37.4485 36.0332L141.832 36.2266C152.02 36.2455 163.525 43.8559 167.528 53.225L208.541 149.214C212.544 158.583 207.53 166.163 197.341 166.144L92.958 165.95ZM71.3614 148.959C74.475 156.246 83.4229 162.166 91.3473 162.18L195.73 162.374C203.655 162.388 207.555 156.493 204.441 149.206L163.428 53.2174C160.315 45.9304 151.367 40.0111 143.442 39.9964L39.0592 39.803C31.1349 39.7883 27.2349 45.6837 30.3485 52.9708L71.3614 148.959Z" fill="#131313"/>
|
||||
<path d="M68.565 53.3425C81.1781 53.3659 95.4205 62.7875 100.376 74.3862C105.332 85.985 99.1246 95.3687 86.5115 95.3454C73.8984 95.322 59.6559 85.9004 54.7001 74.3016C49.7443 62.7028 55.9518 53.3191 68.565 53.3425Z" fill="#131313"/>
|
||||
<path d="M90.6891 104.981C103.302 105.004 117.545 114.425 122.5 126.024C127.456 137.623 121.249 147.007 108.636 146.983C96.0225 146.96 81.7801 137.538 76.8243 125.94C71.8685 114.341 78.076 104.957 90.6891 104.981Z" fill="#131313"/>
|
||||
<path d="M147.538 105.142C160.151 105.166 174.394 114.587 179.349 126.186C184.305 137.785 178.098 147.168 165.485 147.145C152.871 147.122 138.629 137.7 133.673 126.101C128.717 114.503 134.925 105.119 147.538 105.142Z" fill="#131313"/>
|
||||
<defs>
|
||||
<radialGradient id="paint0_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(134.41 68.3006) rotate(-33.9533) scale(90.6795 83.3208)">
|
||||
<stop offset="0.661458" stop-color="#C4FCF8"/>
|
||||
<stop offset="1" stop-color="white" stop-opacity="0"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint1_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(42.7873 129.218) rotate(-24.1606) scale(213.359 196.045)">
|
||||
<stop stop-color="#FF0099" stop-opacity="0.9"/>
|
||||
<stop offset="0.770833" stop-color="white" stop-opacity="0"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint2_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(176.854 148.655) rotate(-53.4908) scale(107.342 98.6309)">
|
||||
<stop stop-color="#FFEC43"/>
|
||||
<stop offset="0.805707" stop-color="#FFF6A8" stop-opacity="0"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint3_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(57.5443 53.4752) rotate(20.3896) scale(137.027 125.907)">
|
||||
<stop offset="0.125" stop-color="#5886FE" stop-opacity="0.46"/>
|
||||
<stop offset="0.673044" stop-color="white" stop-opacity="0"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.4 KiB |
@@ -1,4 +0,0 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.24453 18.0887C3.24331 19.0467 3.47372 19.7558 3.93576 20.2158C4.39658 20.6771 5.09574 20.904 6.03326 20.8967H8.11975C8.20693 20.8934 8.29386 20.9079 8.37521 20.9395C8.45656 20.9711 8.53062 21.019 8.5928 21.0802L10.0779 22.5484C10.7527 23.2226 11.4139 23.5578 12.0617 23.5541C12.7096 23.5504 13.3709 23.2152 14.0456 22.5484L15.5124 21.0802C15.5767 21.0182 15.6529 20.97 15.7365 20.9385C15.82 20.9069 15.9091 20.8927 15.9982 20.8967H18.0719C19.0192 20.8979 19.7251 20.6673 20.1896 20.2048C20.6541 19.7423 20.8864 19.0333 20.8864 18.0777V16.0021C20.8816 15.8222 20.9474 15.6476 21.0697 15.5157L22.5365 14.0475C23.2198 13.3758 23.559 12.7145 23.5541 12.0636C23.5492 11.4127 23.21 10.7508 22.5365 10.0779L21.0697 8.6097C20.9471 8.47802 20.8812 8.30329 20.8864 8.12336V6.04769C20.8851 5.09092 20.6547 4.3819 20.1951 3.92064C19.7355 3.45939 19.0278 3.22875 18.0719 3.22875H15.9982C15.9091 3.23242 15.8201 3.21807 15.7366 3.18653C15.6532 3.155 15.5769 3.10694 15.5124 3.04523L14.0456 1.57703C13.3709 0.902883 12.7096 0.567648 12.0617 0.571319C11.4139 0.574989 10.7527 0.910224 10.0779 1.57703L8.5928 3.04523C8.53043 3.10622 8.45638 3.15393 8.37508 3.18547C8.29377 3.21701 8.20689 3.23173 8.11975 3.22875H6.03326C5.08718 3.22998 4.38373 3.45877 3.92291 3.91513C3.4621 4.3715 3.23168 5.08235 3.23168 6.04769V8.12887C3.23683 8.3088 3.17096 8.48352 3.04833 8.6152L1.58154 10.0834C0.908042 10.7551 0.571289 11.417 0.571289 12.0691C0.571289 12.7213 0.912332 13.3844 1.59439 14.0585L3.06118 15.5267C3.18346 15.6586 3.24928 15.8332 3.24453 16.0131V18.0887Z" fill="currentColor"/>
|
||||
<path d="M11.996 15.9909C11.7795 16.3208 11.4599 16.5064 11.0887 16.5064C10.7072 16.5064 10.4083 16.3517 10.1299 15.9909L7.69677 13.0216C7.5215 12.8051 7.42871 12.5783 7.42871 12.3309C7.42871 11.8154 7.82049 11.4133 8.32567 11.4133C8.63497 11.4133 8.8824 11.5267 9.12984 11.8463L11.0475 14.2897L15.1199 7.75329C15.3364 7.40275 15.6147 7.23779 15.924 7.23779C16.4086 7.23779 16.8622 7.57802 16.8622 8.0832C16.8622 8.32033 16.7385 8.56777 16.6045 8.78427L11.996 15.9909Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 107 KiB |
@@ -1,3 +1,4 @@
|
||||
<svg viewBox="0 0 71 55" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Discord</title>
|
||||
<path d="M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.471 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6202 41.8354 49.6202 53.3179 44.3151C53.3935 44.2785 53.4831 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -1,3 +1,4 @@
|
||||
<svg viewBox="0 0 32 32" role="img" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Twitter</title>
|
||||
<path d="M31.2746 5.92398C30.7719 6.14694 30.2551 6.33512 29.727 6.4879C30.3522 5.7808 30.8289 4.9488 31.1199 4.03835C31.1851 3.83427 31.1175 3.61089 30.9498 3.47742C30.7822 3.34385 30.5495 3.32785 30.365 3.43716C29.2434 4.10235 28.0334 4.58039 26.7647 4.85993C25.4866 3.6111 23.7508 2.90039 21.9563 2.90039C18.1684 2.90039 15.0867 5.98199 15.0867 9.76975C15.0867 10.0681 15.1056 10.3647 15.143 10.6573C10.4426 10.2446 6.07276 7.9343 3.07198 4.25337C2.96504 4.12217 2.80029 4.05146 2.63162 4.06498C2.46285 4.0782 2.31121 4.17337 2.22595 4.31964C1.61733 5.36398 1.29557 6.5584 1.29557 7.77368C1.29557 9.4289 1.88654 10.9994 2.93046 12.2265C2.61304 12.1166 2.30502 11.9792 2.01103 11.816C1.8532 11.7282 1.66058 11.7295 1.50378 11.8194C1.34687 11.9093 1.2485 12.0747 1.24437 12.2554C1.24365 12.2859 1.24365 12.3163 1.24365 12.3472C1.24365 14.8179 2.5734 17.0423 4.60644 18.2547C4.43178 18.2373 4.25722 18.212 4.0838 18.1788C3.90502 18.1447 3.72117 18.2073 3.6006 18.3437C3.47983 18.4799 3.43988 18.6699 3.49552 18.8433C4.24804 21.1927 6.18548 22.9208 8.52767 23.4477C6.58507 24.6644 4.36355 25.3017 2.03147 25.3017C1.54486 25.3017 1.05547 25.2731 0.5765 25.2165C0.338565 25.1882 0.111055 25.3287 0.0300229 25.5549C-0.0510093 25.7813 0.0348745 26.0337 0.2373 26.1634C3.23322 28.0844 6.69738 29.0997 10.2551 29.0997C17.249 29.0997 21.6242 25.8016 24.063 23.0349C27.104 19.585 28.8481 15.0186 28.8481 10.5067C28.8481 10.3182 28.8452 10.1278 28.8394 9.93812C30.0392 9.03417 31.0722 7.94018 31.9128 6.68279C32.0404 6.49182 32.0266 6.23943 31.8787 6.06364C31.731 5.88774 31.4848 5.83087 31.2746 5.92398Z" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -1,10 +1,13 @@
|
||||
import { Trans } from '@lingui/macro'
|
||||
import * as Sentry from '@sentry/react'
|
||||
import { sendAnalyticsEvent } from '@uniswap/analytics'
|
||||
import { SwapEventName } from '@uniswap/analytics-events'
|
||||
import { ButtonLight, SmallButtonPrimary } from 'components/Button'
|
||||
import { ChevronUpIcon } from 'nft/components/icons'
|
||||
import { useIsMobile } from 'nft/hooks'
|
||||
import React, { PropsWithChildren, useState } from 'react'
|
||||
import { Copy } from 'react-feather'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import styled from 'styled-components/macro'
|
||||
import { isSentryEnabled } from 'utils/env'
|
||||
|
||||
@@ -217,13 +220,19 @@ const updateServiceWorkerInBackground = async () => {
|
||||
}
|
||||
|
||||
export default function ErrorBoundary({ children }: PropsWithChildren): JSX.Element {
|
||||
const { pathname } = useLocation()
|
||||
return (
|
||||
<Sentry.ErrorBoundary
|
||||
fallback={({ error, eventId }) => <Fallback error={error} eventId={eventId} />}
|
||||
beforeCapture={(scope) => {
|
||||
scope.setLevel('fatal')
|
||||
}}
|
||||
onError={updateServiceWorkerInBackground}
|
||||
onError={(error) => {
|
||||
updateServiceWorkerInBackground()
|
||||
if (pathname === '/swap') {
|
||||
sendAnalyticsEvent(SwapEventName.SWAP_ERROR, { error })
|
||||
}
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</Sentry.ErrorBoundary>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { BaseVariant, FeatureFlag, featureFlagSettings, useUpdateFlag } from 'featureFlags'
|
||||
import { useFiatOnrampFlag } from 'featureFlags/flags/fiatOnramp'
|
||||
import { NftListV2Variant, useNftListV2Flag } from 'featureFlags/flags/nftListV2'
|
||||
import { GqlRoutingVariant, useGqlRoutingFlag } from 'featureFlags/flags/gqlRouting'
|
||||
import { NftGraphqlVariant, useNftGraphqlFlag } from 'featureFlags/flags/nftlGraphql'
|
||||
import { PayWithAnyTokenVariant, usePayWithAnyTokenFlag } from 'featureFlags/flags/payWithAnyToken'
|
||||
import { Permit2Variant, usePermit2Flag } from 'featureFlags/flags/permit2'
|
||||
import { SwapWidgetVariant, useSwapWidgetFlag } from 'featureFlags/flags/swapWidget'
|
||||
import { TraceJsonRpcVariant, useTraceJsonRpcFlag } from 'featureFlags/flags/traceJsonRpc'
|
||||
import { useAtomValue, useUpdateAtom } from 'jotai/utils'
|
||||
@@ -206,24 +205,6 @@ export default function FeatureFlagModal() {
|
||||
<X size={24} />
|
||||
</CloseButton>
|
||||
</Header>
|
||||
<FeatureFlagOption
|
||||
variant={Permit2Variant}
|
||||
value={usePermit2Flag()}
|
||||
featureFlag={FeatureFlag.permit2}
|
||||
label="Permit 2 / Universal Router"
|
||||
/>
|
||||
<FeatureFlagOption
|
||||
variant={BaseVariant}
|
||||
value={useFiatOnrampFlag()}
|
||||
featureFlag={FeatureFlag.fiatOnramp}
|
||||
label="Fiat on-ramp"
|
||||
/>
|
||||
<FeatureFlagOption
|
||||
variant={NftListV2Variant}
|
||||
value={useNftListV2Flag()}
|
||||
featureFlag={FeatureFlag.nftListV2}
|
||||
label="NFT Listing Page v2"
|
||||
/>
|
||||
<FeatureFlagOption
|
||||
variant={PayWithAnyTokenVariant}
|
||||
value={usePayWithAnyTokenFlag()}
|
||||
@@ -236,6 +217,18 @@ export default function FeatureFlagModal() {
|
||||
featureFlag={FeatureFlag.swapWidget}
|
||||
label="Swap Widget"
|
||||
/>
|
||||
<FeatureFlagOption
|
||||
variant={GqlRoutingVariant}
|
||||
value={useGqlRoutingFlag()}
|
||||
featureFlag={FeatureFlag.gqlRouting}
|
||||
label="GraphQL NFT Routing"
|
||||
/>
|
||||
<FeatureFlagOption
|
||||
variant={NftGraphqlVariant}
|
||||
value={useNftGraphqlFlag()}
|
||||
featureFlag={FeatureFlag.nftGraphql}
|
||||
label="Migrate NFT read endpoints to GQL"
|
||||
/>
|
||||
<FeatureFlagGroup name="Debug">
|
||||
<FeatureFlagOption
|
||||
variant={TraceJsonRpcVariant}
|
||||
|
||||
@@ -3,8 +3,6 @@ import { sendAnalyticsEvent } from '@uniswap/analytics'
|
||||
import { InterfaceEventName } from '@uniswap/analytics-events'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import fiatMaskUrl from 'assets/svg/fiat_mask.svg'
|
||||
import { BaseVariant } from 'featureFlags'
|
||||
import { useFiatOnrampFlag } from 'featureFlags/flags/fiatOnramp'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { X } from 'react-feather'
|
||||
import { useToggleWalletDropdown } from 'state/application/hooks'
|
||||
@@ -120,13 +118,11 @@ export function FiatOnrampAnnouncement() {
|
||||
acknowledge({ user: true })
|
||||
}, [acknowledge, toggleWalletDropdown])
|
||||
|
||||
const fiatOnrampFlag = useFiatOnrampFlag()
|
||||
const openModal = useAppSelector((state) => state.application.openModal)
|
||||
|
||||
if (
|
||||
!account ||
|
||||
acks?.user ||
|
||||
fiatOnrampFlag === BaseVariant.Control ||
|
||||
localStorage.getItem(ANNOUNCEMENT_DISMISSED) ||
|
||||
acks?.renderCount >= MAX_RENDER_COUNT ||
|
||||
isMobile ||
|
||||
|
||||
@@ -3,14 +3,17 @@ import { useWeb3React } from '@web3-react/core'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { useCloseModal, useModalIsOpen } from 'state/application/hooks'
|
||||
import { ApplicationModal } from 'state/application/reducer'
|
||||
import { useIsDarkMode } from 'state/user/hooks'
|
||||
import styled, { useTheme } from 'styled-components/macro'
|
||||
import { CustomLightSpinner, ThemedText } from 'theme'
|
||||
|
||||
import Circle from '../../assets/images/blue-loader.svg'
|
||||
import Modal from '../Modal'
|
||||
|
||||
const Wrapper = styled.div`
|
||||
background-color: ${({ theme }) => theme.white};
|
||||
const MOONPAY_DARK_BACKGROUND = '#1c1c1e'
|
||||
const Wrapper = styled.div<{ isDarkMode: boolean }>`
|
||||
// #1c1c1e is the background color for the darkmode moonpay iframe as of 2/16/2023
|
||||
background-color: ${({ isDarkMode, theme }) => (isDarkMode ? MOONPAY_DARK_BACKGROUND : theme.white)};
|
||||
border-radius: 20px;
|
||||
box-shadow: ${({ theme }) => theme.deepShadow};
|
||||
display: flex;
|
||||
@@ -28,8 +31,9 @@ const ErrorText = styled(ThemedText.BodyPrimary)`
|
||||
text-align: center;
|
||||
width: 90%;
|
||||
`
|
||||
const StyledIframe = styled.iframe`
|
||||
background-color: ${({ theme }) => theme.white};
|
||||
const StyledIframe = styled.iframe<{ isDarkMode: boolean }>`
|
||||
// #1c1c1e is the background color for the darkmode moonpay iframe as of 2/16/2023
|
||||
background-color: ${({ isDarkMode, theme }) => (isDarkMode ? MOONPAY_DARK_BACKGROUND : theme.white)};
|
||||
border-radius: 12px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
@@ -67,6 +71,7 @@ const MOONPAY_SUPPORTED_CURRENCY_CODES = [
|
||||
export default function FiatOnrampModal() {
|
||||
const { account } = useWeb3React()
|
||||
const theme = useTheme()
|
||||
const isDarkMode = useIsDarkMode()
|
||||
const closeModal = useCloseModal()
|
||||
const fiatOnrampModalOpen = useModalIsOpen(ApplicationModal.FIAT_ONRAMP)
|
||||
|
||||
@@ -90,6 +95,7 @@ export default function FiatOnrampModal() {
|
||||
},
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
theme: isDarkMode ? 'dark' : 'light',
|
||||
colorCode: theme.accentAction,
|
||||
defaultCurrencyCode: 'eth',
|
||||
redirectUrl: 'https://app.uniswap.org/#/swap',
|
||||
@@ -112,7 +118,7 @@ export default function FiatOnrampModal() {
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
}, [account, theme.accentAction])
|
||||
}, [account, isDarkMode, theme.accentAction])
|
||||
|
||||
useEffect(() => {
|
||||
fetchSignedIframeUrl()
|
||||
@@ -120,7 +126,7 @@ export default function FiatOnrampModal() {
|
||||
|
||||
return (
|
||||
<Modal isOpen={fiatOnrampModalOpen} onDismiss={closeModal} maxHeight={720}>
|
||||
<Wrapper data-testid="fiat-onramp-modal">
|
||||
<Wrapper data-testid="fiat-onramp-modal" isDarkMode={isDarkMode}>
|
||||
{error ? (
|
||||
<>
|
||||
<ThemedText.MediumHeader>
|
||||
@@ -135,7 +141,12 @@ export default function FiatOnrampModal() {
|
||||
) : loading ? (
|
||||
<StyledSpinner src={Circle} alt="loading spinner" size="90px" />
|
||||
) : (
|
||||
<StyledIframe src={signedIframeUrl ?? ''} frameBorder="0" title="fiat-onramp-iframe" />
|
||||
<StyledIframe
|
||||
src={signedIframeUrl ?? ''}
|
||||
frameBorder="0"
|
||||
title="fiat-onramp-iframe"
|
||||
isDarkMode={isDarkMode}
|
||||
/>
|
||||
)}
|
||||
</Wrapper>
|
||||
</Modal>
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
import { getWalletMeta } from '@uniswap/conedison/provider/meta'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import { MouseoverTooltip } from 'components/Tooltip'
|
||||
import { Unicon } from 'components/Unicon'
|
||||
import { ConnectionType } from 'connection'
|
||||
import useENSAvatar from 'hooks/useENSAvatar'
|
||||
import ms from 'ms.macro'
|
||||
import { PropsWithChildren } from 'react'
|
||||
import styled from 'styled-components/macro'
|
||||
import { ThemedText } from 'theme'
|
||||
import { flexColumnNoWrap } from 'theme/styles'
|
||||
|
||||
import CoinbaseWalletIcon from '../../assets/images/coinbaseWalletIcon.svg'
|
||||
@@ -50,14 +56,53 @@ const Socks = () => {
|
||||
)
|
||||
}
|
||||
|
||||
const useIcon = (connectionType: ConnectionType) => {
|
||||
const { account } = useWeb3React()
|
||||
const Divider = styled.div`
|
||||
border-bottom: 1px solid ${({ theme }) => theme.backgroundOutline};
|
||||
margin: 12px 0;
|
||||
`
|
||||
|
||||
function UniconTooltip({ children, enabled }: PropsWithChildren<{ enabled?: boolean }>) {
|
||||
return (
|
||||
<MouseoverTooltip
|
||||
timeout={ms`3s`}
|
||||
offsetY={8}
|
||||
disableHover={!enabled}
|
||||
text={
|
||||
// TODO(cartcrom): add Learn More link when unicon microsite is polished
|
||||
<>
|
||||
<ThemedText.SubHeaderSmall color="textPrimary" paddingTop="4px">
|
||||
This is your Unicon
|
||||
</ThemedText.SubHeaderSmall>
|
||||
<Divider />
|
||||
<ThemedText.Caption paddingBottom="4px">
|
||||
Unicons are avatars for your wallet, generated from your address.
|
||||
</ThemedText.Caption>
|
||||
</>
|
||||
}
|
||||
placement="bottom"
|
||||
>
|
||||
<div>{children}</div>
|
||||
</MouseoverTooltip>
|
||||
)
|
||||
}
|
||||
|
||||
const useIcon = (connectionType: ConnectionType, size?: number, enableInfotips?: boolean) => {
|
||||
const { account, provider } = useWeb3React()
|
||||
const { avatar } = useENSAvatar(account ?? undefined)
|
||||
const isUniswapWallet = Boolean(provider && getWalletMeta(provider)?.name === 'Uniswap Wallet')
|
||||
|
||||
if (!account) return null
|
||||
|
||||
if (avatar || connectionType === ConnectionType.INJECTED) {
|
||||
return <Identicon />
|
||||
} else if (connectionType === ConnectionType.WALLET_CONNECT) {
|
||||
return <img src={WalletConnectIcon} alt="WalletConnect" />
|
||||
return isUniswapWallet ? (
|
||||
<UniconTooltip enabled={enableInfotips}>
|
||||
<Unicon address={account} size={size} />
|
||||
</UniconTooltip>
|
||||
) : (
|
||||
<img src={WalletConnectIcon} alt="WalletConnect" />
|
||||
)
|
||||
} else if (connectionType === ConnectionType.COINBASE_WALLET) {
|
||||
return <img src={CoinbaseWalletIcon} alt="Coinbase Wallet" />
|
||||
}
|
||||
@@ -65,9 +110,17 @@ const useIcon = (connectionType: ConnectionType) => {
|
||||
return undefined
|
||||
}
|
||||
|
||||
export default function StatusIcon({ connectionType, size }: { connectionType: ConnectionType; size?: number }) {
|
||||
export default function StatusIcon({
|
||||
connectionType,
|
||||
size,
|
||||
enableInfotips,
|
||||
}: {
|
||||
connectionType: ConnectionType
|
||||
size?: number
|
||||
enableInfotips?: boolean
|
||||
}) {
|
||||
const hasSocks = useHasSocks()
|
||||
const icon = useIcon(connectionType)
|
||||
const icon = useIcon(connectionType, size, enableInfotips)
|
||||
|
||||
return (
|
||||
<IconWrapper size={size ?? 16}>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { NATIVE_CHAIN_ID } from 'constants/tokens'
|
||||
import { TokenStandard } from 'graphql/data/__generated__/types-and-hooks'
|
||||
import { SearchToken } from 'graphql/data/SearchTokens'
|
||||
import { TokenQueryData } from 'graphql/data/Token'
|
||||
import { TopToken } from 'graphql/data/TopTokens'
|
||||
import { CHAIN_NAME_TO_CHAIN_ID } from 'graphql/data/util'
|
||||
@@ -7,14 +9,14 @@ import AssetLogo, { AssetLogoBaseProps } from './AssetLogo'
|
||||
|
||||
export default function QueryTokenLogo(
|
||||
props: AssetLogoBaseProps & {
|
||||
token?: TopToken | TokenQueryData
|
||||
token?: TopToken | TokenQueryData | SearchToken
|
||||
}
|
||||
) {
|
||||
const chainId = props.token?.chain ? CHAIN_NAME_TO_CHAIN_ID[props.token?.chain] : undefined
|
||||
|
||||
return (
|
||||
<AssetLogo
|
||||
isNative={props.token?.address === NATIVE_CHAIN_ID}
|
||||
isNative={props.token?.standard === TokenStandard.Native || props.token?.address === NATIVE_CHAIN_ID}
|
||||
chainId={chainId}
|
||||
address={props.token?.address}
|
||||
symbol={props.token?.symbol}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Trans } from '@lingui/macro'
|
||||
import { t, Trans } from '@lingui/macro'
|
||||
import FeatureFlagModal from 'components/FeatureFlagModal/FeatureFlagModal'
|
||||
import { PrivacyPolicyModal } from 'components/PrivacyPolicy'
|
||||
import { useOnClickOutside } from 'hooks/useOnClickOutside'
|
||||
@@ -127,7 +127,7 @@ export const MenuDropdown = () => {
|
||||
return (
|
||||
<>
|
||||
<Box position="relative" ref={ref}>
|
||||
<NavIcon isActive={isOpen} onClick={toggleOpen}>
|
||||
<NavIcon isActive={isOpen} onClick={toggleOpen} label={isOpen ? t`Show resources` : t`Hide resources`}>
|
||||
<EllipsisIcon viewBox="0 0 20 20" width={24} height={24} />
|
||||
</NavIcon>
|
||||
|
||||
@@ -166,6 +166,9 @@ export const MenuDropdown = () => {
|
||||
<SecondaryLinkedText href="https://docs.uniswap.org/">
|
||||
<Trans>Documentation</Trans> ↗
|
||||
</SecondaryLinkedText>
|
||||
<SecondaryLinkedText href="https://uniswap.canny.io/feature-requests">
|
||||
<Trans>Feedback</Trans> ↗
|
||||
</SecondaryLinkedText>
|
||||
<SecondaryLinkedText
|
||||
onClick={() => {
|
||||
toggleOpen()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { t } from '@lingui/macro'
|
||||
import { Box } from 'nft/components/Box'
|
||||
import { ReactNode } from 'react'
|
||||
|
||||
@@ -6,10 +7,11 @@ import * as styles from './NavIcon.css'
|
||||
interface NavIconProps {
|
||||
children: ReactNode
|
||||
isActive?: boolean
|
||||
label?: string
|
||||
onClick: () => void
|
||||
}
|
||||
|
||||
export const NavIcon = ({ children, isActive, onClick }: NavIconProps) => {
|
||||
export const NavIcon = ({ children, isActive, label = t`Navigation button`, onClick }: NavIconProps) => {
|
||||
return (
|
||||
<Box
|
||||
as="button"
|
||||
@@ -18,6 +20,7 @@ export const NavIcon = ({ children, isActive, onClick }: NavIconProps) => {
|
||||
onClick={onClick}
|
||||
height="40"
|
||||
width="40"
|
||||
aria-label={label}
|
||||
>
|
||||
{children}
|
||||
</Box>
|
||||
|
||||
102
src/components/NavBar/RecentlySearchedAssets.ts
Normal file
@@ -0,0 +1,102 @@
|
||||
import { SupportedChainId } from 'constants/chains'
|
||||
import { NATIVE_CHAIN_ID, nativeOnChain } from 'constants/tokens'
|
||||
import { Chain, NftCollection, useRecentlySearchedAssetsQuery } from 'graphql/data/__generated__/types-and-hooks'
|
||||
import { SearchToken } from 'graphql/data/SearchTokens'
|
||||
import { CHAIN_NAME_TO_CHAIN_ID } from 'graphql/data/util'
|
||||
import { useAtom } from 'jotai'
|
||||
import { atomWithStorage, useAtomValue } from 'jotai/utils'
|
||||
import { GenieCollection } from 'nft/types'
|
||||
import { useCallback, useMemo } from 'react'
|
||||
import { getNativeTokenDBAddress } from 'utils/nativeTokens'
|
||||
|
||||
type RecentlySearchedAsset = {
|
||||
isNft?: boolean
|
||||
address: string
|
||||
chain: Chain
|
||||
}
|
||||
|
||||
// Temporary measure used until backend supports addressing by "NATIVE"
|
||||
const NATIVE_QUERY_ADDRESS_INPUT = null as unknown as string
|
||||
function getQueryAddress(chain: Chain) {
|
||||
return getNativeTokenDBAddress(chain) ?? NATIVE_QUERY_ADDRESS_INPUT
|
||||
}
|
||||
|
||||
const recentlySearchedAssetsAtom = atomWithStorage<RecentlySearchedAsset[]>('recentlySearchedAssets', [])
|
||||
|
||||
export function useAddRecentlySearchedAsset() {
|
||||
const [searchHistory, updateSearchHistory] = useAtom(recentlySearchedAssetsAtom)
|
||||
|
||||
return useCallback(
|
||||
(asset: RecentlySearchedAsset) => {
|
||||
// Removes the new asset if it was already in the array
|
||||
const newHistory = searchHistory.filter(
|
||||
(oldAsset) => !(oldAsset.address === asset.address && oldAsset.chain === asset.chain)
|
||||
)
|
||||
newHistory.unshift(asset)
|
||||
updateSearchHistory(newHistory)
|
||||
},
|
||||
[searchHistory, updateSearchHistory]
|
||||
)
|
||||
}
|
||||
|
||||
export function useRecentlySearchedAssets() {
|
||||
const history = useAtomValue(recentlySearchedAssetsAtom)
|
||||
const shortenedHistory = useMemo(() => history.slice(0, 4), [history])
|
||||
|
||||
const { data: queryData, loading } = useRecentlySearchedAssetsQuery({
|
||||
variables: {
|
||||
collectionAddresses: shortenedHistory.filter((asset) => asset.isNft).map((asset) => asset.address),
|
||||
contracts: shortenedHistory
|
||||
.filter((asset) => !asset.isNft)
|
||||
.map((token) => ({
|
||||
address: token.address === NATIVE_CHAIN_ID ? getQueryAddress(token.chain) : token.address,
|
||||
chain: token.chain,
|
||||
})),
|
||||
},
|
||||
})
|
||||
|
||||
const data = useMemo(() => {
|
||||
if (shortenedHistory.length === 0) return []
|
||||
else if (!queryData) return undefined
|
||||
// Collects both tokens and collections in a map, so they can later be returned in original order
|
||||
const resultsMap: { [key: string]: GenieCollection | SearchToken } = {}
|
||||
|
||||
const queryCollections = queryData?.nftCollections?.edges.map((edge) => edge.node as NonNullable<NftCollection>)
|
||||
const collections = queryCollections?.map(
|
||||
(queryCollection): GenieCollection => {
|
||||
return {
|
||||
address: queryCollection.nftContracts?.[0]?.address ?? '',
|
||||
isVerified: queryCollection?.isVerified,
|
||||
name: queryCollection?.name,
|
||||
stats: {
|
||||
floor_price: queryCollection?.markets?.[0]?.floorPrice?.value,
|
||||
total_supply: queryCollection?.numAssets,
|
||||
},
|
||||
imageUrl: queryCollection?.image?.url ?? '',
|
||||
}
|
||||
},
|
||||
[queryCollections]
|
||||
)
|
||||
collections?.forEach((collection) => (resultsMap[collection.address] = collection))
|
||||
queryData.tokens?.filter(Boolean).forEach((token) => {
|
||||
resultsMap[token.address ?? `NATIVE-${token.chain}`] = token
|
||||
})
|
||||
|
||||
const data: (SearchToken | GenieCollection)[] = []
|
||||
shortenedHistory.forEach((asset) => {
|
||||
if (asset.address === 'NATIVE') {
|
||||
// Handles special case where wMATIC data needs to be used for MATIC
|
||||
const native = nativeOnChain(CHAIN_NAME_TO_CHAIN_ID[asset.chain] ?? SupportedChainId.MAINNET)
|
||||
const queryAddress = getQueryAddress(asset.chain)?.toLowerCase() ?? `NATIVE-${asset.chain}`
|
||||
const result = resultsMap[queryAddress]
|
||||
if (result) data.push({ ...result, address: 'NATIVE', ...native })
|
||||
} else {
|
||||
const result = resultsMap[asset.address]
|
||||
if (result) data.push(result)
|
||||
}
|
||||
})
|
||||
return data
|
||||
}, [queryData, shortenedHistory])
|
||||
|
||||
return { data, loading }
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
import { t, Trans } from '@lingui/macro'
|
||||
import { sendAnalyticsEvent, Trace, TraceEvent, useTrace } from '@uniswap/analytics'
|
||||
import { BrowserEvent, InterfaceElementName, InterfaceEventName, InterfaceSectionName } from '@uniswap/analytics-events'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import clsx from 'clsx'
|
||||
import { useSearchTokens } from 'graphql/data/SearchTokens'
|
||||
import useDebounce from 'hooks/useDebounce'
|
||||
import { useIsNftPage } from 'hooks/useIsNftPage'
|
||||
import { useOnClickOutside } from 'hooks/useOnClickOutside'
|
||||
@@ -12,7 +14,6 @@ import { Row } from 'nft/components/Flex'
|
||||
import { magicalGradientOnHover } from 'nft/css/common.css'
|
||||
import { useIsMobile, useIsTablet } from 'nft/hooks'
|
||||
import { fetchSearchCollections } from 'nft/queries'
|
||||
import { fetchSearchTokens } from 'nft/queries/genie/SearchTokensFetcher'
|
||||
import { ChangeEvent, useCallback, useEffect, useMemo, useReducer, useRef, useState } from 'react'
|
||||
import { useQuery } from 'react-query'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
@@ -64,16 +65,8 @@ export const SearchBar = () => {
|
||||
}
|
||||
)
|
||||
|
||||
const { data: tokens, isLoading: tokensAreLoading } = useQuery(
|
||||
['searchTokens', debouncedSearchValue],
|
||||
() => fetchSearchTokens(debouncedSearchValue),
|
||||
{
|
||||
refetchOnWindowFocus: false,
|
||||
refetchOnMount: false,
|
||||
refetchOnReconnect: false,
|
||||
enabled: !!debouncedSearchValue.length,
|
||||
}
|
||||
)
|
||||
const { chainId } = useWeb3React()
|
||||
const { data: tokens, loading: tokensAreLoading } = useSearchTokens(debouncedSearchValue, chainId ?? 1)
|
||||
|
||||
const isNFTPage = useIsNftPage()
|
||||
|
||||
@@ -221,7 +214,7 @@ export const SearchBar = () => {
|
||||
</Box>
|
||||
</Box>
|
||||
{isMobileOrTablet && (
|
||||
<NavIcon onClick={toggleOpen}>
|
||||
<NavIcon onClick={toggleOpen} label={placeholderText}>
|
||||
<NavMagnifyingGlassIcon />
|
||||
</NavIcon>
|
||||
)}
|
||||
|
||||
@@ -1,30 +1,35 @@
|
||||
import { Trans } from '@lingui/macro'
|
||||
import { useTrace } from '@uniswap/analytics'
|
||||
import { InterfaceSectionName, NavBarSearchTypes } from '@uniswap/analytics-events'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import { useNftGraphqlEnabled } from 'featureFlags/flags/nftlGraphql'
|
||||
import { HistoryDuration, SafetyLevel } from 'graphql/data/__generated__/types-and-hooks'
|
||||
import { useTrendingCollections } from 'graphql/data/nft/TrendingCollections'
|
||||
import { SearchToken } from 'graphql/data/SearchTokens'
|
||||
import useTrendingTokens from 'graphql/data/TrendingTokens'
|
||||
import { useIsNftPage } from 'hooks/useIsNftPage'
|
||||
import { Box } from 'nft/components/Box'
|
||||
import { Column, Row } from 'nft/components/Flex'
|
||||
import { subheadSmall } from 'nft/css/common.css'
|
||||
import { useSearchHistory } from 'nft/hooks'
|
||||
import { fetchTrendingCollections } from 'nft/queries'
|
||||
import { fetchTrendingTokens } from 'nft/queries/genie/TrendingTokensFetcher'
|
||||
import { FungibleToken, GenieCollection, TimePeriod, TrendingCollection } from 'nft/types'
|
||||
import { GenieCollection, TimePeriod, TrendingCollection } from 'nft/types'
|
||||
import { formatEthPrice } from 'nft/utils/currency'
|
||||
import { ReactNode, useEffect, useMemo, useState } from 'react'
|
||||
import { useQuery } from 'react-query'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
|
||||
import { ClockIcon, TrendingArrow } from '../../nft/components/icons'
|
||||
import { useRecentlySearchedAssets } from './RecentlySearchedAssets'
|
||||
import * as styles from './SearchBar.css'
|
||||
import { CollectionRow, SkeletonRow, TokenRow } from './SuggestionRow'
|
||||
|
||||
function isCollection(suggestion: GenieCollection | FungibleToken | TrendingCollection) {
|
||||
return (suggestion as FungibleToken).decimals === undefined
|
||||
function isCollection(suggestion: GenieCollection | SearchToken | TrendingCollection) {
|
||||
return (suggestion as SearchToken).decimals === undefined
|
||||
}
|
||||
|
||||
interface SearchBarDropdownSectionProps {
|
||||
toggleOpen: () => void
|
||||
suggestions: (GenieCollection | FungibleToken)[]
|
||||
suggestions: (GenieCollection | SearchToken)[]
|
||||
header: JSX.Element
|
||||
headerIcon?: JSX.Element
|
||||
hoveredIndex: number | undefined
|
||||
@@ -53,7 +58,7 @@ const SearchBarDropdownSection = ({
|
||||
</Row>
|
||||
<Column gap="12">
|
||||
{suggestions.map((suggestion, index) =>
|
||||
isLoading ? (
|
||||
isLoading || !suggestion ? (
|
||||
<SkeletonRow key={index} />
|
||||
) : isCollection(suggestion) ? (
|
||||
<CollectionRow
|
||||
@@ -73,7 +78,7 @@ const SearchBarDropdownSection = ({
|
||||
) : (
|
||||
<TokenRow
|
||||
key={suggestion.address}
|
||||
token={suggestion as FungibleToken}
|
||||
token={suggestion as SearchToken}
|
||||
isHovered={hoveredIndex === index + startingIndex}
|
||||
setHoveredIndex={setHoveredIndex}
|
||||
toggleOpen={toggleOpen}
|
||||
@@ -92,9 +97,13 @@ const SearchBarDropdownSection = ({
|
||||
)
|
||||
}
|
||||
|
||||
function isKnownToken(token: SearchToken) {
|
||||
return token.project?.safetyLevel == SafetyLevel.Verified || token.project?.safetyLevel == SafetyLevel.MediumWarning
|
||||
}
|
||||
|
||||
interface SearchBarDropdownProps {
|
||||
toggleOpen: () => void
|
||||
tokens: FungibleToken[]
|
||||
tokens: SearchToken[]
|
||||
collections: GenieCollection[]
|
||||
queryText: string
|
||||
hasInput: boolean
|
||||
@@ -110,10 +119,13 @@ export const SearchBarDropdown = ({
|
||||
isLoading,
|
||||
}: SearchBarDropdownProps) => {
|
||||
const [hoveredIndex, setHoveredIndex] = useState<number | undefined>(0)
|
||||
const { history: searchHistory, updateItem: updateSearchHistory } = useSearchHistory()
|
||||
const shortenedHistory = useMemo(() => searchHistory.slice(0, 2), [searchHistory])
|
||||
|
||||
const { data: searchHistory } = useRecentlySearchedAssets()
|
||||
const shortenedHistory = useMemo(() => searchHistory?.slice(0, 2) ?? [...Array<SearchToken>(2)], [searchHistory])
|
||||
|
||||
const { pathname } = useLocation()
|
||||
const isNFTPage = useIsNftPage()
|
||||
const isNftGraphqlEnabled = useNftGraphqlEnabled()
|
||||
const isTokenPage = pathname.includes('/tokens')
|
||||
const [resultsState, setResultsState] = useState<ReactNode>()
|
||||
|
||||
@@ -122,45 +134,32 @@ export const SearchBarDropdown = ({
|
||||
() => fetchTrendingCollections({ volumeType: 'eth', timePeriod: 'ONE_DAY' as TimePeriod, size: 3 })
|
||||
)
|
||||
|
||||
const trendingCollections = useMemo(
|
||||
() =>
|
||||
trendingCollectionResults
|
||||
? trendingCollectionResults
|
||||
.map((collection) => ({
|
||||
...collection,
|
||||
collectionAddress: collection.address,
|
||||
floorPrice: formatEthPrice(collection.floor?.toString()),
|
||||
stats: {
|
||||
total_supply: collection.totalSupply,
|
||||
one_day_change: collection.floorChange,
|
||||
floor_price: formatEthPrice(collection.floor?.toString()),
|
||||
},
|
||||
}))
|
||||
.slice(0, isNFTPage ? 3 : 2)
|
||||
: [...Array<GenieCollection>(isNFTPage ? 3 : 2)],
|
||||
[isNFTPage, trendingCollectionResults]
|
||||
)
|
||||
const { data: gqlData, loading } = useTrendingCollections(3, HistoryDuration.Day)
|
||||
|
||||
const { data: trendingTokenResults, isLoading: trendingTokensAreLoading } = useQuery(
|
||||
['trendingTokens'],
|
||||
() => fetchTrendingTokens(4),
|
||||
{
|
||||
refetchOnWindowFocus: false,
|
||||
refetchOnMount: false,
|
||||
refetchOnReconnect: false,
|
||||
}
|
||||
)
|
||||
useEffect(() => {
|
||||
trendingTokenResults?.forEach(updateSearchHistory)
|
||||
}, [trendingTokenResults, updateSearchHistory])
|
||||
const trendingCollections = useMemo(() => {
|
||||
const gatedTrendingCollections = isNftGraphqlEnabled ? gqlData : trendingCollectionResults
|
||||
return gatedTrendingCollections && (!isNftGraphqlEnabled || !loading)
|
||||
? gatedTrendingCollections
|
||||
.map((collection) => ({
|
||||
...collection,
|
||||
collectionAddress: collection.address,
|
||||
floorPrice: isNftGraphqlEnabled ? collection.floor : formatEthPrice(collection.floor?.toString()),
|
||||
stats: {
|
||||
total_supply: collection.totalSupply,
|
||||
one_day_change: collection.floorChange,
|
||||
floor_price: isNftGraphqlEnabled ? collection.floor : formatEthPrice(collection.floor?.toString()),
|
||||
},
|
||||
}))
|
||||
.slice(0, isNFTPage ? 3 : 2)
|
||||
: [...Array<GenieCollection>(isNFTPage ? 3 : 2)]
|
||||
}, [gqlData, isNFTPage, isNftGraphqlEnabled, loading, trendingCollectionResults])
|
||||
|
||||
const { data: trendingTokenData } = useTrendingTokens(useWeb3React().chainId)
|
||||
|
||||
const trendingTokensLength = isTokenPage ? 3 : 2
|
||||
const trendingTokens = useMemo(
|
||||
() =>
|
||||
trendingTokenResults
|
||||
? trendingTokenResults.slice(0, trendingTokensLength)
|
||||
: [...Array<FungibleToken>(trendingTokensLength)],
|
||||
[trendingTokenResults, trendingTokensLength]
|
||||
() => trendingTokenData?.slice(0, trendingTokensLength) ?? [...Array<SearchToken>(trendingTokensLength)],
|
||||
[trendingTokenData, trendingTokensLength]
|
||||
)
|
||||
|
||||
const totalSuggestions = hasInput
|
||||
@@ -197,10 +196,9 @@ export const SearchBarDropdown = ({
|
||||
}, [toggleOpen, hoveredIndex, totalSuggestions])
|
||||
|
||||
const hasVerifiedCollection = collections.some((collection) => collection.isVerified)
|
||||
const hasVerifiedToken = tokens.some((token) => token.onDefaultList)
|
||||
const hasKnownToken = tokens.some(isKnownToken)
|
||||
const showCollectionsFirst =
|
||||
(isNFTPage && (hasVerifiedCollection || !hasVerifiedToken)) ||
|
||||
(!isNFTPage && !hasVerifiedToken && hasVerifiedCollection)
|
||||
(isNFTPage && (hasVerifiedCollection || !hasKnownToken)) || (!isNFTPage && !hasKnownToken && hasVerifiedCollection)
|
||||
|
||||
const trace = JSON.stringify(useTrace({ section: InterfaceSectionName.NAVBAR_SEARCH }))
|
||||
|
||||
@@ -277,6 +275,7 @@ export const SearchBarDropdown = ({
|
||||
}}
|
||||
header={<Trans>Recent searches</Trans>}
|
||||
headerIcon={<ClockIcon />}
|
||||
isLoading={!searchHistory}
|
||||
/>
|
||||
)}
|
||||
{!isNFTPage && (
|
||||
@@ -292,7 +291,7 @@ export const SearchBarDropdown = ({
|
||||
}}
|
||||
header={<Trans>Popular tokens</Trans>}
|
||||
headerIcon={<TrendingArrow />}
|
||||
isLoading={trendingTokensAreLoading}
|
||||
isLoading={!trendingTokenData}
|
||||
/>
|
||||
)}
|
||||
{!isTokenPage && (
|
||||
@@ -323,7 +322,7 @@ export const SearchBarDropdown = ({
|
||||
trendingCollections,
|
||||
trendingCollectionsAreLoading,
|
||||
trendingTokens,
|
||||
trendingTokensAreLoading,
|
||||
trendingTokenData,
|
||||
hoveredIndex,
|
||||
toggleOpen,
|
||||
shortenedHistory,
|
||||
@@ -334,6 +333,7 @@ export const SearchBarDropdown = ({
|
||||
queryText,
|
||||
totalSuggestions,
|
||||
trace,
|
||||
searchHistory,
|
||||
])
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
import { sendAnalyticsEvent } from '@uniswap/analytics'
|
||||
import { InterfaceEventName } from '@uniswap/analytics-events'
|
||||
import { formatUSDPrice } from '@uniswap/conedison/format'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import clsx from 'clsx'
|
||||
import AssetLogo from 'components/Logo/AssetLogo'
|
||||
import QueryTokenLogo from 'components/Logo/QueryTokenLogo'
|
||||
import TokenSafetyIcon from 'components/TokenSafety/TokenSafetyIcon'
|
||||
import { getChainInfo } from 'constants/chainInfo'
|
||||
import { NATIVE_CHAIN_ID } from 'constants/tokens'
|
||||
import { checkWarning } from 'constants/tokenSafety'
|
||||
import { checkSearchTokenWarning } from 'constants/tokenSafety'
|
||||
import { Chain, TokenStandard } from 'graphql/data/__generated__/types-and-hooks'
|
||||
import { SearchToken } from 'graphql/data/SearchTokens'
|
||||
import { getTokenDetailsURL } from 'graphql/data/util'
|
||||
import { Box } from 'nft/components/Box'
|
||||
import { Column, Row } from 'nft/components/Flex'
|
||||
import { VerifiedIcon } from 'nft/components/icons'
|
||||
import { vars } from 'nft/css/sprinkles.css'
|
||||
import { useSearchHistory } from 'nft/hooks'
|
||||
import { FungibleToken, GenieCollection } from 'nft/types'
|
||||
import { GenieCollection } from 'nft/types'
|
||||
import { ethNumberStandardFormatter } from 'nft/utils/currency'
|
||||
import { putCommas } from 'nft/utils/putCommas'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { Link, useNavigate } from 'react-router-dom'
|
||||
import styled from 'styled-components/macro'
|
||||
import { ThemedText } from 'theme'
|
||||
|
||||
import { getDeltaArrow } from '../Tokens/TokenDetails/PriceChart'
|
||||
import { DeltaText, getDeltaArrow } from '../Tokens/TokenDetails/PriceChart'
|
||||
import { useAddRecentlySearchedAsset } from './RecentlySearchedAssets'
|
||||
import * as styles from './SearchBar.css'
|
||||
|
||||
const PriceChangeContainer = styled.div`
|
||||
@@ -29,12 +29,6 @@ const PriceChangeContainer = styled.div`
|
||||
align-items: center;
|
||||
`
|
||||
|
||||
const PriceChangeText = styled.span<{ isNegative: boolean }>`
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: ${({ theme, isNegative }) => (isNegative ? theme.accentFailure : theme.accentSuccess)};
|
||||
`
|
||||
|
||||
const ArrowCell = styled.span`
|
||||
padding-top: 5px;
|
||||
padding-right: 3px;
|
||||
@@ -59,16 +53,15 @@ export const CollectionRow = ({
|
||||
}: CollectionRowProps) => {
|
||||
const [brokenImage, setBrokenImage] = useState(false)
|
||||
const [loaded, setLoaded] = useState(false)
|
||||
const addToSearchHistory = useSearchHistory(
|
||||
(state: { addItem: (item: FungibleToken | GenieCollection) => void }) => state.addItem
|
||||
)
|
||||
|
||||
const addRecentlySearchedAsset = useAddRecentlySearchedAsset()
|
||||
const navigate = useNavigate()
|
||||
|
||||
const handleClick = useCallback(() => {
|
||||
addToSearchHistory(collection)
|
||||
addRecentlySearchedAsset({ ...collection, isNft: true, chain: Chain.Ethereum })
|
||||
toggleOpen()
|
||||
sendAnalyticsEvent(InterfaceEventName.NAVBAR_RESULT_SELECTED, { ...eventProperties })
|
||||
}, [addToSearchHistory, collection, toggleOpen, eventProperties])
|
||||
}, [addRecentlySearchedAsset, collection, toggleOpen, eventProperties])
|
||||
|
||||
useEffect(() => {
|
||||
const keyDownHandler = (event: KeyboardEvent) => {
|
||||
@@ -126,17 +119,8 @@ export const CollectionRow = ({
|
||||
)
|
||||
}
|
||||
|
||||
function useBridgedAddress(token: FungibleToken): [string | undefined, number | undefined, string | undefined] {
|
||||
const { chainId: connectedChainId } = useWeb3React()
|
||||
const bridgedAddress = connectedChainId ? token.extensions?.bridgeInfo?.[connectedChainId]?.tokenAddress : undefined
|
||||
if (bridgedAddress && connectedChainId) {
|
||||
return [bridgedAddress, connectedChainId, getChainInfo(connectedChainId)?.circleLogoUrl]
|
||||
}
|
||||
return [undefined, undefined, undefined]
|
||||
}
|
||||
|
||||
interface TokenRowProps {
|
||||
token: FungibleToken
|
||||
token: SearchToken
|
||||
isHovered: boolean
|
||||
setHoveredIndex: (index: number | undefined) => void
|
||||
toggleOpen: () => void
|
||||
@@ -145,19 +129,18 @@ interface TokenRowProps {
|
||||
}
|
||||
|
||||
export const TokenRow = ({ token, isHovered, setHoveredIndex, toggleOpen, index, eventProperties }: TokenRowProps) => {
|
||||
const addToSearchHistory = useSearchHistory(
|
||||
(state: { addItem: (item: FungibleToken | GenieCollection) => void }) => state.addItem
|
||||
)
|
||||
const addRecentlySearchedAsset = useAddRecentlySearchedAsset()
|
||||
const navigate = useNavigate()
|
||||
|
||||
const handleClick = useCallback(() => {
|
||||
addToSearchHistory(token)
|
||||
const address = !token.address && token.standard === TokenStandard.Native ? 'NATIVE' : token.address
|
||||
address && addRecentlySearchedAsset({ address, chain: token.chain })
|
||||
|
||||
toggleOpen()
|
||||
sendAnalyticsEvent(InterfaceEventName.NAVBAR_RESULT_SELECTED, { ...eventProperties })
|
||||
}, [addToSearchHistory, toggleOpen, token, eventProperties])
|
||||
}, [addRecentlySearchedAsset, token, toggleOpen, eventProperties])
|
||||
|
||||
const [bridgedAddress, bridgedChain] = useBridgedAddress(token)
|
||||
const tokenDetailsPath = getTokenDetailsURL(bridgedAddress ?? token.address, undefined, bridgedChain ?? token.chainId)
|
||||
const tokenDetailsPath = getTokenDetailsURL(token)
|
||||
// Close the modal on escape
|
||||
useEffect(() => {
|
||||
const keyDownHandler = (event: KeyboardEvent) => {
|
||||
@@ -173,7 +156,7 @@ export const TokenRow = ({ token, isHovered, setHoveredIndex, toggleOpen, index,
|
||||
}
|
||||
}, [toggleOpen, isHovered, token, navigate, handleClick, tokenDetailsPath])
|
||||
|
||||
const arrow = getDeltaArrow(token.price24hChange, 18)
|
||||
const arrow = getDeltaArrow(token.market?.pricePercentChange?.value, 18)
|
||||
|
||||
return (
|
||||
<Link
|
||||
@@ -186,37 +169,37 @@ export const TokenRow = ({ token, isHovered, setHoveredIndex, toggleOpen, index,
|
||||
style={{ background: isHovered ? vars.color.lightGrayOverlay : 'none' }}
|
||||
>
|
||||
<Row style={{ width: '65%' }}>
|
||||
<AssetLogo
|
||||
isNative={token.address === NATIVE_CHAIN_ID}
|
||||
address={token.address}
|
||||
chainId={token.chainId}
|
||||
<QueryTokenLogo
|
||||
token={token}
|
||||
symbol={token.symbol}
|
||||
size="36px"
|
||||
backupImg={token.logoURI}
|
||||
style={{ margin: '8px 8px 8px 0' }}
|
||||
backupImg={token.project?.logoUrl}
|
||||
style={{ paddingRight: '8px' }}
|
||||
/>
|
||||
<Column className={styles.suggestionPrimaryContainer}>
|
||||
<Row gap="4" width="full">
|
||||
<Box className={styles.primaryText}>{token.name}</Box>
|
||||
<TokenSafetyIcon warning={checkWarning(token.address)} />
|
||||
<TokenSafetyIcon warning={checkSearchTokenWarning(token)} />
|
||||
</Row>
|
||||
<Box className={styles.secondaryText}>{token.symbol}</Box>
|
||||
</Column>
|
||||
</Row>
|
||||
|
||||
<Column className={styles.suggestionSecondaryContainer}>
|
||||
{token.priceUsd && (
|
||||
<Row gap="4">
|
||||
<Box className={styles.primaryText}>{formatUSDPrice(token.priceUsd)}</Box>
|
||||
</Row>
|
||||
)}
|
||||
{token.price24hChange && (
|
||||
<PriceChangeContainer>
|
||||
<ArrowCell>{arrow}</ArrowCell>
|
||||
<PriceChangeText isNegative={token.price24hChange < 0}>
|
||||
{Math.abs(token.price24hChange).toFixed(2)}%
|
||||
</PriceChangeText>
|
||||
</PriceChangeContainer>
|
||||
{!!token.market?.price?.value && (
|
||||
<>
|
||||
<Row gap="4">
|
||||
<Box className={styles.primaryText}>{formatUSDPrice(token.market.price.value)}</Box>
|
||||
</Row>
|
||||
<PriceChangeContainer>
|
||||
<ArrowCell>{arrow}</ArrowCell>
|
||||
<ThemedText.BodySmall>
|
||||
<DeltaText delta={token.market?.pricePercentChange?.value}>
|
||||
{Math.abs(token.market?.pricePercentChange?.value ?? 0).toFixed(2)}%
|
||||
</DeltaText>
|
||||
</ThemedText.BodySmall>
|
||||
</PriceChangeContainer>
|
||||
</>
|
||||
)}
|
||||
</Column>
|
||||
</Link>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Trans } from '@lingui/macro'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import Web3Status from 'components/Web3Status'
|
||||
import { NftListV2Variant, useNftListV2Flag } from 'featureFlags/flags/nftListV2'
|
||||
import { chainIdToBackendName } from 'graphql/data/util'
|
||||
import { useIsNftPage } from 'hooks/useIsNftPage'
|
||||
import { Box } from 'nft/components/Box'
|
||||
@@ -57,8 +56,7 @@ export const PageTabs = () => {
|
||||
pathname.startsWith('/pool') ||
|
||||
pathname.startsWith('/add') ||
|
||||
pathname.startsWith('/remove') ||
|
||||
pathname.startsWith('/increase') ||
|
||||
pathname.startsWith('/find')
|
||||
pathname.startsWith('/increase')
|
||||
|
||||
const isNftPage = useIsNftPage()
|
||||
|
||||
@@ -73,7 +71,7 @@ export const PageTabs = () => {
|
||||
<MenuItem dataTestId="nft-nav" href="/nfts" isActive={isNftPage}>
|
||||
<Trans>NFTs</Trans>
|
||||
</MenuItem>
|
||||
<MenuItem href="/pool" id="pool-nav-link" isActive={isPoolActive}>
|
||||
<MenuItem href="/pool" dataTestId="pool-nav-link" isActive={isPoolActive}>
|
||||
<Trans>Pool</Trans>
|
||||
</MenuItem>
|
||||
</>
|
||||
@@ -83,7 +81,6 @@ export const PageTabs = () => {
|
||||
const Navbar = () => {
|
||||
const isNftPage = useIsNftPage()
|
||||
const sellPageState = useProfilePageState((state) => state.state)
|
||||
const isNftListV2 = useNftListV2Flag() === NftListV2Variant.Enabled
|
||||
const navigate = useNavigate()
|
||||
|
||||
return (
|
||||
@@ -125,7 +122,7 @@ const Navbar = () => {
|
||||
<Box display={{ sm: 'none', lg: 'flex' }}>
|
||||
<MenuDropdown />
|
||||
</Box>
|
||||
{isNftPage && (!isNftListV2 || sellPageState !== ProfilePageStateType.LISTING) && <Bag />}
|
||||
{isNftPage && sellPageState !== ProfilePageStateType.LISTING && <Bag />}
|
||||
{!isNftPage && (
|
||||
<Box display={{ sm: 'none', lg: 'flex' }}>
|
||||
<ChainSelector />
|
||||
|
||||
@@ -24,7 +24,6 @@ const BodyText = styled.div`
|
||||
font-size: 14px;
|
||||
`
|
||||
const RootWrapper = styled.div`
|
||||
position: relative;
|
||||
margin-top: 16px;
|
||||
`
|
||||
|
||||
@@ -32,7 +31,7 @@ const SHOULD_SHOW_ALERT = {
|
||||
[SupportedChainId.OPTIMISM]: true,
|
||||
[SupportedChainId.OPTIMISM_GOERLI]: true,
|
||||
[SupportedChainId.ARBITRUM_ONE]: true,
|
||||
[SupportedChainId.ARBITRUM_RINKEBY]: true,
|
||||
[SupportedChainId.ARBITRUM_GOERLI]: true,
|
||||
[SupportedChainId.POLYGON]: true,
|
||||
[SupportedChainId.POLYGON_MUMBAI]: true,
|
||||
[SupportedChainId.CELO]: true,
|
||||
@@ -59,7 +58,7 @@ const BG_COLORS_BY_DARK_MODE_AND_CHAIN_ID: {
|
||||
'radial-gradient(948% 292% at 42% 0%, rgba(255, 58, 212, 0.04) 0%, rgba(255, 255, 255, 0.04) 100%),radial-gradient(98% 96% at 2% 0%, rgba(255, 39, 39, 0.04) 0%, rgba(235, 0, 255, 0.01 96%)',
|
||||
[SupportedChainId.ARBITRUM_ONE]:
|
||||
'radial-gradient(285% 8200% at 30% 50%, rgba(40, 160, 240, 0.01) 0%, rgba(219, 255, 0, 0) 100%),radial-gradient(75% 75% at 0% 0%, rgba(150, 190, 220, 0.05) 0%, rgba(33, 114, 229, 0.05) 100%), hsla(0, 0%, 100%, 0.05)',
|
||||
[SupportedChainId.ARBITRUM_RINKEBY]:
|
||||
[SupportedChainId.ARBITRUM_GOERLI]:
|
||||
'radial-gradient(285% 8200% at 30% 50%, rgba(40, 160, 240, 0.05) 0%, rgba(219, 255, 0, 0) 100%),radial-gradient(75% 75% at 0% 0%, rgba(150, 190, 220, 0.05) 0%, rgba(33, 114, 229, 0.1) 100%), hsla(0, 0%, 100%, 0.05)',
|
||||
},
|
||||
light: {
|
||||
@@ -77,7 +76,7 @@ const BG_COLORS_BY_DARK_MODE_AND_CHAIN_ID: {
|
||||
'radial-gradient(92% 105% at 50% 7%, rgba(255, 58, 212, 0.04) 0%, rgba(255, 255, 255, 0.03) 100%),radial-gradient(100% 97% at 0% 12%, rgba(235, 0, 255, 0.1) 0%, rgba(243, 19, 19, 0.1) 100%), hsla(0, 0%, 100%, 0.1)',
|
||||
[SupportedChainId.ARBITRUM_ONE]:
|
||||
'radial-gradient(285% 8200% at 30% 50%, rgba(40, 160, 240, 0.1) 0%, rgba(219, 255, 0, 0) 100%),radial-gradient(circle at top left, hsla(206, 50%, 75%, 0.01), hsla(215, 79%, 51%, 0.12)), hsla(0, 0%, 100%, 0.1)',
|
||||
[SupportedChainId.ARBITRUM_RINKEBY]:
|
||||
[SupportedChainId.ARBITRUM_GOERLI]:
|
||||
'radial-gradient(285% 8200% at 30% 50%, rgba(40, 160, 240, 0.1) 0%, rgba(219, 255, 0, 0) 100%),radial-gradient(circle at top left, hsla(206, 50%, 75%, 0.01), hsla(215, 79%, 51%, 0.12)), hsla(0, 0%, 100%, 0.1)',
|
||||
},
|
||||
}
|
||||
@@ -101,7 +100,6 @@ const ContentWrapper = styled.div<{ chainId: NetworkAlertChains; darkMode: boole
|
||||
position: absolute;
|
||||
transform: rotate(25deg) translate(-90px, -40px);
|
||||
width: 300px;
|
||||
z-index: -1;
|
||||
}
|
||||
`
|
||||
const Header = styled.h2`
|
||||
@@ -137,7 +135,7 @@ const TEXT_COLORS: { [chainId in NetworkAlertChains]: string } = {
|
||||
[SupportedChainId.OPTIMISM]: '#ff3856',
|
||||
[SupportedChainId.OPTIMISM_GOERLI]: '#ff3856',
|
||||
[SupportedChainId.ARBITRUM_ONE]: '#0490ed',
|
||||
[SupportedChainId.ARBITRUM_RINKEBY]: '#0490ed',
|
||||
[SupportedChainId.ARBITRUM_GOERLI]: '#0490ed',
|
||||
}
|
||||
|
||||
function shouldShowAlert(chainId: number | undefined): chainId is NetworkAlertChains {
|
||||
@@ -152,7 +150,10 @@ export function NetworkAlert() {
|
||||
return null
|
||||
}
|
||||
|
||||
const { label, logoUrl, bridge } = getChainInfo(chainId)
|
||||
const chainInfo = getChainInfo(chainId)
|
||||
if (!chainInfo) return null
|
||||
|
||||
const { label, logoUrl, bridge } = chainInfo
|
||||
const textColor = TEXT_COLORS[chainId]
|
||||
|
||||
return bridge ? (
|
||||
|
||||
@@ -99,9 +99,9 @@ export default function PositionList({
|
||||
</ToggleLabel>
|
||||
</ToggleWrap>
|
||||
</MobileHeader>
|
||||
{positions.map((p) => {
|
||||
return <PositionListItem key={p.tokenId.toString()} positionDetails={p} />
|
||||
})}
|
||||
{positions.map((p) => (
|
||||
<PositionListItem key={p.tokenId.toString()} {...p} />
|
||||
))}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
38
src/components/PositionListItem/PositionListItem.test.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import { BigNumber } from '@ethersproject/bignumber'
|
||||
import { render, screen } from 'test-utils'
|
||||
|
||||
import PositionListItem from '.'
|
||||
|
||||
jest.mock('hooks/Tokens', () => {
|
||||
const originalModule = jest.requireActual('hooks/Tokens')
|
||||
const uniSDK = jest.requireActual('@uniswap/sdk-core')
|
||||
return {
|
||||
__esModule: true,
|
||||
...originalModule,
|
||||
useToken: jest.fn(
|
||||
() =>
|
||||
new uniSDK.Token(
|
||||
1,
|
||||
'0x39AA39c021dfbaE8faC545936693aC917d5E7563',
|
||||
8,
|
||||
'https://www.example.com',
|
||||
'example.com coin'
|
||||
)
|
||||
),
|
||||
}
|
||||
})
|
||||
|
||||
test('PositionListItem should not render when the name contains a url', () => {
|
||||
const positionDetails = {
|
||||
token0: '0x39AA39c021dfbaE8faC545936693aC917d5E7563',
|
||||
token1: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
||||
tokenId: BigNumber.from(436148),
|
||||
fee: 100,
|
||||
liquidity: BigNumber.from('0x5c985aff8059be04'),
|
||||
tickLower: -800,
|
||||
tickUpper: 1600,
|
||||
}
|
||||
render(<PositionListItem {...positionDetails} />)
|
||||
screen.debug()
|
||||
expect(screen.queryByText('.com', { exact: false })).toBe(null)
|
||||
})
|
||||
@@ -1,3 +1,4 @@
|
||||
import { BigNumber } from '@ethersproject/bignumber'
|
||||
import { Trans } from '@lingui/macro'
|
||||
import { Percent, Price, Token } from '@uniswap/sdk-core'
|
||||
import { Position } from '@uniswap/v3-sdk'
|
||||
@@ -15,9 +16,9 @@ import { Link } from 'react-router-dom'
|
||||
import { Bound } from 'state/mint/v3/actions'
|
||||
import styled from 'styled-components/macro'
|
||||
import { HideSmall, MEDIA_WIDTHS, SmallOnly } from 'theme'
|
||||
import { PositionDetails } from 'types/position'
|
||||
import { formatTickPrice } from 'utils/formatTickPrice'
|
||||
import { unwrappedToken } from 'utils/unwrappedToken'
|
||||
import { hasURL } from 'utils/urlChecks'
|
||||
|
||||
import { DAI, USDC_MAINNET, USDT, WBTC, WRAPPED_NATIVE_CURRENCY } from '../../constants/tokens'
|
||||
|
||||
@@ -109,7 +110,13 @@ const DataText = styled.div`
|
||||
`
|
||||
|
||||
interface PositionListItemProps {
|
||||
positionDetails: PositionDetails
|
||||
token0: string
|
||||
token1: string
|
||||
tokenId: BigNumber
|
||||
fee: number
|
||||
liquidity: BigNumber
|
||||
tickLower: number
|
||||
tickUpper: number
|
||||
}
|
||||
|
||||
export function getPriceOrderingFromPositionForUI(position?: Position): {
|
||||
@@ -166,16 +173,15 @@ export function getPriceOrderingFromPositionForUI(position?: Position): {
|
||||
}
|
||||
}
|
||||
|
||||
export default function PositionListItem({ positionDetails }: PositionListItemProps) {
|
||||
const {
|
||||
token0: token0Address,
|
||||
token1: token1Address,
|
||||
fee: feeAmount,
|
||||
liquidity,
|
||||
tickLower,
|
||||
tickUpper,
|
||||
} = positionDetails
|
||||
|
||||
export default function PositionListItem({
|
||||
token0: token0Address,
|
||||
token1: token1Address,
|
||||
tokenId,
|
||||
fee: feeAmount,
|
||||
liquidity,
|
||||
tickLower,
|
||||
tickUpper,
|
||||
}: PositionListItemProps) {
|
||||
const token0 = useToken(token0Address)
|
||||
const token1 = useToken(token1Address)
|
||||
|
||||
@@ -203,10 +209,23 @@ export default function PositionListItem({ positionDetails }: PositionListItemPr
|
||||
// check if price is within range
|
||||
const outOfRange: boolean = pool ? pool.tickCurrent < tickLower || pool.tickCurrent >= tickUpper : false
|
||||
|
||||
const positionSummaryLink = '/pool/' + positionDetails.tokenId
|
||||
const positionSummaryLink = '/pool/' + tokenId
|
||||
|
||||
const removed = liquidity?.eq(0)
|
||||
|
||||
const containsURL = useMemo(
|
||||
() =>
|
||||
[token0?.name, token0?.symbol, token1?.name, token1?.symbol].reduce(
|
||||
(acc, testString) => acc || Boolean(testString && hasURL(testString)),
|
||||
false
|
||||
),
|
||||
[token0?.name, token0?.symbol, token1?.name, token1?.symbol]
|
||||
)
|
||||
|
||||
if (containsURL) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<LinkRow to={positionSummaryLink}>
|
||||
<RowBetween>
|
||||
|
||||
@@ -105,235 +105,240 @@ exports[`renders currency rows correctly when currencies list is non-empty 1`] =
|
||||
}
|
||||
|
||||
<div
|
||||
style="position: relative; height: 10px; width: 100%; overflow: auto; will-change: transform; direction: ltr;"
|
||||
style="padding-right: 4px;"
|
||||
>
|
||||
<div
|
||||
style="height: 168px; width: 100%;"
|
||||
class="CurrencyList_scrollbarStyle__1pi21y70"
|
||||
style="position: relative; height: 10px; width: 100%; overflow: auto; will-change: transform; direction: ltr;"
|
||||
>
|
||||
<div
|
||||
class="c0 c1 c2 c3 token-item-0x6B175474E89094C44Da98b954EedeAC495271d0F"
|
||||
style="position: absolute; left: 0px; top: 0px; height: 56px; width: 100%;"
|
||||
tabindex="0"
|
||||
style="height: 168px; width: 100%;"
|
||||
>
|
||||
<div
|
||||
class="c4"
|
||||
>
|
||||
CurrencyLogo currency=DAI
|
||||
</div>
|
||||
<div
|
||||
class="c5"
|
||||
style="opacity: 1;"
|
||||
class="c0 c1 c2 c3 token-item-0x6B175474E89094C44Da98b954EedeAC495271d0F"
|
||||
style="position: absolute; left: 0px; top: 0px; height: 56px; width: 100%;"
|
||||
tabindex="0"
|
||||
>
|
||||
<div
|
||||
class="c0 c1"
|
||||
class="c4"
|
||||
>
|
||||
CurrencyLogo currency=DAI
|
||||
</div>
|
||||
<div
|
||||
class="c5"
|
||||
style="opacity: 1;"
|
||||
>
|
||||
<div
|
||||
class="c6 css-vurnku"
|
||||
title="Dai Stablecoin"
|
||||
>
|
||||
Dai Stablecoin
|
||||
</div>
|
||||
<div
|
||||
class="c7"
|
||||
class="c0 c1"
|
||||
>
|
||||
<div
|
||||
class="c8"
|
||||
class="c6 css-vurnku"
|
||||
title="Dai Stablecoin"
|
||||
>
|
||||
<svg
|
||||
class="c9"
|
||||
fill="none"
|
||||
height="24"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
viewBox="0 0 24 24"
|
||||
width="24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
Dai Stablecoin
|
||||
</div>
|
||||
<div
|
||||
class="c7"
|
||||
>
|
||||
<div
|
||||
class="c8"
|
||||
>
|
||||
<path
|
||||
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12"
|
||||
y1="9"
|
||||
y2="13"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12.01"
|
||||
y1="17"
|
||||
y2="17"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
class="c9"
|
||||
fill="none"
|
||||
height="24"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
viewBox="0 0 24 24"
|
||||
width="24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12"
|
||||
y1="9"
|
||||
y2="13"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12.01"
|
||||
y1="17"
|
||||
y2="17"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c10 css-yfjwjl"
|
||||
>
|
||||
DAI
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c4"
|
||||
>
|
||||
<div
|
||||
class="c0 c1 c11"
|
||||
style="justify-self: flex-end;"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c0 c1 c2 c3 token-item-0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
|
||||
style="position: absolute; left: 0px; top: 56px; height: 56px; width: 100%;"
|
||||
tabindex="0"
|
||||
>
|
||||
<div
|
||||
class="c4"
|
||||
>
|
||||
CurrencyLogo currency=USDC
|
||||
</div>
|
||||
<div
|
||||
class="c5"
|
||||
style="opacity: 1;"
|
||||
>
|
||||
<div
|
||||
class="c0 c1"
|
||||
>
|
||||
<div
|
||||
class="c6 css-vurnku"
|
||||
title="USD//C"
|
||||
class="c10 css-yfjwjl"
|
||||
>
|
||||
USD//C
|
||||
DAI
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c4"
|
||||
>
|
||||
<div
|
||||
class="c7"
|
||||
class="c0 c1 c11"
|
||||
style="justify-self: flex-end;"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c0 c1 c2 c3 token-item-0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
|
||||
style="position: absolute; left: 0px; top: 56px; height: 56px; width: 100%;"
|
||||
tabindex="0"
|
||||
>
|
||||
<div
|
||||
class="c4"
|
||||
>
|
||||
CurrencyLogo currency=USDC
|
||||
</div>
|
||||
<div
|
||||
class="c5"
|
||||
style="opacity: 1;"
|
||||
>
|
||||
<div
|
||||
class="c0 c1"
|
||||
>
|
||||
<div
|
||||
class="c8"
|
||||
class="c6 css-vurnku"
|
||||
title="USD//C"
|
||||
>
|
||||
<svg
|
||||
class="c9"
|
||||
fill="none"
|
||||
height="24"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
viewBox="0 0 24 24"
|
||||
width="24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
USD//C
|
||||
</div>
|
||||
<div
|
||||
class="c7"
|
||||
>
|
||||
<div
|
||||
class="c8"
|
||||
>
|
||||
<path
|
||||
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12"
|
||||
y1="9"
|
||||
y2="13"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12.01"
|
||||
y1="17"
|
||||
y2="17"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
class="c9"
|
||||
fill="none"
|
||||
height="24"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
viewBox="0 0 24 24"
|
||||
width="24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12"
|
||||
y1="9"
|
||||
y2="13"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12.01"
|
||||
y1="17"
|
||||
y2="17"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c10 css-yfjwjl"
|
||||
>
|
||||
USDC
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c4"
|
||||
>
|
||||
<div
|
||||
class="c0 c1 c11"
|
||||
style="justify-self: flex-end;"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c0 c1 c2 c3 token-item-0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"
|
||||
style="position: absolute; left: 0px; top: 112px; height: 56px; width: 100%;"
|
||||
tabindex="0"
|
||||
>
|
||||
<div
|
||||
class="c4"
|
||||
>
|
||||
CurrencyLogo currency=WBTC
|
||||
</div>
|
||||
<div
|
||||
class="c5"
|
||||
style="opacity: 1;"
|
||||
>
|
||||
<div
|
||||
class="c0 c1"
|
||||
>
|
||||
<div
|
||||
class="c6 css-vurnku"
|
||||
title="Wrapped BTC"
|
||||
class="c10 css-yfjwjl"
|
||||
>
|
||||
Wrapped BTC
|
||||
USDC
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c4"
|
||||
>
|
||||
<div
|
||||
class="c7"
|
||||
class="c0 c1 c11"
|
||||
style="justify-self: flex-end;"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c0 c1 c2 c3 token-item-0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"
|
||||
style="position: absolute; left: 0px; top: 112px; height: 56px; width: 100%;"
|
||||
tabindex="0"
|
||||
>
|
||||
<div
|
||||
class="c4"
|
||||
>
|
||||
CurrencyLogo currency=WBTC
|
||||
</div>
|
||||
<div
|
||||
class="c5"
|
||||
style="opacity: 1;"
|
||||
>
|
||||
<div
|
||||
class="c0 c1"
|
||||
>
|
||||
<div
|
||||
class="c8"
|
||||
class="c6 css-vurnku"
|
||||
title="Wrapped BTC"
|
||||
>
|
||||
<svg
|
||||
class="c9"
|
||||
fill="none"
|
||||
height="24"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
viewBox="0 0 24 24"
|
||||
width="24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12"
|
||||
y1="9"
|
||||
y2="13"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12.01"
|
||||
y1="17"
|
||||
y2="17"
|
||||
/>
|
||||
</svg>
|
||||
Wrapped BTC
|
||||
</div>
|
||||
<div
|
||||
class="c7"
|
||||
>
|
||||
<div
|
||||
class="c8"
|
||||
>
|
||||
<svg
|
||||
class="c9"
|
||||
fill="none"
|
||||
height="24"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
viewBox="0 0 24 24"
|
||||
width="24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12"
|
||||
y1="9"
|
||||
y2="13"
|
||||
/>
|
||||
<line
|
||||
x1="12"
|
||||
x2="12.01"
|
||||
y1="17"
|
||||
y2="17"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c10 css-yfjwjl"
|
||||
>
|
||||
WBTC
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c10 css-yfjwjl"
|
||||
class="c4"
|
||||
>
|
||||
WBTC
|
||||
<div
|
||||
class="c0 c1 c11"
|
||||
style="justify-self: flex-end;"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c4"
|
||||
>
|
||||
<div
|
||||
class="c0 c1 c11"
|
||||
style="justify-self: flex-end;"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -383,31 +388,36 @@ exports[`renders loading rows when isLoading is true 1`] = `
|
||||
}
|
||||
|
||||
<div
|
||||
style="position: relative; height: 10px; width: 100%; overflow: auto; will-change: transform; direction: ltr;"
|
||||
style="padding-right: 4px;"
|
||||
>
|
||||
<div
|
||||
style="height: 560px; width: 100%;"
|
||||
class="CurrencyList_scrollbarStyle__1pi21y70"
|
||||
style="position: relative; height: 10px; width: 100%; overflow: auto; will-change: transform; direction: ltr;"
|
||||
>
|
||||
<div
|
||||
class="c0 c1"
|
||||
style="height: 560px; width: 100%;"
|
||||
>
|
||||
<div />
|
||||
<div />
|
||||
<div />
|
||||
</div>
|
||||
<div
|
||||
class="c0 c1"
|
||||
>
|
||||
<div />
|
||||
<div />
|
||||
<div />
|
||||
</div>
|
||||
<div
|
||||
class="c0 c1"
|
||||
>
|
||||
<div />
|
||||
<div />
|
||||
<div />
|
||||
<div
|
||||
class="c0 c1"
|
||||
>
|
||||
<div />
|
||||
<div />
|
||||
<div />
|
||||
</div>
|
||||
<div
|
||||
class="c0 c1"
|
||||
>
|
||||
<div />
|
||||
<div />
|
||||
<div />
|
||||
</div>
|
||||
<div
|
||||
class="c0 c1"
|
||||
>
|
||||
<div />
|
||||
<div />
|
||||
<div />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
20
src/components/SearchModal/CurrencyList/index.css.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { style } from '@vanilla-extract/css'
|
||||
import { themeVars } from 'nft/css/sprinkles.css'
|
||||
|
||||
export const scrollbarStyle = style([
|
||||
{
|
||||
scrollbarWidth: 'thin',
|
||||
scrollbarColor: `${themeVars.colors.backgroundOutline} transparent`,
|
||||
height: '100%',
|
||||
selectors: {
|
||||
'&::-webkit-scrollbar': {
|
||||
background: 'transparent',
|
||||
width: '4px',
|
||||
},
|
||||
'&::-webkit-scrollbar-thumb': {
|
||||
background: `${themeVars.colors.backgroundOutline}`,
|
||||
borderRadius: '8px',
|
||||
},
|
||||
},
|
||||
},
|
||||
])
|
||||
@@ -20,6 +20,7 @@ import CurrencyLogo from '../../Logo/CurrencyLogo'
|
||||
import Row, { RowFixed } from '../../Row'
|
||||
import { MouseoverTooltip } from '../../Tooltip'
|
||||
import { LoadingRows, MenuItem } from '../styleds'
|
||||
import * as styles from './index.css'
|
||||
|
||||
function currencyKey(currency: Currency): string {
|
||||
return currency.isToken ? currency.address : 'ETHER'
|
||||
@@ -288,21 +289,34 @@ export default function CurrencyList({
|
||||
return currencyKey(currency)
|
||||
}, [])
|
||||
|
||||
return isLoading ? (
|
||||
<FixedSizeList height={height} ref={fixedListRef as any} width="100%" itemData={[]} itemCount={10} itemSize={56}>
|
||||
{LoadingRow}
|
||||
</FixedSizeList>
|
||||
) : (
|
||||
<FixedSizeList
|
||||
height={height}
|
||||
ref={fixedListRef as any}
|
||||
width="100%"
|
||||
itemData={itemData}
|
||||
itemCount={itemData.length}
|
||||
itemSize={56}
|
||||
itemKey={itemKey}
|
||||
>
|
||||
{Row}
|
||||
</FixedSizeList>
|
||||
return (
|
||||
<div style={{ paddingRight: '4px' }}>
|
||||
{isLoading ? (
|
||||
<FixedSizeList
|
||||
className={styles.scrollbarStyle}
|
||||
height={height}
|
||||
ref={fixedListRef as any}
|
||||
width="100%"
|
||||
itemData={[]}
|
||||
itemCount={10}
|
||||
itemSize={56}
|
||||
>
|
||||
{LoadingRow}
|
||||
</FixedSizeList>
|
||||
) : (
|
||||
<FixedSizeList
|
||||
className={styles.scrollbarStyle}
|
||||
height={height}
|
||||
ref={fixedListRef as any}
|
||||
width="100%"
|
||||
itemData={itemData}
|
||||
itemCount={itemData.length}
|
||||
itemSize={56}
|
||||
itemKey={itemKey}
|
||||
>
|
||||
{Row}
|
||||
</FixedSizeList>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -32,8 +32,10 @@ import { PaddedColumn, SearchInput, Separator } from './styleds'
|
||||
const ContentWrapper = styled(Column)`
|
||||
background-color: ${({ theme }) => theme.backgroundSurface};
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
flex: 1 1;
|
||||
position: relative;
|
||||
border-radius: 20px;
|
||||
`
|
||||
|
||||
interface CurrencySearchProps {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ButtonPrimary } from 'components/Button'
|
||||
import { AutoColumn } from 'components/Column'
|
||||
import CurrencyLogo from 'components/Logo/CurrencyLogo'
|
||||
import TokenSafetyLabel from 'components/TokenSafety/TokenSafetyLabel'
|
||||
import { checkWarning, getWarningCopy, TOKEN_SAFETY_ARTICLE, Warning } from 'constants/tokenSafety'
|
||||
import { checkWarning, getWarningCopy, TOKEN_SAFETY_ARTICLE, Warning, WARNING_LEVEL } from 'constants/tokenSafety'
|
||||
import { useToken } from 'hooks/Tokens'
|
||||
import { ExternalLink as LinkIconFeather } from 'react-feather'
|
||||
import { Text } from 'rebass'
|
||||
@@ -77,7 +77,7 @@ const Buttons = ({
|
||||
showCancel,
|
||||
}: {
|
||||
warning: Warning
|
||||
onContinue: () => void
|
||||
onContinue?: () => void
|
||||
onCancel: () => void
|
||||
onBlocked?: () => void
|
||||
showCancel?: boolean
|
||||
@@ -251,32 +251,49 @@ export default function TokenSafety({
|
||||
<Trans>Learn more</Trans>
|
||||
</StyledExternalLink>
|
||||
)
|
||||
const tokenNotFoundWarning = {
|
||||
level: WARNING_LEVEL.UNKNOWN,
|
||||
message: <Trans>Token not found</Trans>,
|
||||
canProceed: false,
|
||||
}
|
||||
|
||||
return (
|
||||
displayWarning && (
|
||||
<Wrapper>
|
||||
<Container>
|
||||
<AutoColumn>
|
||||
<LogoContainer>{logos}</LogoContainer>
|
||||
</AutoColumn>
|
||||
<ShortColumn>
|
||||
<SafetyLabel warning={displayWarning} />
|
||||
</ShortColumn>
|
||||
<ShortColumn>
|
||||
<InfoText>
|
||||
{heading} {description} {learnMoreUrl}
|
||||
</InfoText>
|
||||
</ShortColumn>
|
||||
<LinkColumn>{urls}</LinkColumn>
|
||||
<Buttons
|
||||
warning={displayWarning}
|
||||
onContinue={acknowledge}
|
||||
onCancel={onCancel}
|
||||
onBlocked={onBlocked}
|
||||
showCancel={showCancel}
|
||||
/>
|
||||
</Container>
|
||||
</Wrapper>
|
||||
)
|
||||
return displayWarning ? (
|
||||
<Wrapper>
|
||||
<Container>
|
||||
<AutoColumn>
|
||||
<LogoContainer>{logos}</LogoContainer>
|
||||
</AutoColumn>
|
||||
<ShortColumn>
|
||||
<SafetyLabel warning={displayWarning} />
|
||||
</ShortColumn>
|
||||
<ShortColumn>
|
||||
<InfoText>
|
||||
{heading} {description} {learnMoreUrl}
|
||||
</InfoText>
|
||||
</ShortColumn>
|
||||
<LinkColumn>{urls}</LinkColumn>
|
||||
<Buttons
|
||||
warning={displayWarning}
|
||||
onContinue={acknowledge}
|
||||
onCancel={onCancel}
|
||||
onBlocked={onBlocked}
|
||||
showCancel={showCancel}
|
||||
/>
|
||||
</Container>
|
||||
</Wrapper>
|
||||
) : (
|
||||
<Wrapper>
|
||||
<Container>
|
||||
<ShortColumn>
|
||||
<SafetyLabel warning={tokenNotFoundWarning} />
|
||||
</ShortColumn>
|
||||
<ShortColumn>
|
||||
<InfoText>
|
||||
{heading} {description} {learnMoreUrl}
|
||||
</InfoText>
|
||||
</ShortColumn>
|
||||
<Buttons warning={tokenNotFoundWarning} onCancel={onCancel} showCancel={true} />
|
||||
</Container>
|
||||
</Wrapper>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Trans } from '@lingui/macro'
|
||||
import { SupportedChainId } from '@uniswap/sdk-core'
|
||||
import { getChainInfo } from 'constants/chainInfo'
|
||||
import { SupportedChainId } from 'constants/chains'
|
||||
import { darken } from 'polished'
|
||||
import { useState } from 'react'
|
||||
import styled from 'styled-components/macro'
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Trans } from '@lingui/macro'
|
||||
import { formatCurrencyAmount, NumberType } from '@uniswap/conedison/format'
|
||||
import { Currency, SupportedChainId } from '@uniswap/sdk-core'
|
||||
import { Currency } from '@uniswap/sdk-core'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import CurrencyLogo from 'components/Logo/CurrencyLogo'
|
||||
import { getChainInfo } from 'constants/chainInfo'
|
||||
import { SupportedChainId } from 'constants/chains'
|
||||
import { isSupportedChain } from 'constants/chains'
|
||||
import { useStablecoinValue } from 'hooks/useStablecoinPrice'
|
||||
import useCurrencyBalance from 'lib/hooks/useCurrencyBalance'
|
||||
|
||||
@@ -3,6 +3,7 @@ import { formatCurrencyAmount, NumberType } from '@uniswap/conedison/format'
|
||||
import { Currency } from '@uniswap/sdk-core'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import { NATIVE_CHAIN_ID } from 'constants/tokens'
|
||||
import { useDummyGateEnabled } from 'featureFlags/flags/dummyFeatureGate'
|
||||
import { CHAIN_ID_TO_BACKEND_NAME } from 'graphql/data/util'
|
||||
import { useStablecoinValue } from 'hooks/useStablecoinPrice'
|
||||
import useCurrencyBalance from 'lib/hooks/useCurrencyBalance'
|
||||
@@ -13,9 +14,10 @@ const Wrapper = styled.div`
|
||||
align-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid ${({ theme }) => theme.backgroundOutline};
|
||||
border-bottom: none;
|
||||
background-color: ${({ theme }) => theme.backgroundSurface};
|
||||
border-radius: 20px 20px 0px 0px;
|
||||
bottom: 56px;
|
||||
bottom: 52px;
|
||||
color: ${({ theme }) => theme.textSecondary};
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -86,6 +88,7 @@ export default function MobileBalanceSummaryFooter({ token }: { token: Currency
|
||||
const formattedBalance = formatCurrencyAmount(balance, NumberType.TokenNonTx)
|
||||
const formattedUsdValue = formatCurrencyAmount(useStablecoinValue(balance), NumberType.FiatTokenStats)
|
||||
const chain = CHAIN_ID_TO_BACKEND_NAME[token.chainId].toLowerCase()
|
||||
const isDummyGateFlagEnabled = useDummyGateEnabled()
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
@@ -101,7 +104,7 @@ export default function MobileBalanceSummaryFooter({ token }: { token: Currency
|
||||
</BalanceInfo>
|
||||
)}
|
||||
<SwapButton to={`/swap?chainName=${chain}&outputCurrency=${token.isNative ? NATIVE_CHAIN_ID : token.address}`}>
|
||||
<Trans>Swap</Trans>
|
||||
<Trans>{isDummyGateFlagEnabled ? 'Go to Swap' : 'Swap'}</Trans>
|
||||
</SwapButton>
|
||||
</Wrapper>
|
||||
)
|
||||
|
||||
@@ -2,7 +2,6 @@ import { Trans } from '@lingui/macro'
|
||||
import { Trace } from '@uniswap/analytics'
|
||||
import { InterfacePageName } from '@uniswap/analytics-events'
|
||||
import { Currency } from '@uniswap/sdk-core'
|
||||
import { Field } from '@uniswap/widgets'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import CurrencyLogo from 'components/Logo/CurrencyLogo'
|
||||
import { AboutSection } from 'components/Tokens/TokenDetails/About'
|
||||
@@ -134,25 +133,27 @@ export default function TokenDetails({
|
||||
if (!address) return
|
||||
const bridgedAddress = crossChainMap[update]
|
||||
if (bridgedAddress) {
|
||||
startTokenTransition(() => navigate(getTokenDetailsURL(bridgedAddress, update)))
|
||||
startTokenTransition(() => navigate(getTokenDetailsURL({ address: bridgedAddress, chain })))
|
||||
} else if (didFetchFromChain || token?.isNative) {
|
||||
startTokenTransition(() => navigate(getTokenDetailsURL(address, update)))
|
||||
startTokenTransition(() => navigate(getTokenDetailsURL({ address, chain })))
|
||||
}
|
||||
},
|
||||
[address, crossChainMap, didFetchFromChain, navigate, token?.isNative]
|
||||
[address, chain, crossChainMap, didFetchFromChain, navigate, token?.isNative]
|
||||
)
|
||||
useOnGlobalChainSwitch(navigateToTokenForChain)
|
||||
|
||||
const navigateToWidgetSelectedToken = useCallback(
|
||||
(token: Currency) => {
|
||||
const address = token.isNative ? NATIVE_CHAIN_ID : token.address
|
||||
startTokenTransition(() => navigate(getTokenDetailsURL(address, chain)))
|
||||
startTokenTransition(() => navigate(getTokenDetailsURL({ address, chain })))
|
||||
},
|
||||
[chain, navigate]
|
||||
)
|
||||
|
||||
const [continueSwap, setContinueSwap] = useState<{ resolve: (value: boolean | PromiseLike<boolean>) => void }>()
|
||||
|
||||
const [openTokenSafetyModal, setOpenTokenSafetyModal] = useState(false)
|
||||
|
||||
// Show token safety modal if Swap-reviewing a warning token, at all times if the current token is blocked
|
||||
const shouldShowSpeedbump = !useIsUserAddedTokenOnChain(address, pageChainId) && tokenWarning !== null
|
||||
const onReviewSwapClick = useCallback(
|
||||
@@ -216,23 +217,28 @@ export default function TokenDetails({
|
||||
<TokenDetailsSkeleton />
|
||||
)}
|
||||
|
||||
<RightPanel>
|
||||
<Widget
|
||||
token={token ?? undefined}
|
||||
defaultField={Field.OUTPUT}
|
||||
onTokenChange={navigateToWidgetSelectedToken}
|
||||
onReviewSwapClick={onReviewSwapClick}
|
||||
/>
|
||||
<RightPanel onClick={() => isBlockedToken && setOpenTokenSafetyModal(true)}>
|
||||
<div style={{ pointerEvents: isBlockedToken ? 'none' : 'auto' }}>
|
||||
<Widget
|
||||
defaultTokens={{
|
||||
default: token ?? undefined,
|
||||
}}
|
||||
onDefaultTokenChange={navigateToWidgetSelectedToken}
|
||||
onReviewSwapClick={onReviewSwapClick}
|
||||
/>
|
||||
</div>
|
||||
{tokenWarning && <TokenSafetyMessage tokenAddress={address} warning={tokenWarning} />}
|
||||
{token && <BalanceSummary token={token} />}
|
||||
</RightPanel>
|
||||
{token && <MobileBalanceSummaryFooter token={token} />}
|
||||
|
||||
<TokenSafetyModal
|
||||
isOpen={isBlockedToken || !!continueSwap}
|
||||
isOpen={openTokenSafetyModal || !!continueSwap}
|
||||
tokenAddress={address}
|
||||
onContinue={() => onResolveSwap(true)}
|
||||
onBlocked={() => navigate(-1)}
|
||||
onBlocked={() => {
|
||||
setOpenTokenSafetyModal(false)
|
||||
}}
|
||||
onCancel={() => onResolveSwap(false)}
|
||||
showCancel={true}
|
||||
/>
|
||||
|
||||
@@ -289,7 +289,9 @@ export const HEADER_DESCRIPTIONS: Record<TokenSortMethod, ReactNode | undefined>
|
||||
[TokenSortMethod.PRICE]: undefined,
|
||||
[TokenSortMethod.PERCENT_CHANGE]: undefined,
|
||||
[TokenSortMethod.TOTAL_VALUE_LOCKED]: (
|
||||
<Trans>Total value locked (TVL) is the amount of the asset that’s currently in a Uniswap v3 liquidity pool.</Trans>
|
||||
<Trans>
|
||||
Total value locked (TVL) is the aggregate amount of the asset available across all Uniswap v3 liquidity pools.
|
||||
</Trans>
|
||||
),
|
||||
[TokenSortMethod.VOLUME]: (
|
||||
<Trans>Volume is the amount of the asset that has been traded on Uniswap v3 during the selected time frame.</Trans>
|
||||
@@ -424,12 +426,12 @@ interface LoadedRowProps {
|
||||
tokenListLength: number
|
||||
token: NonNullable<TopToken>
|
||||
sparklineMap: SparklineMap
|
||||
volumeRank: number
|
||||
sortRank: number
|
||||
}
|
||||
|
||||
/* Loaded State: row component with token information */
|
||||
export const LoadedRow = forwardRef((props: LoadedRowProps, ref: ForwardedRef<HTMLDivElement>) => {
|
||||
const { tokenListIndex, tokenListLength, token, volumeRank } = props
|
||||
const { tokenListIndex, tokenListLength, token, sortRank } = props
|
||||
const filterString = useAtomValue(filterStringAtom)
|
||||
|
||||
const lowercaseChainName = useParams<{ chainName?: string }>().chainName?.toUpperCase() ?? 'ethereum'
|
||||
@@ -446,7 +448,7 @@ export const LoadedRow = forwardRef((props: LoadedRowProps, ref: ForwardedRef<HT
|
||||
token_address: token.address,
|
||||
token_symbol: token.symbol,
|
||||
token_list_index: tokenListIndex,
|
||||
token_list_rank: volumeRank,
|
||||
token_list_rank: sortRank,
|
||||
token_list_length: tokenListLength,
|
||||
time_frame: timePeriod,
|
||||
search_token_address_input: filterString,
|
||||
@@ -456,14 +458,14 @@ export const LoadedRow = forwardRef((props: LoadedRowProps, ref: ForwardedRef<HT
|
||||
return (
|
||||
<div ref={ref} data-testid={`token-table-row-${token.symbol}`}>
|
||||
<StyledLink
|
||||
to={getTokenDetailsURL(token.address ?? '', token.chain)}
|
||||
to={getTokenDetailsURL(token)}
|
||||
onClick={() =>
|
||||
sendAnalyticsEvent(InterfaceEventName.EXPLORE_TOKEN_ROW_CLICKED, exploreTokenSelectedEventProperties)
|
||||
}
|
||||
>
|
||||
<TokenRow
|
||||
header={false}
|
||||
listNumber={volumeRank}
|
||||
listNumber={sortRank}
|
||||
tokenInfo={
|
||||
<ClickableName>
|
||||
<QueryTokenLogo token={token} />
|
||||
|
||||
@@ -77,7 +77,7 @@ function LoadingTokenTable({ rowCount = PAGE_SIZE }: { rowCount?: number }) {
|
||||
|
||||
export default function TokenTable() {
|
||||
const chainName = validateUrlChainParam(useParams<{ chainName?: string }>().chainName)
|
||||
const { tokens, tokenVolumeRank, loadingTokens, sparklines } = useTopTokens(chainName)
|
||||
const { tokens, tokenSortRank, loadingTokens, sparklines } = useTopTokens(chainName)
|
||||
|
||||
/* loading and error state */
|
||||
if (loadingTokens && !tokens) {
|
||||
@@ -109,7 +109,7 @@ export default function TokenTable() {
|
||||
tokenListLength={tokens.length}
|
||||
token={token}
|
||||
sparklineMap={sparklines}
|
||||
volumeRank={tokenVolumeRank[token.address]}
|
||||
sortRank={tokenSortRank[token.address]}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
|
||||
@@ -2,8 +2,6 @@ import { useWeb3React } from '@web3-react/core'
|
||||
import AddressClaimModal from 'components/claim/AddressClaimModal'
|
||||
import ConnectedAccountBlocked from 'components/ConnectedAccountBlocked'
|
||||
import FiatOnrampModal from 'components/FiatOnrampModal'
|
||||
import { BaseVariant } from 'featureFlags'
|
||||
import { useFiatOnrampFlag } from 'featureFlags/flags/fiatOnramp'
|
||||
import useAccountRiskCheck from 'hooks/useAccountRiskCheck'
|
||||
import { lazy } from 'react'
|
||||
import { useModalIsOpen, useToggleModal } from 'state/application/hooks'
|
||||
@@ -20,7 +18,6 @@ export default function TopLevelModals() {
|
||||
const { account } = useWeb3React()
|
||||
useAccountRiskCheck(account)
|
||||
const accountBlocked = Boolean(blockedAccountModalOpen && account)
|
||||
const fiatOnrampFlagEnabled = useFiatOnrampFlag() === BaseVariant.Enabled
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -29,7 +26,7 @@ export default function TopLevelModals() {
|
||||
<Bag />
|
||||
<TransactionCompleteModal />
|
||||
<AirdropModal />
|
||||
{fiatOnrampFlagEnabled && <FiatOnrampModal />}
|
||||
<FiatOnrampModal />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
223
src/components/Unicon/Container.ts
Normal file
626
src/components/Unicon/Emblem.ts
Normal file
@@ -0,0 +1,626 @@
|
||||
export const svgPaths: React.SVGProps<SVGPathElement>[][] = [
|
||||
[
|
||||
{
|
||||
d: 'M0 8C0 3.58172 3.58172 0 8 0V4C5.79086 4 4 5.79086 4 8H0ZM8 8L4 8C4 10.2091 5.79086 12 8 12V16C12.4183 16 16 12.4183 16 8H12C12 5.79086 10.2091 4 8 4L8 8ZM8 8L12 8C12 10.2091 10.2091 12 8 12L8 8Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M6.61962 1.57177C7.38198 0.809409 8.61802 0.80941 9.38038 1.57177L14.4282 6.61962C15.1906 7.38198 15.1906 8.61802 14.4282 9.38038L9.38038 14.4282C8.61802 15.1906 7.38198 15.1906 6.61962 14.4282L1.57177 9.38038C0.809409 8.61802 0.80941 7.38198 1.57177 6.61962L6.61962 1.57177Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 4.33253L4.33253 8L8 11.6675L11.6675 8L8 4.33253ZM9.38038 1.57177C8.61802 0.80941 7.38198 0.809409 6.61962 1.57177L1.57177 6.61962C0.80941 7.38198 0.809409 8.61802 1.57177 9.38038L6.61962 14.4282C7.38198 15.1906 8.61802 15.1906 9.38038 14.4282L14.4282 9.38038C15.1906 8.61802 15.1906 7.38198 14.4282 6.61962L9.38038 1.57177Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z',
|
||||
},
|
||||
{
|
||||
d: 'M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM4 5C4 4.44772 4.44772 4 5 4H11C11.5523 4 12 4.44772 12 5V11C12 11.5523 11.5523 12 11 12H5C4.44772 12 4 11.5523 4 11V5Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M16 8C12.2937 6.62854 9.37146 3.70632 8 0C6.62854 3.70632 3.70632 6.62854 0 8C3.70632 9.37146 6.62854 12.2937 8 16C9.37146 12.2937 12.2937 9.37146 16 8ZM8 11C9.65685 11 11 9.65685 11 8C11 6.34315 9.65685 5 8 5C6.34315 5 5 6.34315 5 8C5 9.65685 6.34315 11 8 11Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M9.38038 1.57177C8.61802 0.80941 7.38198 0.809409 6.61962 1.57177L1.57177 6.61962C0.80941 7.38198 0.809409 8.61802 1.57177 9.38038L6.61962 14.4282C7.38198 15.1906 8.61802 15.1906 9.38038 14.4282L14.4282 9.38038C15.1906 8.61802 15.1906 7.38198 14.4282 6.61962L9.38038 1.57177ZM8 11.1716C9.65685 11.1716 11 9.82842 11 8.17157C11 6.51472 9.65685 5.17157 8 5.17157C6.34315 5.17157 5 6.51472 5 8.17157C5 9.82842 6.34315 11.1716 8 11.1716Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15 2C15 1.44772 14.5523 1 14 1H9C8.44772 1 8 1.44772 8 2V8H14C14.5523 8 15 7.55228 15 7V2Z',
|
||||
},
|
||||
{
|
||||
d: 'M8 8H2C1.44771 8 1 8.44772 1 9V14C1 14.5523 1.44772 15 2 15H7C7.55228 15 8 14.5523 8 14V8Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M0 8C0 3.58172 3.58172 0 8 0L8 4.41421C7.74408 4.41421 7.48816 4.51184 7.29289 4.70711L4.70711 7.29289C4.51184 7.48816 4.41421 7.74408 4.41421 8L0 8ZM8 8H4.41421C4.41421 8.25592 4.51184 8.51184 4.70711 8.70711L7.29289 11.2929C7.48816 11.4882 7.74408 11.5858 8 11.5858L8 16C12.4183 16 16 12.4183 16 8L11.5858 8C11.5858 7.74408 11.4882 7.48816 11.2929 7.29289L8.70711 4.70711C8.51184 4.51184 8.25592 4.41421 8 4.41421L8 8ZM8 8H11.5858C11.5858 8.25592 11.4882 8.51184 11.2929 8.70711L8.70711 11.2929C8.51184 11.4882 8.25592 11.5858 8 11.5858L8 8Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M1 2C1 1.44772 1.44772 1 2 1H7C7.55228 1 8 1.44772 8 2V8H2C1.44772 8 1 7.55228 1 7V2Z',
|
||||
},
|
||||
{
|
||||
d: 'M8 8H14C14.5523 8 15 8.44772 15 9V14C15 14.5523 14.5523 15 14 15H9C8.44772 15 8 14.5523 8 14V8Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M13.6569 2.34315C10.5327 -0.781049 5.46734 -0.781049 2.34315 2.34315L8 8L2.34315 13.6569C5.46734 16.781 10.5327 16.781 13.6569 13.6569L8 8L13.6569 2.34315Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 0C3.58172 0 0 3.58172 0 8L8 8L8 16C12.4183 16 16 12.4183 16 8L8 8L8 0Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M16 8C12.2937 6.62854 9.37146 3.70632 8 0C6.62854 3.70632 3.70632 6.62854 0 8C3.70632 9.37146 6.62854 12.2937 8 16C9.37146 12.2937 12.2937 9.37146 16 8ZM11 8L8 5L5 8L8 11L11 8Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M2 4.4C2 3.07452 3.07452 2 4.4 2H11.6C12.9255 2 14 3.07452 14 4.4V11.6C14 12.9255 12.9255 14 11.6 14H4.4C3.07452 14 2 12.9255 2 11.6V4.4Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M5.17158 2.34315C4.39053 1.5621 3.1242 1.5621 2.34315 2.34315C1.5621 3.12419 1.5621 4.39052 2.34315 5.17157L4.46447 7.29289C4.85499 7.68342 4.85499 8.31658 4.46447 8.70711L2.34315 10.8284C1.5621 11.6095 1.5621 12.8758 2.34315 13.6569C3.1242 14.4379 4.39053 14.4379 5.17158 13.6569L7.2929 11.5355C7.68342 11.145 8.31659 11.145 8.70711 11.5355L10.8284 13.6569C11.6095 14.4379 12.8758 14.4379 13.6569 13.6569C14.4379 12.8758 14.4379 11.6095 13.6569 10.8284L11.5355 8.70711C11.145 8.31658 11.145 7.68342 11.5355 7.29289L13.6569 5.17157C14.4379 4.39052 14.4379 3.12419 13.6569 2.34315C12.8758 1.5621 11.6095 1.5621 10.8284 2.34315L8.70711 4.46447C8.31659 4.85499 7.68342 4.85499 7.2929 4.46447L5.17158 2.34315Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M7 2C7 1.44772 7.44772 1 8 1C8.55228 1 9 1.44772 9 2V5C9 5.55228 8.55228 6 8 6C7.44772 6 7 5.55228 7 5V2Z',
|
||||
},
|
||||
{
|
||||
d: 'M7 11C7 10.4477 7.44772 10 8 10C8.55228 10 9 10.4477 9 11V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V11Z',
|
||||
},
|
||||
{
|
||||
d: 'M14 7C14.5523 7 15 7.44772 15 8C15 8.55228 14.5523 9 14 9H11C10.4477 9 10 8.55228 10 8C10 7.44772 10.4477 7 11 7H14Z',
|
||||
},
|
||||
{
|
||||
d: 'M5 7C5.55228 7 6 7.44772 6 8C6 8.55228 5.55228 9 5 9H2C1.44772 9 1 8.55228 1 8C1 7.44772 1.44772 7 2 7H5Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15.9585 8.81981C15.9166 9.23189 15.5183 9.49613 15.112 9.41574L11.7175 8.74421C10.9132 8.5851 10.4734 9.64707 11.1547 10.1032L14.0293 12.0277C14.3735 12.2581 14.4683 12.7266 14.2068 13.0478C13.861 13.4725 13.4725 13.861 13.0478 14.2068C12.7266 14.4683 12.2581 14.3735 12.0277 14.0293L10.1032 11.1547C9.64707 10.4734 8.5851 10.9132 8.74421 11.7175L9.41574 15.112C9.49613 15.5183 9.23189 15.9166 8.81981 15.9585C8.55027 15.9859 8.27678 16 8 16C7.72322 16 7.44973 15.9859 7.18019 15.9585C6.76811 15.9166 6.50387 15.5183 6.58426 15.112L7.25579 11.7175C7.4149 10.9132 6.35293 10.4734 5.89682 11.1547L3.97232 14.0293C3.74188 14.3735 3.27344 14.4683 2.95224 14.2068C2.52755 13.861 2.13902 13.4725 1.79322 13.0478C1.53168 12.7266 1.62651 12.2581 1.9707 12.0277L4.84532 10.1032C5.52661 9.64707 5.08681 8.5851 4.28253 8.74421L0.888013 9.41574C0.481675 9.49613 0.0834376 9.23189 0.0414916 8.81981C0.0140555 8.55027 0 8.27678 0 8C0 7.72322 0.0140554 7.44973 0.0414915 7.18019C0.0834375 6.76811 0.481675 6.50387 0.888013 6.58426L4.28253 7.25579C5.08681 7.4149 5.52661 6.35293 4.84532 5.89683L1.9707 3.97232C1.6265 3.74188 1.53168 3.27344 1.79322 2.95224C2.13902 2.52755 2.52755 2.13902 2.95224 1.79322C3.27344 1.53168 3.74188 1.62651 3.97231 1.9707L5.89683 4.84533C6.35293 5.52661 7.4149 5.08681 7.25579 4.28253L6.58426 0.888013C6.50387 0.481675 6.76811 0.0834376 7.18019 0.0414915C7.44973 0.0140555 7.72322 0 8 0C8.27678 0 8.55027 0.0140554 8.81981 0.0414915C9.23189 0.0834375 9.49613 0.481675 9.41574 0.888013L8.74421 4.28253C8.5851 5.08681 9.64707 5.52661 10.1032 4.84532L12.0277 1.9707C12.2581 1.6265 12.7266 1.53168 13.0478 1.79322C13.4725 2.13902 13.861 2.52755 14.2068 2.95223C14.4683 3.27344 14.3735 3.74188 14.0293 3.97231L11.1547 5.89683C10.4734 6.35294 10.9132 7.4149 11.7175 7.25579L15.112 6.58426C15.5183 6.50387 15.9166 6.76811 15.9585 7.18019C15.9859 7.44973 16 7.72322 16 8C16 8.27678 15.9859 8.55027 15.9585 8.81981Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M10 2C10 0.895431 9.10457 0 8 0C6.89543 0 6 0.89543 6 2V5C6 5.55228 5.55228 6 5 6H2C0.895431 6 0 6.89543 0 8C0 9.10457 0.895431 10 2 10H5C5.55228 10 6 10.4477 6 11V14C6 15.1046 6.89543 16 8 16C9.10457 16 10 15.1046 10 14V11C10 10.4477 10.4477 10 11 10H14C15.1046 10 16 9.10457 16 8C16 6.89543 15.1046 6 14 6H11C10.4477 6 10 5.55228 10 5V2Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M12 1.07026C9.60879 2.4535 8 5.03887 8 8V0C5.03887 0 2.4535 1.60879 1.07026 4C2.4535 6.39121 5.03887 8 8 8H0C0 10.9611 1.6088 13.5465 4 14.9297C6.39121 13.5465 8 10.9611 8 8L8 16C10.9611 16 13.5465 14.3912 14.9297 12C13.5469 9.60955 10.9628 8.00101 8.00279 8H16C16 5.03887 14.3912 2.4535 12 1.07026Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15.9831 8.52372L12.9894 8.33026C12.9964 8.22148 13 8.11137 13 8C13 7.88863 12.9964 7.77852 12.9894 7.66974L15.9831 7.47627C15.9943 7.64941 16 7.82404 16 8C16 8.17596 15.9943 8.35059 15.9831 8.52372ZM15.8477 6.4387L12.9048 7.02091C12.8622 6.80567 12.8058 6.59565 12.7366 6.39168L15.5774 5.42754C15.6887 5.75556 15.7794 6.09313 15.8477 6.4387ZM15.1766 4.46092L12.487 5.78982C12.3902 5.59393 12.2808 5.40497 12.1596 5.22403L14.6525 3.55507C14.8461 3.84425 15.0214 4.14676 15.1766 4.46092ZM14.0148 2.72519L11.7601 4.70411C11.6156 4.5395 11.4605 4.3844 11.2959 4.23992L13.2748 1.98518C13.5372 2.21551 13.7845 2.46275 14.0148 2.72519ZM12.4449 1.34748L10.776 3.84038C10.595 3.71924 10.4061 3.60981 10.2102 3.51302L11.5391 0.823408C11.8532 0.978631 12.1557 1.15388 12.4449 1.34748ZM10.5725 0.422581L9.60832 3.26343C9.40435 3.19421 9.19433 3.13782 8.97909 3.09524L9.5613 0.152272C9.90687 0.220637 10.2444 0.311259 10.5725 0.422581ZM8.52373 0.0168691L8.33026 3.01062C8.22148 3.0036 8.11137 3 8 3C7.88863 3 7.77852 3.0036 7.66974 3.01062L7.47627 0.0168691C7.64941 0.00568084 7.82404 0 8 0C8.17596 0 8.35059 0.00568083 8.52373 0.0168691ZM6.4387 0.152272L7.02091 3.09524C6.80567 3.13782 6.59565 3.19421 6.39168 3.26343L5.42754 0.422581C5.75556 0.311259 6.09313 0.220638 6.4387 0.152272ZM4.46092 0.823408L5.78982 3.51302C5.59393 3.60981 5.40497 3.71925 5.22403 3.84038L3.55507 1.34748C3.84425 1.15388 4.14676 0.978631 4.46092 0.823408ZM2.72519 1.98518L4.70411 4.23992C4.5395 4.3844 4.3844 4.5395 4.23992 4.70412L1.98517 2.7252C2.21551 2.46275 2.46275 2.21551 2.72519 1.98518ZM1.34748 3.55508L3.84038 5.22403C3.71924 5.40497 3.60981 5.59393 3.51302 5.78982L0.823408 4.46092C0.978631 4.14676 1.15388 3.84425 1.34748 3.55508ZM0.422581 5.42754L3.26343 6.39168C3.19421 6.59565 3.13782 6.80567 3.09524 7.02091L0.152272 6.4387C0.220637 6.09313 0.311259 5.75556 0.422581 5.42754ZM0.0168691 7.47627C0.00568083 7.64941 0 7.82404 0 8C0 8.17596 0.00568084 8.35059 0.0168691 8.52373L3.01062 8.33026C3.0036 8.22148 3 8.11137 3 8C3 7.88863 3.0036 7.77852 3.01062 7.66974L0.0168691 7.47627ZM0.152272 9.5613L3.09524 8.97909C3.13782 9.19433 3.19421 9.40435 3.26343 9.60832L0.422581 10.5725C0.311259 10.2444 0.220637 9.90687 0.152272 9.5613ZM0.823408 11.5391L3.51302 10.2102C3.60981 10.4061 3.71925 10.595 3.84038 10.776L1.34748 12.4449C1.15388 12.1557 0.978631 11.8532 0.823408 11.5391ZM1.98518 13.2748L4.23992 11.2959C4.3844 11.4605 4.5395 11.6156 4.70412 11.7601L2.7252 14.0148C2.46275 13.7845 2.21551 13.5372 1.98518 13.2748ZM3.55508 14.6525L5.22403 12.1596C5.40497 12.2808 5.59393 12.3902 5.78982 12.487L4.46092 15.1766C4.14676 15.0214 3.84425 14.8461 3.55508 14.6525ZM5.42754 15.5774L6.39168 12.7366C6.59565 12.8058 6.80567 12.8622 7.02091 12.9048L6.4387 15.8477C6.09313 15.7794 5.75556 15.6887 5.42754 15.5774ZM7.47628 15.9831L7.66974 12.9894C7.77852 12.9964 7.88863 13 8 13C8.11137 13 8.22148 12.9964 8.33026 12.9894L8.52373 15.9831C8.35059 15.9943 8.17596 16 8 16C7.82404 16 7.64941 15.9943 7.47628 15.9831ZM9.5613 15.8477L8.97909 12.9048C9.19433 12.8622 9.40435 12.8058 9.60832 12.7366L10.5725 15.5774C10.2444 15.6887 9.90687 15.7794 9.5613 15.8477ZM11.5391 15.1766L10.2102 12.487C10.4061 12.3902 10.595 12.2808 10.776 12.1596L12.4449 14.6525C12.1557 14.8461 11.8532 15.0214 11.5391 15.1766ZM13.2748 14.0148L11.2959 11.7601C11.4605 11.6156 11.6156 11.4605 11.7601 11.2959L14.0148 13.2748C13.7845 13.5372 13.5372 13.7845 13.2748 14.0148ZM14.6525 12.4449L12.1596 10.776C12.2808 10.595 12.3902 10.4061 12.487 10.2102L15.1766 11.5391C15.0214 11.8532 14.8461 12.1557 14.6525 12.4449ZM15.5774 10.5725L12.7366 9.60832C12.8058 9.40435 12.8622 9.19433 12.9048 8.97909L15.8477 9.5613C15.7794 9.90687 15.6887 10.2444 15.5774 10.5725Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
{
|
||||
d: 'M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15.9026 9.25189L12.939 8.78615C12.979 8.53177 13 8.26937 13 8C13 7.73063 12.979 7.46823 12.939 7.21385L15.9026 6.74811C15.9667 7.15599 16 7.57411 16 8C16 8.42589 15.9667 8.84401 15.9026 9.25189ZM15.4706 5.13214L12.6701 6.20789C12.4812 5.7162 12.2158 5.26012 11.8871 4.85468L14.2174 2.96533C14.7416 3.61188 15.167 4.34182 15.4706 5.13214ZM13.0347 1.78258L11.1453 4.11289C10.7399 3.78417 10.2838 3.51876 9.79211 3.32989L10.8679 0.529397C11.6582 0.832983 12.3881 1.25837 13.0347 1.78258ZM9.25189 0.0973803L8.78615 3.06101C8.53177 3.02103 8.26937 3 8 3C7.73063 3 7.46823 3.02103 7.21385 3.06101L6.74811 0.0973805C7.15599 0.0332797 7.57411 0 8 0C8.42589 0 8.84401 0.0332797 9.25189 0.0973803ZM5.13214 0.529397L6.20789 3.32989C5.7162 3.51876 5.26012 3.78417 4.85468 4.11289L2.96533 1.78258C3.61188 1.25837 4.34182 0.832983 5.13214 0.529397ZM1.78258 2.96533L4.11289 4.85468C3.78417 5.26012 3.51876 5.7162 3.32989 6.20789L0.529397 5.13214C0.832983 4.34182 1.25837 3.61188 1.78258 2.96533ZM0.0973804 6.74811C0.0332797 7.15599 0 7.57411 0 8C0 8.42589 0.0332797 8.84401 0.0973805 9.25189L3.06101 8.78615C3.02103 8.53177 3 8.26937 3 8C3 7.73063 3.02103 7.46823 3.06101 7.21386L0.0973804 6.74811ZM0.529397 10.8679L3.32989 9.79211C3.51876 10.2838 3.78417 10.7399 4.11289 11.1453L1.78258 13.0347C1.25837 12.3881 0.832983 11.6582 0.529397 10.8679ZM2.96533 14.2174L4.85468 11.8871C5.26012 12.2158 5.7162 12.4812 6.20789 12.6701L5.13214 15.4706C4.34182 15.167 3.61188 14.7416 2.96533 14.2174ZM6.74811 15.9026L7.21386 12.939C7.46823 12.979 7.73063 13 8 13C8.26937 13 8.53177 12.979 8.78615 12.939L9.25189 15.9026C8.84401 15.9667 8.42589 16 8 16C7.57411 16 7.15599 15.9667 6.74811 15.9026ZM10.8679 15.4706L9.79211 12.6701C10.2838 12.4812 10.7399 12.2158 11.1453 11.8871L13.0347 14.2174C12.3881 14.7416 11.6582 15.167 10.8679 15.4706ZM14.2174 13.0347L11.8871 11.1453C12.2158 10.7399 12.4812 10.2838 12.6701 9.79211L15.4706 10.8679C15.167 11.6582 14.7416 12.3881 14.2174 13.0347Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
{
|
||||
d: 'M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M2 14C2 10.6863 4.68629 8 8 8C4.68629 8 2 5.31371 2 2H5C6.65685 2 8 3.34315 8 5C8 3.34315 9.34315 2 11 2H14C14 5.31352 11.3134 7.99969 8 8C11.3134 8.00031 14 10.6865 14 14H11C9.34315 14 8 12.6569 8 11C8 12.6569 6.65685 14 5 14L2 14Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 8C11.3137 8 14 4.86599 14 1H2C2 4.86567 4.68667 7.99948 8 8C4.68667 8.00053 2 11.1343 2 15H14C14 11.134 11.3137 8 8 8Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15.9026 9.25189L12.939 8.78615C12.979 8.53177 13 8.26937 13 8C13 7.73063 12.979 7.46823 12.939 7.21385L15.9026 6.74811C15.9667 7.15599 16 7.57411 16 8C16 8.42589 15.9667 8.84401 15.9026 9.25189ZM15.4706 5.13214L12.6701 6.20789C12.4812 5.7162 12.2158 5.26012 11.8871 4.85468L14.2174 2.96533C14.7416 3.61188 15.167 4.34182 15.4706 5.13214ZM13.0347 1.78258L11.1453 4.11289C10.7399 3.78417 10.2838 3.51876 9.79211 3.32989L10.8679 0.529397C11.6582 0.832983 12.3881 1.25837 13.0347 1.78258ZM9.25189 0.0973803L8.78615 3.06101C8.53177 3.02103 8.26937 3 8 3C7.73063 3 7.46823 3.02103 7.21385 3.06101L6.74811 0.0973805C7.15599 0.0332797 7.57411 0 8 0C8.42589 0 8.84401 0.0332797 9.25189 0.0973803ZM5.13214 0.529397L6.20789 3.32989C5.7162 3.51876 5.26012 3.78417 4.85468 4.11289L2.96533 1.78258C3.61188 1.25837 4.34182 0.832983 5.13214 0.529397ZM1.78258 2.96533L4.11289 4.85468C3.78417 5.26012 3.51876 5.7162 3.32989 6.20789L0.529397 5.13214C0.832983 4.34182 1.25837 3.61188 1.78258 2.96533ZM0.0973804 6.74811C0.0332797 7.15599 0 7.57411 0 8C0 8.42589 0.0332797 8.84401 0.0973805 9.25189L3.06101 8.78615C3.02103 8.53177 3 8.26937 3 8C3 7.73063 3.02103 7.46823 3.06101 7.21386L0.0973804 6.74811ZM0.529397 10.8679L3.32989 9.79211C3.51876 10.2838 3.78417 10.7399 4.11289 11.1453L1.78258 13.0347C1.25837 12.3881 0.832983 11.6582 0.529397 10.8679ZM2.96533 14.2174L4.85468 11.8871C5.26012 12.2158 5.7162 12.4812 6.20789 12.6701L5.13214 15.4706C4.34182 15.167 3.61188 14.7416 2.96533 14.2174ZM6.74811 15.9026L7.21386 12.939C7.46823 12.979 7.73063 13 8 13C8.26937 13 8.53177 12.979 8.78615 12.939L9.25189 15.9026C8.84401 15.9667 8.42589 16 8 16C7.57411 16 7.15599 15.9667 6.74811 15.9026ZM10.8679 15.4706L9.79211 12.6701C10.2838 12.4812 10.7399 12.2158 11.1453 11.8871L13.0347 14.2174C12.3881 14.7416 11.6582 15.167 10.8679 15.4706ZM14.2174 13.0347L11.8871 11.1453C12.2158 10.7399 12.4812 10.2838 12.6701 9.79211L15.4706 10.8679C15.167 11.6582 14.7416 12.3881 14.2174 13.0347Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
{
|
||||
d: 'M8 5C8.64911 6.29822 9.70178 7.35089 11 8C9.70178 8.64911 8.64911 9.70178 8 11C7.35089 9.70178 6.29822 8.64911 5 8C6.29822 7.35089 7.35089 6.29822 8 5Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15.9831 8.52372L12.9894 8.33026C12.9964 8.22148 13 8.11137 13 8C13 7.88863 12.9964 7.77852 12.9894 7.66974L15.9831 7.47627C15.9943 7.64941 16 7.82404 16 8C16 8.17596 15.9943 8.35059 15.9831 8.52372ZM15.8477 6.4387L12.9048 7.02091C12.8622 6.80567 12.8058 6.59565 12.7366 6.39168L15.5774 5.42754C15.6887 5.75556 15.7794 6.09313 15.8477 6.4387ZM15.1766 4.46092L12.487 5.78982C12.3902 5.59393 12.2808 5.40497 12.1596 5.22403L14.6525 3.55507C14.8461 3.84425 15.0214 4.14676 15.1766 4.46092ZM14.0148 2.72519L11.7601 4.70411C11.6156 4.5395 11.4605 4.3844 11.2959 4.23992L13.2748 1.98518C13.5372 2.21551 13.7845 2.46275 14.0148 2.72519ZM12.4449 1.34748L10.776 3.84038C10.595 3.71924 10.4061 3.60981 10.2102 3.51302L11.5391 0.823408C11.8532 0.978631 12.1557 1.15388 12.4449 1.34748ZM10.5725 0.422581L9.60832 3.26343C9.40435 3.19421 9.19433 3.13782 8.97909 3.09524L9.5613 0.152272C9.90687 0.220637 10.2444 0.311259 10.5725 0.422581ZM8.52373 0.0168691L8.33026 3.01062C8.22148 3.0036 8.11137 3 8 3C7.88863 3 7.77852 3.0036 7.66974 3.01062L7.47627 0.0168691C7.64941 0.00568084 7.82404 0 8 0C8.17596 0 8.35059 0.00568083 8.52373 0.0168691ZM6.4387 0.152272L7.02091 3.09524C6.80567 3.13782 6.59565 3.19421 6.39168 3.26343L5.42754 0.422581C5.75556 0.311259 6.09313 0.220638 6.4387 0.152272ZM4.46092 0.823408L5.78982 3.51302C5.59393 3.60981 5.40497 3.71925 5.22403 3.84038L3.55507 1.34748C3.84425 1.15388 4.14676 0.978631 4.46092 0.823408ZM2.72519 1.98518L4.70411 4.23992C4.5395 4.3844 4.3844 4.5395 4.23992 4.70412L1.98517 2.7252C2.21551 2.46275 2.46275 2.21551 2.72519 1.98518ZM1.34748 3.55508L3.84038 5.22403C3.71924 5.40497 3.60981 5.59393 3.51302 5.78982L0.823408 4.46092C0.978631 4.14676 1.15388 3.84425 1.34748 3.55508ZM0.422581 5.42754L3.26343 6.39168C3.19421 6.59565 3.13782 6.80567 3.09524 7.02091L0.152272 6.4387C0.220637 6.09313 0.311259 5.75556 0.422581 5.42754ZM0.0168691 7.47627C0.00568083 7.64941 0 7.82404 0 8C0 8.17596 0.00568084 8.35059 0.0168691 8.52373L3.01062 8.33026C3.0036 8.22148 3 8.11137 3 8C3 7.88863 3.0036 7.77852 3.01062 7.66974L0.0168691 7.47627ZM0.152272 9.5613L3.09524 8.97909C3.13782 9.19433 3.19421 9.40435 3.26343 9.60832L0.422581 10.5725C0.311259 10.2444 0.220637 9.90687 0.152272 9.5613ZM0.823408 11.5391L3.51302 10.2102C3.60981 10.4061 3.71925 10.595 3.84038 10.776L1.34748 12.4449C1.15388 12.1557 0.978631 11.8532 0.823408 11.5391ZM1.98518 13.2748L4.23992 11.2959C4.3844 11.4605 4.5395 11.6156 4.70412 11.7601L2.7252 14.0148C2.46275 13.7845 2.21551 13.5372 1.98518 13.2748ZM3.55508 14.6525L5.22403 12.1596C5.40497 12.2808 5.59393 12.3902 5.78982 12.487L4.46092 15.1766C4.14676 15.0214 3.84425 14.8461 3.55508 14.6525ZM5.42754 15.5774L6.39168 12.7366C6.59565 12.8058 6.80567 12.8622 7.02091 12.9048L6.4387 15.8477C6.09313 15.7794 5.75556 15.6887 5.42754 15.5774ZM7.47628 15.9831L7.66974 12.9894C7.77852 12.9964 7.88863 13 8 13C8.11137 13 8.22148 12.9964 8.33026 12.9894L8.52373 15.9831C8.35059 15.9943 8.17596 16 8 16C7.82404 16 7.64941 15.9943 7.47628 15.9831ZM9.5613 15.8477L8.97909 12.9048C9.19433 12.8622 9.40435 12.8058 9.60832 12.7366L10.5725 15.5774C10.2444 15.6887 9.90687 15.7794 9.5613 15.8477ZM11.5391 15.1766L10.2102 12.487C10.4061 12.3902 10.595 12.2808 10.776 12.1596L12.4449 14.6525C12.1557 14.8461 11.8532 15.0214 11.5391 15.1766ZM13.2748 14.0148L11.2959 11.7601C11.4605 11.6156 11.6156 11.4605 11.7601 11.2959L14.0148 13.2748C13.7845 13.5372 13.5372 13.7845 13.2748 14.0148ZM14.6525 12.4449L12.1596 10.776C12.2808 10.595 12.3902 10.4061 12.487 10.2102L15.1766 11.5391C15.0214 11.8532 14.8461 12.1557 14.6525 12.4449ZM15.5774 10.5725L12.7366 9.60832C12.8058 9.40435 12.8622 9.19433 12.9048 8.97909L15.8477 9.5613C15.7794 9.90687 15.6887 10.2444 15.5774 10.5725Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
{
|
||||
d: 'M8 5C8.64911 6.29822 9.70178 7.35089 11 8C9.70178 8.64911 8.64911 9.70178 8 11C7.35089 9.70178 6.29822 8.64911 5 8C6.29822 7.35089 7.35089 6.29822 8 5Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15.8477 9.5613L8.03733 8.01617L14.6525 12.4449C14.0685 13.3173 13.3173 14.0685 12.4449 14.6525L8.01617 8.03733L9.5613 15.8477C9.05633 15.9476 8.53428 16 8 16C7.46572 16 6.94367 15.9476 6.4387 15.8477L7.98383 8.03733L3.55508 14.6525C2.68266 14.0685 1.93154 13.3173 1.34748 12.4449L7.96267 8.01617L0.152272 9.5613C0.0523756 9.05633 0 8.53428 0 8C0 7.46572 0.0523755 6.94367 0.152272 6.4387L7.96267 7.98383L1.34748 3.55508C1.93154 2.68266 2.68266 1.93154 3.55507 1.34748L7.98383 7.96267L6.4387 0.152272C6.94367 0.0523755 7.46572 0 8 0C8.53428 0 9.05633 0.0523755 9.5613 0.152272L8.01617 7.96267L12.4449 1.34748C13.3173 1.93154 14.0685 2.68266 14.6525 3.55507L8.03733 7.98383L15.8477 6.4387C15.9476 6.94367 16 7.46572 16 8C16 8.53428 15.9476 9.05633 15.8477 9.5613Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M2.34314 2.34314C3.12419 1.5621 4.39052 1.5621 5.17157 2.34314L7.29289 4.46447C7.68342 4.85499 8.31658 4.85499 8.70711 4.46447L10.8284 2.34314C11.6095 1.5621 12.8758 1.5621 13.6569 2.34314C14.4379 3.12419 14.4379 4.39052 13.6569 5.17157L11.5355 7.29289C11.145 7.68342 11.145 8.31658 11.5355 8.70711L13.6569 10.8284C14.4379 11.6095 14.4379 12.8758 13.6569 13.6569C12.8758 14.4379 11.6095 14.4379 10.8284 13.6569L8.70711 11.5355C8.31658 11.145 7.68342 11.145 7.29289 11.5355L5.17157 13.6569C4.39052 14.4379 3.12419 14.4379 2.34314 13.6569C1.5621 12.8758 1.5621 11.6095 2.34314 10.8284L4.46447 8.70711C4.85499 8.31658 4.85499 7.68342 4.46447 7.29289L2.34314 5.17157C1.5621 4.39052 1.5621 3.12419 2.34314 2.34314ZM8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 8C8 8 5.5 3.82101 5.5 2.46154C5.5 1.10207 6.61929 0 8 0C9.38071 0 10.5 1.10207 10.5 2.46154C10.5 3.82101 8 8 8 8Z',
|
||||
},
|
||||
{
|
||||
d: 'M8 8C8 8 12.179 5.5 13.5385 5.5C14.8979 5.5 16 6.61929 16 8C16 9.38071 14.8979 10.5 13.5385 10.5C12.1803 10.5 8.00807 8.00483 8 8Z',
|
||||
},
|
||||
{
|
||||
d: 'M8 8C8 8 10.5 12.179 10.5 13.5385C10.5 14.8979 9.38071 16 8 16C6.61929 16 5.5 14.8979 5.5 13.5385C5.5 12.1808 7.99339 8.01105 8 8Z',
|
||||
},
|
||||
{
|
||||
d: 'M2.46154 5.5C3.82101 5.5 8 8 8 8C8 8 3.82101 10.5 2.46154 10.5C1.10207 10.5 0 9.38071 0 8C0 6.61929 1.10207 5.5 2.46154 5.5Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M10.3195 2.46119C10.3195 3.82047 8.00012 7.99888 8.00012 7.99888C8.00012 7.99888 5.68069 3.82047 5.68069 2.46119C5.68069 1.10191 6.71913 0 8.00012 0C9.28111 0 10.3195 1.10191 10.3195 2.46119Z',
|
||||
},
|
||||
{
|
||||
d: 'M2.20488 7.30932C3.34269 7.98896 8.00002 8 8.00002 8C7.97235 8.00007 3.33929 8.01307 2.20488 8.69068C1.06707 9.37032 0.66391 10.8517 1.3044 11.9994C1.9449 13.1472 3.3865 13.5267 4.52431 12.847C5.66058 12.1683 7.9937 8.01126 8.00002 8C8.0094 8.01672 10.3402 12.1687 11.4757 12.847C12.6135 13.5266 14.0551 13.1472 14.6956 11.9994C15.3361 10.8517 14.9329 9.37029 13.7951 8.69065C12.6833 8.02652 8.21072 8.00083 8.00717 8C8.21072 7.99917 12.6833 7.97348 13.7951 7.30935C14.9329 6.62971 15.3361 5.14833 14.6956 4.00059C14.0551 2.85285 12.6135 2.47337 11.4757 3.15301C10.3434 3.82938 8.02234 7.96026 8.00002 8C7.99376 7.98884 5.66059 3.83171 4.52431 3.15299C3.3865 2.47335 1.9449 2.85282 1.3044 4.00056C0.66391 5.1483 1.06707 6.62968 2.20488 7.30932Z',
|
||||
},
|
||||
{
|
||||
d: 'M8.00012 8.00112C8.00012 8.00112 10.3195 12.1795 10.3195 13.5388C10.3195 14.8981 9.28111 16 8.00012 16C6.71913 16 5.68069 14.8981 5.68069 13.5388C5.68069 12.1795 8.00012 8.00112 8.00012 8.00112Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 0C9.10457 0 10 0.895431 10 2V5C10 5.55228 10.4477 6 11 6H14C15.1046 6 16 6.89543 16 8C16 9.10457 15.1046 10 14 10H11C10.4477 10 10 10.4477 10 11V14C10 15.1046 9.10457 16 8 16C6.89543 16 6 15.1046 6 14V11C6 10.4477 5.55228 10 5 10H2C0.895431 10 0 9.10457 0 8C0 6.89543 0.895431 6 2 6H5C5.55228 6 6 5.55228 6 5V2C6 0.89543 6.89543 0 8 0ZM8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15.9026 9.25189L12.939 8.78615C12.979 8.53177 13 8.26937 13 8C13 7.73063 12.979 7.46823 12.939 7.21385L15.9026 6.74811C15.9667 7.15599 16 7.57411 16 8C16 8.42589 15.9667 8.84401 15.9026 9.25189ZM15.4706 5.13214L12.6701 6.20789C12.4812 5.7162 12.2158 5.26012 11.8871 4.85468L14.2174 2.96533C14.7416 3.61188 15.167 4.34182 15.4706 5.13214ZM13.0347 1.78258L11.1453 4.11289C10.7399 3.78417 10.2838 3.51876 9.79211 3.32989L10.8679 0.529397C11.6582 0.832983 12.3881 1.25837 13.0347 1.78258ZM9.25189 0.0973803L8.78615 3.06101C8.53177 3.02103 8.26937 3 8 3C7.73063 3 7.46823 3.02103 7.21385 3.06101L6.74811 0.0973805C7.15599 0.0332797 7.57411 0 8 0C8.42589 0 8.84401 0.0332797 9.25189 0.0973803ZM5.13214 0.529397L6.20789 3.32989C5.7162 3.51876 5.26012 3.78417 4.85468 4.11289L2.96533 1.78258C3.61188 1.25837 4.34182 0.832983 5.13214 0.529397ZM1.78258 2.96533L4.11289 4.85468C3.78417 5.26012 3.51876 5.7162 3.32989 6.20789L0.529397 5.13214C0.832983 4.34182 1.25837 3.61188 1.78258 2.96533ZM0.0973804 6.74811C0.0332797 7.15599 0 7.57411 0 8C0 8.42589 0.0332797 8.84401 0.0973805 9.25189L3.06101 8.78615C3.02103 8.53177 3 8.26937 3 8C3 7.73063 3.02103 7.46823 3.06101 7.21386L0.0973804 6.74811ZM0.529397 10.8679L3.32989 9.79211C3.51876 10.2838 3.78417 10.7399 4.11289 11.1453L1.78258 13.0347C1.25837 12.3881 0.832983 11.6582 0.529397 10.8679ZM2.96533 14.2174L4.85468 11.8871C5.26012 12.2158 5.7162 12.4812 6.20789 12.6701L5.13214 15.4706C4.34182 15.167 3.61188 14.7416 2.96533 14.2174ZM6.74811 15.9026L7.21386 12.939C7.46823 12.979 7.73063 13 8 13C8.26937 13 8.53177 12.979 8.78615 12.939L9.25189 15.9026C8.84401 15.9667 8.42589 16 8 16C7.57411 16 7.15599 15.9667 6.74811 15.9026ZM10.8679 15.4706L9.79211 12.6701C10.2838 12.4812 10.7399 12.2158 11.1453 11.8871L13.0347 14.2174C12.3881 14.7416 11.6582 15.167 10.8679 15.4706ZM14.2174 13.0347L11.8871 11.1453C12.2158 10.7399 12.4812 10.2838 12.6701 9.79211L15.4706 10.8679C15.167 11.6582 14.7416 12.3881 14.2174 13.0347Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M11.923 8.78487L15.8477 9.5613C15.9476 9.05633 16 8.53428 16 8C16 7.46572 15.9476 6.94367 15.8477 6.4387L11.923 7.21513C11.8192 6.6932 11.6138 6.20786 11.3283 5.78059L14.6525 3.55507C14.0685 2.68266 13.3173 1.93154 12.4449 1.34748L10.2194 4.6717C9.79214 4.38621 9.3068 4.18081 8.78487 4.07697L9.5613 0.152272C9.05633 0.0523755 8.53428 0 8 0C7.46572 0 6.94367 0.0523755 6.4387 0.152272L7.21513 4.07697C6.6932 4.18082 6.20786 4.38621 5.78059 4.6717L3.55507 1.34748C2.68266 1.93154 1.93154 2.68266 1.34748 3.55508L4.6717 5.78059C4.38621 6.20786 4.18081 6.6932 4.07697 7.21513L0.152272 6.4387C0.0523755 6.94367 0 7.46572 0 8C0 8.53428 0.0523756 9.05633 0.152272 9.5613L4.07697 8.78487C4.18082 9.3068 4.38621 9.79214 4.6717 10.2194L1.34748 12.4449C1.93154 13.3173 2.68266 14.0685 3.55508 14.6525L5.78059 11.3283C6.20786 11.6138 6.6932 11.8192 7.21513 11.923L6.4387 15.8477C6.94367 15.9476 7.46572 16 8 16C8.53428 16 9.05633 15.9476 9.5613 15.8477L8.78487 11.923C9.3068 11.8192 9.79214 11.6138 10.2194 11.3283L12.4449 14.6525C13.3173 14.0685 14.0685 13.3173 14.6525 12.4449L11.3283 10.2194C11.6138 9.79214 11.8192 9.3068 11.923 8.78487ZM11.923 8.78487C11.9735 8.53108 12 8.26863 12 8C12 7.73137 11.9735 7.46892 11.923 7.21513L8.03733 7.98383L11.3283 5.78059C11.0353 5.34206 10.6579 4.9647 10.2194 4.6717L8.01617 7.96267L8.78487 4.07697C8.53108 4.02648 8.26863 4 8 4C7.73137 4 7.46892 4.02648 7.21513 4.07697L7.98383 7.96267L5.78059 4.6717C5.34206 4.9647 4.9647 5.34207 4.6717 5.78059L7.96267 7.98383L4.07697 7.21513C4.02648 7.46892 4 7.73137 4 8C4 8.26863 4.02648 8.53108 4.07697 8.78487L7.96267 8.01617L4.6717 10.2194C4.9647 10.6579 5.34207 11.0353 5.78059 11.3283L7.98383 8.03733L7.21513 11.923C7.46892 11.9735 7.73137 12 8 12C8.26863 12 8.53108 11.9735 8.78487 11.923L8.01617 8.03733L10.2194 11.3283C10.6579 11.0353 11.0353 10.6579 11.3283 10.2194L8.03733 8.01617L11.923 8.78487Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M10.9418 8.59077L15.8477 9.5613C15.9476 9.05633 16 8.53428 16 8C16 7.46572 15.9476 6.94367 15.8477 6.4387L10.9418 7.40923C10.98 7.60024 11 7.79778 11 8C11 8.20222 10.98 8.39977 10.9418 8.59077ZM10.4972 9.66303C10.277 9.99308 9.99308 10.277 9.66303 10.4972L12.4449 14.6525C13.3173 14.0685 14.0685 13.3173 14.6525 12.4449L10.4972 9.66303ZM8.59077 10.9418C8.39977 10.98 8.20222 11 8 11C7.79778 11 7.60024 10.98 7.40923 10.9418L6.4387 15.8477C6.94367 15.9476 7.46572 16 8 16C8.53428 16 9.05633 15.9476 9.5613 15.8477L8.59077 10.9418ZM6.33697 10.4972C6.00692 10.277 5.72299 9.99308 5.50276 9.66303L1.34748 12.4449C1.93154 13.3173 2.68266 14.0685 3.55508 14.6525L6.33697 10.4972ZM5.05815 8.59077C5.02001 8.39977 5 8.20222 5 8C5 7.79778 5.02001 7.60024 5.05815 7.40923L0.152272 6.4387C0.0523755 6.94367 0 7.46572 0 8C0 8.53428 0.0523756 9.05633 0.152272 9.5613L5.05815 8.59077ZM5.50276 6.33697C5.72299 6.00692 6.00692 5.72299 6.33697 5.50276L3.55507 1.34748C2.68266 1.93154 1.93154 2.68266 1.34748 3.55508L5.50276 6.33697ZM7.40923 5.05815C7.60024 5.02001 7.79778 5 8 5C8.20222 5 8.39977 5.02001 8.59077 5.05815L9.5613 0.152272C9.05633 0.0523755 8.53428 0 8 0C7.46572 0 6.94367 0.0523755 6.4387 0.152272L7.40923 5.05815ZM9.66303 5.50276L12.4449 1.34748C13.3173 1.93154 14.0685 2.68266 14.6525 3.55507L10.4972 6.33697C10.277 6.00692 9.99308 5.72299 9.66303 5.50276Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M6.65494 5.34506L8 4L9.34522 5.34522C9.85712 4.23711 10.3195 3.06813 10.3195 2.46119C10.3195 1.10191 9.28111 0 8.00012 0C6.71913 0 5.68069 1.10191 5.68069 2.46119C5.68069 3.0681 6.14307 4.237 6.65494 5.34506Z',
|
||||
},
|
||||
{
|
||||
d: 'M6.48343 5.51657L4.20992 7.79008C3.35262 7.68776 2.58369 7.5356 2.20488 7.30932C1.06707 6.62968 0.66391 5.1483 1.3044 4.00056C1.9449 2.85282 3.3865 2.47335 4.52431 3.15299C5.04047 3.4613 5.80362 4.48739 6.48343 5.51657Z',
|
||||
},
|
||||
{
|
||||
d: 'M4.20992 8.20992C3.35262 8.31224 2.58369 8.4644 2.20488 8.69068C1.06707 9.37032 0.66391 10.8517 1.3044 11.9994C1.9449 13.1472 3.3865 13.5267 4.52431 12.847C5.04047 12.5387 5.80362 11.5126 6.48343 10.4834L4.20992 8.20992Z',
|
||||
},
|
||||
{
|
||||
d: 'M6.65494 10.6549C6.14307 11.763 5.68069 12.9319 5.68069 13.5388C5.68069 14.8981 6.71913 16 8.00012 16C9.28111 16 10.3195 14.8981 10.3195 13.5388C10.3195 12.9319 9.85712 11.7629 9.34522 10.6548L8 12L6.65494 10.6549Z',
|
||||
},
|
||||
{
|
||||
d: 'M9.51659 10.4834C10.1964 11.5126 10.9595 12.5387 11.4757 12.847C12.6135 13.5266 14.0551 13.1472 14.6956 11.9994C15.3361 10.8517 14.9329 9.37029 13.7951 8.69065C13.4163 8.46437 12.6474 8.31221 11.7901 8.20989L9.51659 10.4834Z',
|
||||
},
|
||||
{
|
||||
d: 'M11.7901 7.79011L9.5166 5.5166C10.1964 4.4874 10.9596 3.46132 11.4757 3.15301C12.6135 2.47337 14.0551 2.85285 14.6956 4.00059C15.3361 5.14833 14.9329 6.62971 13.7951 7.30935C13.4163 7.53563 12.6474 7.68779 11.7901 7.79011Z',
|
||||
},
|
||||
{
|
||||
d: 'M8 6L10 8L8 10L6 8L8 6Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15.4055 4.96811C14.5941 2.98825 13.0118 1.40593 11.0319 0.5945C10.9114 0.68356 10.796 0.782639 10.6869 0.891746C10.2922 1.28636 9.86718 2.18783 9.47419 3.22087C9.00818 3.07729 8.51312 3 8 3C7.48688 3 6.99182 3.07729 6.52581 3.22087C6.13282 2.18783 5.70776 1.28636 5.31315 0.891746C5.20404 0.782638 5.08865 0.683558 4.96811 0.594498C2.98825 1.40593 1.40593 2.98825 0.594501 4.96812C0.68356 5.08865 0.78264 5.20404 0.891747 5.31315C1.28636 5.70776 2.18783 6.13282 3.22087 6.52581C3.07729 6.99182 3 7.48688 3 8C3 8.51312 3.07729 9.00818 3.22087 9.47419C2.18783 9.86718 1.28636 10.2922 0.891747 10.6869C0.782642 10.796 0.683564 10.9113 0.594506 11.0319C1.40594 13.0117 2.98825 14.5941 4.96812 15.4055C5.08866 15.3164 5.20404 15.2174 5.31315 15.1083C5.70776 14.7136 6.13282 13.8122 6.52581 12.7791C6.99182 12.9227 7.48688 13 8 13C8.51312 13 9.00818 12.9227 9.47419 12.7791C9.86718 13.8122 10.2922 14.7136 10.6869 15.1083C10.796 15.2174 10.9113 15.3164 11.0319 15.4055C13.0117 14.5941 14.5941 13.0117 15.4055 11.0319C15.3164 10.9113 15.2174 10.796 15.1083 10.6869C14.7136 10.2922 13.8122 9.86718 12.7791 9.47419C12.9227 9.00818 13 8.51312 13 8C13 7.48688 12.9227 6.99182 12.7791 6.52581C13.8122 6.13282 14.7136 5.70776 15.1083 5.31315C15.2174 5.20404 15.3164 5.08865 15.4055 4.96811ZM8 8C8 8 8.66996 5.33492 9.47419 3.22087C11.0501 3.70641 12.2936 4.94995 12.7791 6.52581C10.6651 7.33004 8 8 8 8ZM8 8C8 8 5.33492 8.66996 3.22087 9.47419C3.70641 11.0501 4.94995 12.2936 6.52581 12.7791C7.33004 10.6651 8 8 8 8ZM8 8C8 8 10.6651 8.66996 12.7791 9.47419C12.2936 11.0501 11.0501 12.2936 9.47419 12.7791C8.66996 10.6651 8 8 8 8ZM8 8C8 8 5.33492 7.33004 3.22087 6.52581C3.70641 4.94994 4.94995 3.7064 6.52581 3.22087C7.33004 5.33492 8 8 8 8Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM8 8C8 8 12.7852 6.79708 13.7592 5.82309C13.8476 5.73469 13.9278 5.64121 14 5.54355C13.3426 3.93944 12.0606 2.65743 10.4565 2C10.3588 2.07216 10.2653 2.15243 10.1769 2.24083C9.20292 3.21483 8 8 8 8ZM8 8C8 8 9.20292 12.7852 10.1769 13.7592C10.2653 13.8476 10.3588 13.9278 10.4565 14C12.0606 13.3426 13.3426 12.0606 14 10.4565C13.9278 10.3588 13.8476 10.2653 13.7592 10.1769C12.7852 9.20292 8 8 8 8ZM8 8C8 8 6.79708 12.7852 5.82309 13.7592C5.73469 13.8476 5.64121 13.9278 5.54355 14C3.93944 13.3426 2.65743 12.0606 2 10.4565C2.07216 10.3588 2.15243 10.2653 2.24083 10.1769C3.21483 9.20292 8 8 8 8ZM8 8C8 8 3.21483 6.79708 2.24083 5.82309C2.15243 5.73469 2.07216 5.6412 2 5.54354C2.65743 3.93944 3.93944 2.65743 5.54354 2C5.6412 2.07216 5.73469 2.15243 5.82309 2.24083C6.79708 3.21483 8 8 8 8Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M9.17157 1.17157C7.60948 2.73367 7.60948 5.26633 9.17157 6.82843C10.7337 8.39052 13.2663 8.39052 14.8284 6.82843C16.3905 5.26633 16.3905 2.73367 14.8284 1.17157C13.2663 -0.390524 10.7337 -0.390524 9.17157 1.17157Z',
|
||||
},
|
||||
{
|
||||
d: 'M1.17157 14.8284C2.73367 16.3905 5.26633 16.3905 6.82843 14.8284C8.39052 13.2663 8.39052 10.7337 6.82843 9.17157C5.26633 7.60948 2.73367 7.60948 1.17157 9.17157C-0.390524 10.7337 -0.390524 13.2663 1.17157 14.8284Z',
|
||||
},
|
||||
{
|
||||
d: 'M6.82843 1.17157C8.39052 2.73367 8.39052 5.26633 6.82843 6.82843C5.26633 8.39052 2.73367 8.39052 1.17157 6.82843C-0.390524 5.26633 -0.390524 2.73367 1.17157 1.17157C2.73367 -0.390524 5.26633 -0.390524 6.82843 1.17157Z',
|
||||
},
|
||||
{
|
||||
d: 'M9.17157 14.8284C10.7337 16.3905 13.2663 16.3905 14.8284 14.8284C16.3905 13.2663 16.3905 10.7337 14.8284 9.17157C13.2663 7.60948 10.7337 7.60948 9.17157 9.17157C7.60948 10.7337 7.60948 13.2663 9.17157 14.8284Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M13.6569 2.34313C12.0059 5.93367 12.0059 10.0663 13.6569 13.6568C10.0663 12.0058 5.93368 12.0058 2.34315 13.6568C3.99414 10.0663 3.99414 5.93367 2.34315 2.34313C5.93368 3.99413 10.0663 3.99413 13.6569 2.34313Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15.1083 5.31314C13.9061 6.5153 8 8 8 8C8 8 9.4847 2.09389 10.6869 0.891741C10.796 0.782636 10.9113 0.683558 11.0319 0.594499C13.0117 1.40593 14.5941 2.98825 15.4055 4.96812C15.3164 5.08865 15.2174 5.20404 15.1083 5.31314Z',
|
||||
},
|
||||
{
|
||||
d: 'M15.4055 11.0319C15.3164 10.9113 15.2174 10.796 15.1083 10.6868C13.9061 9.48469 8 8 8 8C8 8 6.5153 2.09389 5.31315 0.891741C5.20404 0.782635 5.08866 0.683557 4.96812 0.594498C2.98825 1.40593 1.40593 2.98824 0.594501 4.96812C0.683561 5.08865 0.782639 5.20404 0.891746 5.31314C2.0939 6.5153 8 8 8 8C8 8 2.0939 9.48469 0.891746 10.6868C0.78264 10.796 0.683561 10.9113 0.594502 11.0319C1.40593 13.0117 2.98825 14.5941 4.96812 15.4055C5.08866 15.3164 5.20404 15.2174 5.31315 15.1082C6.5153 13.9061 8 8 8 8C8 8 9.4847 13.9061 10.6869 15.1082C10.796 15.2174 10.9113 15.3164 11.0319 15.4055C13.0117 14.5941 14.5941 13.0117 15.4055 11.0319Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 0C8.33735 2.71168 11.5009 4.02205 13.6569 2.34315C11.9779 4.49913 13.2883 7.66266 16 8C13.2883 8.33735 11.9779 11.5009 13.6569 13.6569C11.5009 11.9779 8.33735 13.2883 8 16C7.66266 13.2883 4.49913 11.9779 2.34315 13.6569C4.02205 11.5009 2.71168 8.33735 0 8C2.71168 7.66266 4.02205 4.49913 2.34315 2.34315C4.49913 4.02205 7.66266 2.71168 8 0Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M6.24244 4.40581C6.77293 4.14591 7.36943 4 8 4C8.63065 4 9.22722 4.14595 9.75776 4.40591C10.0814 3.6217 10.3195 2.89673 10.3195 2.46119C10.3195 1.10191 9.28111 0 8.00012 0C6.71913 0 5.68069 1.10191 5.68069 2.46119C5.68069 2.89671 5.9188 3.62164 6.24244 4.40581Z',
|
||||
},
|
||||
{
|
||||
d: 'M5.86339 4.61784C4.80568 5.28742 4.08369 6.43949 4.00681 7.76466C3.23255 7.66304 2.55351 7.51757 2.20488 7.30932C1.06707 6.62968 0.66391 5.1483 1.3044 4.00056C1.9449 2.85282 3.3865 2.47335 4.52431 3.15299C4.88694 3.3696 5.37149 3.94049 5.86339 4.61784Z',
|
||||
},
|
||||
{
|
||||
d: 'M4.00681 8.23534C3.23255 8.33696 2.5535 8.48244 2.20488 8.69068C1.06707 9.37032 0.66391 10.8517 1.3044 11.9994C1.9449 13.1472 3.3865 13.5267 4.52431 12.847C4.88694 12.6304 5.37149 12.0595 5.86339 11.3822C4.80568 10.7126 4.0837 9.56051 4.00681 8.23534Z',
|
||||
},
|
||||
{
|
||||
d: 'M6.24244 11.5942C5.9188 12.3784 5.68069 13.1033 5.68069 13.5388C5.68069 14.8981 6.71913 16 8.00012 16C9.28111 16 10.3195 14.8981 10.3195 13.5388C10.3195 13.1033 10.0814 12.3783 9.75776 11.5941C9.22722 11.8541 8.63065 12 8 12C7.36943 12 6.77293 11.8541 6.24244 11.5942Z',
|
||||
},
|
||||
{
|
||||
d: 'M10.1366 11.3821C10.6285 12.0595 11.1131 12.6304 11.4757 12.847C12.6135 13.5266 14.0551 13.1472 14.6956 11.9994C15.3361 10.8517 14.9329 9.37029 13.7951 8.69065C13.4465 8.4824 12.7675 8.33693 11.9932 8.23531C11.9163 9.56048 11.1943 10.7126 10.1366 11.3821Z',
|
||||
},
|
||||
{
|
||||
d: 'M11.9932 7.76469C11.9163 6.43952 11.1943 5.28745 10.1366 4.61786C10.6285 3.94051 11.1131 3.36962 11.4757 3.15301C12.6135 2.47337 14.0551 2.85285 14.6956 4.00059C15.3361 5.14833 14.9329 6.62971 13.7951 7.30935C13.4465 7.5176 12.7675 7.66307 11.9932 7.76469Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 0C9.37146 3.70632 12.2937 6.62854 16 8C12.2937 9.37146 9.37146 12.2937 8 16C6.62854 12.2937 3.70632 9.37146 0 8C3.70632 6.62854 6.62854 3.70632 8 0Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M12 4C12 6.20914 10.2091 8 8 8C5.79086 8 4 6.20914 4 4C4 1.79086 5.79086 0 8 0C10.2091 0 12 1.79086 12 4Z',
|
||||
},
|
||||
{
|
||||
d: 'M8 11C8 13.2091 6.20914 15 4 15C1.79086 15 0 13.2091 0 11C0 8.79086 1.79086 7 4 7C6.20914 7 8 8.79086 8 11Z',
|
||||
},
|
||||
{
|
||||
d: 'M8 11C8 8.79086 9.79086 7 12 7C14.2091 7 16 8.79086 16 11C16 13.2091 14.2091 15 12 15C9.79086 15 8 13.2091 8 11Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM5 4C4.44772 4 4 4.44772 4 5V11C4 11.5523 4.44772 12 5 12H11C11.5523 12 12 11.5523 12 11V5C12 4.44772 11.5523 4 11 4H5Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM12.7207 7.32562L8.67438 3.27934C8.30193 2.90689 7.69807 2.90689 7.32562 3.27934L3.27934 7.32562C2.90689 7.69807 2.90689 8.30193 3.27934 8.67438L7.32562 12.7207C7.69807 13.0931 8.30193 13.0931 8.67438 12.7207L12.7207 8.67438C13.0931 8.30193 13.0931 7.69807 12.7207 7.32562Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M10.3438 10.3438C10.9434 10.9431 11.7715 11.3137 12.6863 11.3137C14.5164 11.3137 16 9.83012 16 8.00001C16 6.1699 14.5164 4.6863 12.6863 4.6863C10.8562 4.6863 9.37259 6.1699 9.37259 8.00001C9.37259 8.91475 9.74323 9.74292 10.3425 10.3425C9.74292 9.74323 8.91475 9.37258 8 9.37258C7.08525 9.37258 6.25708 9.74323 5.65746 10.3425C6.25677 9.74292 6.62741 8.91475 6.62741 8.00001C6.62741 6.1699 5.14382 4.6863 3.31371 4.6863C1.4836 4.6863 -3.70335e-07 6.1699 0 8.00001C-4.9378e-07 9.83012 1.4836 11.3137 3.31371 11.3137C4.22845 11.3137 5.05663 10.9431 5.65625 10.3438C5.05695 10.9434 4.68629 11.7715 4.68629 12.6863C4.68629 14.5164 6.16989 16 8 16C9.83011 16 11.3137 14.5164 11.3137 12.6863C11.3137 11.7715 10.9431 10.9434 10.3438 10.3438Z',
|
||||
},
|
||||
{
|
||||
d: 'M8 6.62742C6.16989 6.62742 4.68629 5.14382 4.68629 3.31371C4.68629 1.4836 6.16989 -7.40671e-08 8 0C9.83011 -7.40671e-08 11.3137 1.4836 11.3137 3.31371C11.3137 5.14382 9.83011 6.62742 8 6.62742Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M13.6569 2.34315C11.5009 4.02205 8.33735 2.71168 8 0C7.66266 2.71168 4.49913 4.02205 2.34315 2.34315C4.02205 4.49913 2.71168 7.66266 0 8C2.71168 8.33735 4.02205 11.5009 2.34315 13.6569C4.49913 11.9779 7.66266 13.2883 8 16C8.33735 13.2883 11.5009 11.9779 13.6569 13.6569C11.9779 11.5009 13.2883 8.33735 16 8C13.2883 7.66266 11.9779 4.49913 13.6569 2.34315ZM8 11C9.65685 11 11 9.65685 11 8C11 6.34315 9.65685 5 8 5C6.34315 5 5 6.34315 5 8C5 9.65685 6.34315 11 8 11Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M11.9916 2.34459C12.451 1.88514 13.1959 1.88514 13.6554 2.34459C14.1149 2.80405 14.1149 3.54899 13.6554 4.00845L11.1596 6.50422C10.7002 6.96368 9.95524 6.96368 9.49578 6.50422C9.03632 6.04476 9.03632 5.29983 9.49578 4.84037L11.9916 2.34459Z',
|
||||
},
|
||||
{
|
||||
d: 'M4.84037 9.49578C5.29983 9.03632 6.04476 9.03632 6.50422 9.49578C6.96368 9.95524 6.96368 10.7002 6.50422 11.1596L4.00845 13.6554C3.54899 14.1149 2.80405 14.1149 2.3446 13.6554C1.88514 13.1959 1.88514 12.451 2.3446 11.9916L4.84037 9.49578Z',
|
||||
},
|
||||
{
|
||||
d: 'M13.6554 11.9916C14.1149 12.451 14.1149 13.1959 13.6554 13.6554C13.1959 14.1149 12.451 14.1149 11.9916 13.6554L9.49578 11.1596C9.03632 10.7002 9.03632 9.95524 9.49578 9.49578C9.95524 9.03632 10.7002 9.03632 11.1596 9.49578L13.6554 11.9916Z',
|
||||
},
|
||||
{
|
||||
d: 'M6.50422 4.84037C6.96368 5.29983 6.96368 6.04476 6.50422 6.50422C6.04476 6.96368 5.29983 6.96368 4.84037 6.50422L2.34459 4.00845C1.88513 3.54899 1.88514 2.80405 2.3446 2.34459C2.80405 1.88513 3.54899 1.88514 4.00845 2.34459L6.50422 4.84037Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15 2C15 5.86599 11.866 9 8 9C4.13401 9 1 5.86599 1 2H4.5C6.433 2 8 3.567 8 5.5C8 3.567 9.567 2 11.5 2H15Z',
|
||||
},
|
||||
{
|
||||
d: 'M1 9C1 12.866 4.13401 16 8 16C11.866 16 15 12.866 15 9H11.5C9.567 9 8 10.567 8 12.5C8 10.567 6.433 9 4.5 9H1Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M7.99948 0C6.89491 7.11679e-05 5.99954 0.895559 5.99961 2.00013C5.99968 3.1047 6.8957 4.00007 8.00027 4C9.10484 4.00007 10.0003 3.1047 10.0004 2.00013C10.0005 0.895559 9.1051 7.11679e-05 8.00053 0H7.99948Z',
|
||||
},
|
||||
{
|
||||
d: 'M4.00001 7.99973C4.00008 6.89516 3.10471 5.99968 2.00014 5.9996C0.895567 5.99953 7.87973e-05 6.89491 7.62939e-06 7.99948V8.00052C7.87973e-05 9.10509 0.895567 10.0005 2.00014 10.0004C3.10471 10.0003 4.00008 9.1043 4.00001 7.99973Z',
|
||||
},
|
||||
{
|
||||
d: 'M16 7.99948C15.9999 6.89491 15.1044 5.99953 13.9999 5.99961C12.8953 5.99968 11.9999 6.8957 12 8.00027C11.9999 9.10484 12.8953 10.0003 13.9999 10.0004C15.1044 10.0005 15.9999 9.10509 16 8.00052V7.99948Z',
|
||||
},
|
||||
{
|
||||
d: 'M7.99974 12C6.89517 11.9999 5.99968 12.8953 5.99961 13.9999C5.99954 15.1044 6.89491 15.9999 7.99948 16H8.00053C9.1051 15.9999 10.0005 15.1044 10.0004 13.9999C10.0003 12.8953 9.10431 11.9999 7.99974 12Z',
|
||||
},
|
||||
{
|
||||
d: 'M8.00001 11C9.65686 11 11 9.65685 11 8C11 6.34315 9.65686 5 8.00001 5C6.34315 5 5.00001 6.34315 5.00001 8C5.00001 9.65685 6.34315 11 8.00001 11Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M13.6569 2.34315C11.5009 4.02205 8.33735 2.71168 8 0C7.66266 2.71168 4.49913 4.02205 2.34315 2.34315C4.02205 4.49913 2.71168 7.66266 0 8C2.71168 8.33735 4.02205 11.5009 2.34315 13.6569C4.49913 11.9779 7.66266 13.2883 8 16C8.33735 13.2883 11.5009 11.9779 13.6569 13.6569C11.9779 11.5009 13.2883 8.33735 16 8C13.2883 7.66266 11.9779 4.49913 13.6569 2.34315ZM12 8L8 4L4 8L8 12L12 8Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M13.6569 13.6568C12.0059 10.0663 12.0059 5.93368 13.6569 2.34314C10.0663 3.99414 5.93368 3.99414 2.34315 2.34314C3.99414 5.93368 3.99414 10.0663 2.34315 13.6568C5.93368 12.0059 10.0663 12.0059 13.6569 13.6568ZM11 8L8 5L5 8L8 11L11 8Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M7.99948 0C6.89491 7.11679e-05 5.99954 0.895559 5.99961 2.00013C5.99968 3.1047 6.8957 4.00007 8.00027 4C9.10484 4.00007 10.0003 3.1047 10.0004 2.00013C10.0005 0.895559 9.1051 7.11679e-05 8.00053 0H7.99948Z',
|
||||
},
|
||||
{
|
||||
d: 'M13.6565 2.34278C12.8754 1.56178 11.6091 1.56186 10.8281 2.34296C10.0471 3.12406 10.0475 4.39076 10.8286 5.17176C11.6096 5.95286 12.8759 5.95294 13.657 5.17194C14.4381 4.39094 14.4382 3.12461 13.6572 2.34352L13.6565 2.34278Z',
|
||||
},
|
||||
{
|
||||
d: 'M5.17177 5.17139C5.95287 4.39039 5.95295 3.12406 5.17195 2.34296C4.39095 1.56186 3.12462 1.56178 2.34352 2.34278L2.34278 2.34352C1.56179 3.12462 1.56187 4.39094 2.34297 5.17194C3.12407 5.95294 4.39077 5.95249 5.17177 5.17139Z',
|
||||
},
|
||||
{
|
||||
d: 'M4.00001 7.99973C4.00008 6.89516 3.10471 5.99968 2.00014 5.9996C0.895567 5.99953 7.87973e-05 6.89491 7.62939e-06 7.99948V8.00052C7.87973e-05 9.10509 0.895567 10.0005 2.00014 10.0004C3.10471 10.0003 4.00008 9.1043 4.00001 7.99973Z',
|
||||
},
|
||||
{
|
||||
d: 'M16 7.99948C15.9999 6.89491 15.1044 5.99953 13.9999 5.99961C12.8953 5.99968 11.9999 6.8957 12 8.00027C11.9999 9.10484 12.8953 10.0003 13.9999 10.0004C15.1044 10.0005 15.9999 9.10509 16 8.00052V7.99948Z',
|
||||
},
|
||||
{
|
||||
d: 'M5.1714 10.8282C4.3904 10.0471 3.12407 10.0471 2.34297 10.8281C1.56187 11.6091 1.56179 12.8754 2.34278 13.6565L2.34352 13.6572C3.12462 14.4382 4.39095 14.4381 5.17195 13.657C5.95295 12.8759 5.95249 11.6092 5.1714 10.8282Z',
|
||||
},
|
||||
{
|
||||
d: 'M13.6572 13.6565C14.4382 12.8754 14.4381 11.6091 13.657 10.8281C12.8759 10.0471 11.6092 10.0475 10.8282 10.8286C10.0471 11.6096 10.0471 12.8759 10.8281 13.657C11.6091 14.4381 12.8754 14.4382 13.6565 13.6572L13.6572 13.6565Z',
|
||||
},
|
||||
{
|
||||
d: 'M7.99974 12C6.89517 11.9999 5.99968 12.8953 5.99961 13.9999C5.99954 15.1044 6.89491 15.9999 7.99948 16H8.00053C9.1051 15.9999 10.0005 15.1044 10.0004 13.9999C10.0003 12.8953 9.10431 11.9999 7.99974 12Z',
|
||||
},
|
||||
{
|
||||
d: 'M8.00001 11C9.65686 11 11 9.65685 11 8C11 6.34315 9.65686 5 8.00001 5C6.34315 5 5.00001 6.34315 5.00001 8C5.00001 9.65685 6.34315 11 8.00001 11Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 8C8 8 13.1678 6.70089 14.2197 5.649C15.2716 4.59712 15.2583 2.87836 14.19 1.81004C13.1216 0.741719 11.4029 0.728395 10.351 1.78028C9.29911 2.83216 8 8 8 8Z',
|
||||
},
|
||||
{
|
||||
d: 'M8 8C8 8 13.1678 9.29911 14.2197 10.351C15.2716 11.4029 15.2583 13.1216 14.19 14.19C13.1216 15.2583 11.4029 15.2716 10.351 14.2197C9.29911 13.1678 8 8 8 8Z',
|
||||
},
|
||||
{
|
||||
d: 'M1.78028 10.351C2.83216 9.29911 8 8 8 8C8 8 6.70089 13.1678 5.649 14.2197C4.59712 15.2716 2.87836 15.2583 1.81004 14.19C0.741719 13.1216 0.728395 11.4029 1.78028 10.351Z',
|
||||
},
|
||||
{
|
||||
d: 'M8 8C8 8 2.83216 6.70089 1.78028 5.649C0.728395 4.59712 0.741719 2.87836 1.81004 1.81004C2.87836 0.741719 4.59712 0.728395 5.649 1.78028C6.70089 2.83216 8 8 8 8Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM8 13C10.7614 13 13 10.7614 13 8C13 5.23858 10.7614 3 8 3C5.23858 3 3 5.23858 3 8C3 10.7614 5.23858 13 8 13Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M13.6569 13.6568C12.0059 10.0663 12.0059 5.93368 13.6569 2.34314C10.0663 3.99414 5.93368 3.99414 2.34315 2.34314C3.99414 5.93368 3.99414 10.0663 2.34315 13.6568C5.93368 12.0059 10.0663 12.0059 13.6569 13.6568ZM8 11C9.65685 11 11 9.65686 11 8.00001C11 6.34315 9.65685 5.00001 8 5.00001C6.34315 5.00001 5 6.34315 5 8.00001C5 9.65686 6.34315 11 8 11Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M5.34749 1.59629C5.85108 0.646843 6.8496 0.000111103 7.99922 0H8.00078C9.1504 0.000111103 10.1489 0.646843 10.6525 1.59628C11.68 1.28102 12.8433 1.52977 13.6563 2.34259L13.6574 2.3437C14.4702 3.15668 14.719 4.32005 14.4037 5.34749C15.3532 5.85108 15.9999 6.8496 16 7.99922V8.00078C15.9999 9.1504 15.3532 10.1489 14.4037 10.6525C14.719 11.68 14.4702 12.8433 13.6574 13.6563L13.6563 13.6574C12.8433 14.4702 11.68 14.719 10.6525 14.4037C10.1489 15.3532 9.1504 15.9999 8.00078 16H7.99922C6.8496 15.9999 5.85108 15.3532 5.3475 14.4037C4.32005 14.719 3.15668 14.4702 2.3437 13.6574L2.34259 13.6563C1.52977 12.8433 1.28102 11.68 1.59629 10.6525C0.646843 10.1489 0.000111103 9.1504 0 8.00078V7.99922C0.000111103 6.8496 0.646843 5.85108 1.59628 5.34749C1.28102 4.32005 1.52977 3.15668 2.34259 2.3437L2.3437 2.34259C3.15668 1.52977 4.32005 1.28102 5.34749 1.59629ZM7.11693 5.86807C6.98022 6.12611 6.80322 6.3684 6.58593 6.58565C6.36868 6.80294 6.12611 6.98022 5.86807 7.11693C5.95387 7.39605 6.00003 7.69253 6 7.9998C6.00003 8.30706 5.95387 8.60395 5.86807 8.88307C6.12611 9.01978 6.3684 9.19678 6.58565 9.41407C6.80294 9.63132 6.98022 9.87389 7.11693 10.1319C7.39605 10.0461 7.69253 9.99997 7.9998 10C8.30706 9.99997 8.60394 10.0461 8.88307 10.1319C9.01978 9.87389 9.19678 9.6316 9.41407 9.41435C9.63132 9.19706 9.87389 9.01978 10.1319 8.88307C10.0461 8.60395 9.99997 8.30747 10 8.0002C9.99997 7.69294 10.0461 7.39605 10.1319 7.11693C9.87389 6.98022 9.6316 6.80322 9.41435 6.58593C9.19706 6.36868 9.01978 6.12611 8.88307 5.86807C8.60395 5.95387 8.30747 6.00003 8.0002 6C7.69294 6.00003 7.39605 5.95387 7.11693 5.86807Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M12.6045 11.8471C13.4757 10.8056 14 9.46402 14 8C14 6.53598 13.4756 5.19442 12.6045 4.15289L13.6832 2.76772C13.9157 2.46917 13.5308 2.08434 13.2323 2.31683L11.8471 3.39548C10.8056 2.52434 9.46402 2 8 2C6.53598 2 5.19443 2.52434 4.1529 3.39548L2.76773 2.31682C2.46918 2.08434 2.08435 2.46917 2.31684 2.76772L3.39549 4.15289C2.52435 5.19442 2 6.53598 2 8C2 9.46402 2.52435 10.8056 3.39548 11.8471L2.31684 13.2323C2.08435 13.5308 2.46918 13.9156 2.76773 13.6832L4.15289 12.6045C5.19442 13.4756 6.53598 14 8 14C9.46402 14 10.8056 13.4756 11.8471 12.6045L13.2323 13.6832C13.5308 13.9156 13.9156 13.5308 13.6832 13.2323L12.6045 11.8471ZM12.6045 11.8471L10.3747 8.9836L12.89 8.31882C13.2654 8.2721 13.2654 7.72787 12.8899 7.68116L10.3747 7.01637L12.6045 4.15289C12.375 3.87852 12.1215 3.62497 11.8471 3.39548L8.98361 5.62533L8.31883 3.11004C8.27212 2.73454 7.72788 2.73454 7.68117 3.11004L7.01639 5.62533L4.1529 3.39548C3.87853 3.62497 3.62498 3.87852 3.39549 4.15289L5.62535 7.01637L3.11005 7.68116C2.73455 7.72787 2.73455 8.27211 3.11005 8.31882L5.62535 8.9836L3.39548 11.8471C3.62497 12.1215 3.87852 12.375 4.15289 12.6045L7.01639 10.3746L7.68117 12.8899C7.72788 13.2654 8.27212 13.2654 8.31883 12.8899L8.98361 10.3746L11.8471 12.6045C12.1215 12.375 12.375 12.1215 12.6045 11.8471Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8.53781 0.379548C8.35784 -0.126516 7.64216 -0.126516 7.4622 0.379548L6.25252 3.78121L2.99181 2.23124C2.50672 2.00065 2.00065 2.50672 2.23124 2.99181L3.78121 6.25252L0.379548 7.4622C-0.126516 7.64216 -0.126516 8.35784 0.379548 8.53781L3.78121 9.74748L2.23124 13.0082C2.00065 13.4933 2.50672 13.9993 2.99181 13.7688L6.25252 12.2188L7.4622 15.6205C7.64216 16.1265 8.35784 16.1265 8.53781 15.6205L9.74748 12.2188L13.0082 13.7688C13.4933 13.9993 13.9993 13.4933 13.7688 13.0082L12.2188 9.74748L15.6205 8.53781C16.1265 8.35784 16.1265 7.64216 15.6205 7.4622L12.2188 6.25252L13.7688 2.99181C13.9993 2.50672 13.4933 2.00065 13.0082 2.23124L9.74748 3.78121L8.53781 0.379548ZM7.99994 10.9999C9.65679 10.9999 10.9999 9.65679 10.9999 7.99994C10.9999 6.34308 9.65679 4.99994 7.99994 4.99994C6.34308 4.99994 4.99994 6.34308 4.99994 7.99994C4.99994 9.65679 6.34308 10.9999 7.99994 10.9999Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M7.4622 0.379548C7.64216 -0.126516 8.35784 -0.126516 8.53781 0.379548L9.74748 3.78121L13.0082 2.23124C13.4933 2.00065 13.9993 2.50672 13.7688 2.99181L12.2188 6.25252L15.6205 7.4622C16.1265 7.64216 16.1265 8.35784 15.6205 8.53781L12.2188 9.74748L13.7688 13.0082C13.9993 13.4933 13.4933 13.9993 13.0082 13.7688L9.74748 12.2188L8.53781 15.6205C8.35784 16.1265 7.64216 16.1265 7.4622 15.6205L6.25252 12.2188L2.99181 13.7688C2.50672 13.9993 2.00065 13.4933 2.23124 13.0082L3.78121 9.74748L0.379548 8.53781C-0.126516 8.35784 -0.126516 7.64216 0.379548 7.4622L3.78121 6.25252L2.23124 2.99181C2.00065 2.50672 2.50672 2.00065 2.99181 2.23124L6.25252 3.78121L7.4622 0.379548Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M4.4 2C3.07452 2 2 3.07452 2 4.4V11.6C2 12.9255 3.07452 14 4.4 14H11.6C12.9255 14 14 12.9255 14 11.6V4.4C14 3.07452 12.9255 2 11.6 2H4.4ZM8.70711 4.70711C8.31658 4.31658 7.68342 4.31658 7.29289 4.70711L4.70711 7.29289C4.31658 7.68342 4.31658 8.31658 4.70711 8.70711L7.29289 11.2929C7.68342 11.6834 8.31658 11.6834 8.70711 11.2929L11.2929 8.70711C11.6834 8.31658 11.6834 7.68342 11.2929 7.29289L8.70711 4.70711Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M15 1C11.134 1 8 4.13401 8 8H15V1Z',
|
||||
},
|
||||
{
|
||||
d: 'M1 15C4.86599 15 8 11.866 8 8H1V15Z',
|
||||
},
|
||||
{
|
||||
d: 'M15 15C15 11.134 11.866 8 8 8L8 15H15Z',
|
||||
},
|
||||
{
|
||||
d: 'M1 1C1 4.86599 4.13401 8 8 8V1L1 1Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8.31883 0.281623C8.27212 -0.0938759 7.72788 -0.0938737 7.68117 0.281626L7.46446 2.02358C4.57807 2.27888 2.27889 4.57807 2.02358 7.46446L0.281623 7.68117C-0.0938759 7.72788 -0.0938737 8.27212 0.281626 8.31883L2.02358 8.53554C2.27889 11.4219 4.57807 13.7211 7.46446 13.9764L7.68117 15.7184C7.72788 16.0939 8.27212 16.0939 8.31883 15.7184L8.53554 13.9764C11.4219 13.7211 13.7211 11.4219 13.9764 8.53554L15.7184 8.31883C16.0939 8.27212 16.0939 7.72788 15.7184 7.68117L13.9764 7.46446C13.7211 4.57806 11.4219 2.27888 8.53554 2.02357L8.31883 0.281623ZM8.53554 2.02357C8.35911 2.00797 8.18049 2 8.00001 2C7.81952 2 7.64089 2.00797 7.46446 2.02358L7.01639 5.62535L4.76773 4.31684C4.46918 4.08435 4.08435 4.46918 4.31684 4.76773L5.62535 7.01639L2.02358 7.46446C2.00798 7.64089 2.00001 7.81951 2.00001 8C2.00001 8.18048 2.00798 8.35911 2.02358 8.53554L5.62535 8.98361L4.31684 11.2323C4.08435 11.5308 4.46918 11.9157 4.76773 11.6832L7.01639 10.3747L7.46446 13.9764C7.64089 13.992 7.81952 14 8.00001 14C8.18049 14 8.35911 13.992 8.53554 13.9764L8.98361 10.3747L11.2323 11.6832C11.5308 11.9157 11.9157 11.5308 11.6832 11.2323L10.3747 8.98361L13.9764 8.53554C13.992 8.35911 14 8.18048 14 8C14 7.81952 13.992 7.64089 13.9764 7.46446L10.3747 7.01639L11.6832 4.76773C11.9157 4.46918 11.5308 4.08435 11.2323 4.31684L8.98361 5.62535L8.53554 2.02357Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M2.34315 2.34315C5.46734 -0.781049 10.5327 -0.781049 13.6569 2.34315L10 6L8.70711 4.70711C8.31658 4.31658 7.68342 4.31658 7.2929 4.70711L6 6L2.34315 2.34315ZM8 8L6 6L4.70711 7.29289C4.31658 7.68342 4.31658 8.31658 4.70711 8.70711L6 10L2.34315 13.6569C5.46734 16.781 10.5327 16.781 13.6569 13.6569L10 10L11.2929 8.70711C11.6834 8.31658 11.6834 7.68342 11.2929 7.29289L10 6L8 8ZM8 8L10 10L8.70711 11.2929C8.31658 11.6834 7.68342 11.6834 7.2929 11.2929L6 10L8 8Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8.53781 0.379548C8.35784 -0.126516 7.64216 -0.126516 7.4622 0.379548L6.25252 3.78121L2.99181 2.23124C2.50672 2.00065 2.00065 2.50672 2.23124 2.99181L3.78121 6.25252L0.379548 7.4622C-0.126516 7.64216 -0.126516 8.35784 0.379548 8.53781L3.78121 9.74748L2.23124 13.0082C2.00065 13.4933 2.50672 13.9993 2.99181 13.7688L6.25252 12.2188L7.4622 15.6205C7.64216 16.1265 8.35784 16.1265 8.53781 15.6205L9.74748 12.2188L13.0082 13.7688C13.4933 13.9993 13.9993 13.4933 13.7688 13.0082L12.2188 9.74748L15.6205 8.53781C16.1265 8.35784 16.1265 7.64216 15.6205 7.4622L12.2188 6.25252L13.7688 2.99181C13.9993 2.50672 13.4933 2.00065 13.0082 2.23124L9.74748 3.78121L8.53781 0.379548ZM10.9999 7.99994L7.99994 4.99994L4.99994 7.99994L7.99994 10.9999L10.9999 7.99994Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M2.34315 2.34315C5.46734 -0.781049 10.5327 -0.781049 13.6569 2.34315L10.8284 5.17157C10.1046 4.44772 9.10457 4 8 4C6.89543 4 5.89543 4.44772 5.17157 5.17157L2.34315 2.34315ZM8 8L5.17157 5.17157C4.44772 5.89543 4 6.89543 4 8C4 9.10457 4.44772 10.1046 5.17157 10.8284L2.34315 13.6569C5.46734 16.781 10.5327 16.781 13.6569 13.6569L10.8284 10.8284C11.5523 10.1046 12 9.10457 12 8C12 6.89543 11.5523 5.89543 10.8284 5.17157L8 8ZM8 8L10.8284 10.8284C10.1046 11.5523 9.10457 12 8 12C6.89543 12 5.89543 11.5523 5.17157 10.8284L8 8Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8.31882 0.281623C8.27211 -0.0938759 7.72788 -0.0938737 7.68116 0.281626L7.34298 2.99999H3V7.34299L0.281616 7.68117C-0.0938835 7.72788 -0.0938814 8.27212 0.281618 8.31883L3 8.65701V13H7.34298L7.68116 15.7184C7.72788 16.0939 8.27211 16.0939 8.31882 15.7184L8.657 13H13V8.65701L15.7184 8.31883C16.0939 8.27212 16.0939 7.72788 15.7184 7.68117L13 7.34299V2.99999H8.657L8.31882 0.281623ZM8.657 2.99999H7.34298L7.01638 5.62535L4.76772 4.31684C4.46917 4.08435 4.08434 4.46918 4.31683 4.76773L5.62534 7.01639L3 7.34299V8.65701L5.62534 8.98361L4.31683 11.2323C4.08434 11.5308 4.46917 11.9157 4.76772 11.6832L7.01638 10.3747L7.34298 13H8.657L8.98361 10.3747L11.2323 11.6832C11.5308 11.9157 11.9156 11.5308 11.6832 11.2323L10.3746 8.98361L13 8.65701V7.34299L10.3746 7.01639L11.6832 4.76773C11.9156 4.46918 11.5308 4.08435 11.2323 4.31684L8.98361 5.62535L8.657 2.99999Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M4.4 2C3.07452 2 2 3.07452 2 4.4V11.6C2 12.9255 3.07452 14 4.4 14H11.6C12.9255 14 14 12.9255 14 11.6V4.4C14 3.07452 12.9255 2 11.6 2H4.4ZM8 11C9.65685 11 11 9.65685 11 8C11 6.34315 9.65685 5 8 5C6.34315 5 5 6.34315 5 8C5 9.65685 6.34315 11 8 11Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 13C10.7614 13 13 10.7614 13 8C13 5.23858 10.7614 3 8 3C5.23858 3 3 5.23858 3 8C3 10.7614 5.23858 13 8 13ZM8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
{
|
||||
d: 'M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M2 3C5.31371 3 8 5.68629 8 9C8 5.68629 10.6863 3 14 3L14 9C14 12.3137 11.3137 15 8 15C4.68629 15 2 12.3137 2 9V3Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M7.46226 0.379609C7.64222 -0.126455 8.3579 -0.126455 8.53787 0.379609L9.74754 3.78127L13.0082 2.2313C13.4933 2.00071 13.9994 2.50678 13.7688 2.99187L12.2189 6.25258L15.6205 7.46226C16.1266 7.64222 16.1266 8.3579 15.6205 8.53787L12.2189 9.74754L13.7688 13.0082C13.9994 13.4933 13.4933 13.9994 13.0082 13.7688L9.74754 12.2189L8.53787 15.6205C8.3579 16.1266 7.64222 16.1266 7.46226 15.6205L6.25258 12.2189L2.99187 13.7688C2.50678 13.9994 2.00071 13.4933 2.2313 13.0082L3.78127 9.74754L0.379609 8.53787C-0.126455 8.3579 -0.126455 7.64222 0.379609 7.46226L3.78127 6.25258L2.2313 2.99187C2.00071 2.50678 2.50678 2.00071 2.99187 2.2313L6.25258 3.78127L7.46226 0.379609Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z',
|
||||
},
|
||||
{
|
||||
d: 'M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM8.67438 3.27934L12.7207 7.32562C13.0931 7.69807 13.0931 8.30193 12.7207 8.67438L8.67438 12.7207C8.30193 13.0931 7.69807 13.0931 7.32562 12.7207L3.27934 8.67438C2.90689 8.30193 2.90689 7.69807 3.27934 7.32562L7.32562 3.27934C7.69807 2.90689 8.30193 2.90689 8.67438 3.27934Z',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M13.2323 2.31683C13.5308 2.08434 13.9156 2.46917 13.6832 2.76772L10.3747 7.01637L12.8899 7.68116C13.2654 7.72787 13.2654 8.2721 12.89 8.31882L10.3747 8.9836L13.6832 13.2323C13.9156 13.5308 13.5308 13.9156 13.2323 13.6832L8.98361 10.3746L8.31883 12.8899C8.27212 13.2654 7.72788 13.2654 7.68117 12.8899L7.01639 10.3746L2.76773 13.6832C2.46918 13.9156 2.08435 13.5308 2.31684 13.2323L5.62535 8.9836L3.11005 8.31882C2.73455 8.27211 2.73455 7.72787 3.11005 7.68116L5.62535 7.01637L2.31684 2.76772C2.08435 2.46917 2.46918 2.08434 2.76773 2.31682L7.01639 5.62533L7.68117 3.11004C7.72788 2.73454 8.27212 2.73454 8.31883 3.11004L8.98361 5.62533L13.2323 2.31683Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M7.68116 0.281626C7.72788 -0.0938737 8.27211 -0.0938759 8.31882 0.281623L8.98361 5.62535L11.2323 4.31684C11.5308 4.08435 11.9156 4.46918 11.6832 4.76773L10.3746 7.01639L15.7184 7.68117C16.0939 7.72788 16.0939 8.27212 15.7184 8.31883L10.3746 8.98361L11.6832 11.2323C11.9156 11.5308 11.5308 11.9157 11.2323 11.6832L8.98361 10.3747L8.31882 15.7184C8.27211 16.0939 7.72788 16.0939 7.68116 15.7184L7.01638 10.3747L4.76772 11.6832C4.46917 11.9157 4.08434 11.5308 4.31683 11.2323L5.62534 8.98361L0.281618 8.31883C-0.0938814 8.27212 -0.0938835 7.72788 0.281616 7.68117L5.62534 7.01639L4.31683 4.76773C4.08434 4.46918 4.46917 4.08435 4.76772 4.31684L7.01638 5.62535L7.68116 0.281626Z',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
d: 'M14 13C10.6863 13 8 10.3137 8 7C8 10.3137 5.31371 13 2 13L2 7C2 3.68629 4.68629 0.999999 8 1C11.3137 0.999999 14 3.68629 14 7L14 13Z',
|
||||
},
|
||||
],
|
||||
]
|
||||
162
src/components/Unicon/index.tsx
Normal file
@@ -0,0 +1,162 @@
|
||||
import React, { memo, useMemo } from 'react'
|
||||
import { useIsDarkMode } from 'state/user/hooks'
|
||||
|
||||
import { blurs, UniconAttributeData, UniconAttributes, UniconAttributesToIndices } from './types'
|
||||
import { deriveUniconAttributeIndices, getUniconAttributeData, isEthAddress } from './utils'
|
||||
|
||||
const ORIGINAL_CONTAINER_SIZE = 36
|
||||
const EMBLEM_XY_SHIFT = 10
|
||||
|
||||
function PathMask({
|
||||
id,
|
||||
paths,
|
||||
scale,
|
||||
shift = 0,
|
||||
}: {
|
||||
id: string
|
||||
paths: React.SVGProps<SVGPathElement>[]
|
||||
scale: number
|
||||
shift?: number
|
||||
}) {
|
||||
return (
|
||||
<mask id={id}>
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<g transform={`scale(${scale}) \n translate(${shift}, ${shift})`}>
|
||||
{paths.map((pathProps) => (
|
||||
<path key={pathProps.d as string} {...pathProps} fill="black" />
|
||||
))}
|
||||
</g>
|
||||
</mask>
|
||||
)
|
||||
}
|
||||
|
||||
type UniconMaskProps = { maskId: string; attributeData: UniconAttributeData; size: number }
|
||||
function UniconMask({ maskId, attributeData, size }: UniconMaskProps) {
|
||||
const shapeMaskId = `shape-${maskId}`
|
||||
const containerMaskId = `container-${maskId}`
|
||||
|
||||
return (
|
||||
<defs>
|
||||
<PathMask
|
||||
id={containerMaskId}
|
||||
paths={attributeData[UniconAttributes.Container]}
|
||||
scale={size / ORIGINAL_CONTAINER_SIZE}
|
||||
/>
|
||||
<PathMask
|
||||
id={shapeMaskId}
|
||||
paths={attributeData[UniconAttributes.Shape]}
|
||||
scale={size / ORIGINAL_CONTAINER_SIZE}
|
||||
shift={EMBLEM_XY_SHIFT}
|
||||
/>
|
||||
<mask id={maskId}>
|
||||
<g fill="white">
|
||||
<g mask={`url(#${shapeMaskId})`}>
|
||||
<g transform={`scale(${size / ORIGINAL_CONTAINER_SIZE})`}>
|
||||
{attributeData[UniconAttributes.Container].map((pathProps) => (
|
||||
<path key={pathProps.d as string} {...pathProps} />
|
||||
))}
|
||||
</g>
|
||||
</g>
|
||||
<g mask={`url(#${containerMaskId})`}>
|
||||
<g
|
||||
transform={`scale(${size / ORIGINAL_CONTAINER_SIZE})
|
||||
translate(10, 10)`}
|
||||
>
|
||||
{attributeData[UniconAttributes.Shape].map((pathProps) => (
|
||||
<path key={pathProps.d as string} {...pathProps} />
|
||||
))}
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</mask>
|
||||
</defs>
|
||||
)
|
||||
}
|
||||
|
||||
type UniconGradientProps = { gradientId: string; attributeData: UniconAttributeData }
|
||||
function UniconGradient({ gradientId, attributeData }: UniconGradientProps) {
|
||||
return (
|
||||
<linearGradient id={gradientId}>
|
||||
<stop offset="0%" stopColor={attributeData[UniconAttributes.GradientStart]} />
|
||||
<stop offset="100%" stopColor={attributeData[UniconAttributes.GradientEnd]} />
|
||||
</linearGradient>
|
||||
)
|
||||
}
|
||||
|
||||
function UniconBlur({ blurId, size }: { blurId: string; size: number }) {
|
||||
return (
|
||||
<filter id={blurId} x="-50%" y="-50%" height="200%" width="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation={size / 3} />
|
||||
</filter>
|
||||
)
|
||||
}
|
||||
|
||||
function UniconSvg({
|
||||
attributeIndices,
|
||||
size,
|
||||
address,
|
||||
}: {
|
||||
attributeIndices: UniconAttributesToIndices
|
||||
size: number
|
||||
address: string
|
||||
mobile?: boolean
|
||||
}) {
|
||||
const isDarkMode = useIsDarkMode()
|
||||
const attributeData = useMemo(() => getUniconAttributeData(attributeIndices), [attributeIndices])
|
||||
|
||||
const gradientId = `gradient${address + size}`
|
||||
const maskId = `mask${address + size}`
|
||||
const blurId = `blur${address + size}`
|
||||
const svgProps = {
|
||||
viewBox: `0 0 ${size} ${size}`,
|
||||
}
|
||||
|
||||
if (!attributeIndices || !attributeData) return null
|
||||
|
||||
return (
|
||||
<svg {...svgProps}>
|
||||
<defs>
|
||||
<UniconMask maskId={maskId} attributeData={attributeData} size={size} />
|
||||
<UniconGradient gradientId={gradientId} attributeData={attributeData} />
|
||||
<UniconBlur blurId={blurId} size={size} />
|
||||
</defs>
|
||||
|
||||
<g mask={`url(#${maskId})`}>
|
||||
<rect x="0" y="0" width="100%" height="100%" fill={`url(#${gradientId})`} />
|
||||
{!isDarkMode && <rect x="0" y="0" width="100%" height="100%" fill="black" opacity={0.08} />}
|
||||
<ellipse
|
||||
cx={size / 2}
|
||||
cy={0}
|
||||
rx={size / 2}
|
||||
ry={size / 2}
|
||||
fill={blurs[attributeIndices[UniconAttributes.GradientStart]]}
|
||||
filter={`url(#${blurId})`}
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
||||
interface Props {
|
||||
address: string
|
||||
size?: number
|
||||
randomSeed?: number
|
||||
border?: boolean
|
||||
mobile?: boolean
|
||||
}
|
||||
|
||||
function _Unicon({ address, size = 24, randomSeed = 0, mobile }: Props) {
|
||||
const attributeIndices = useMemo(() => deriveUniconAttributeIndices(address, randomSeed), [address, randomSeed])
|
||||
|
||||
if (!address || !isEthAddress(address) || !attributeIndices) return null
|
||||
|
||||
return (
|
||||
<div style={{ height: size, width: size, position: 'relative' }}>
|
||||
<div style={{ height: size, width: size, overflow: 'visible', position: 'absolute' }}>
|
||||
<UniconSvg attributeIndices={attributeIndices} size={size} address={address} mobile={mobile} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export const Unicon = memo(_Unicon)
|
||||
76
src/components/Unicon/types.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
import { svgPaths as containerPaths } from './Container'
|
||||
import { svgPaths as emblemPaths } from './Emblem'
|
||||
|
||||
export enum UniconAttributes {
|
||||
GradientStart = 0,
|
||||
GradientEnd = 1,
|
||||
Container = 2,
|
||||
Shape = 3,
|
||||
}
|
||||
|
||||
export const UniconAttributesArray: UniconAttributes[] = [
|
||||
UniconAttributes.GradientStart,
|
||||
UniconAttributes.GradientEnd,
|
||||
UniconAttributes.Container,
|
||||
UniconAttributes.Shape,
|
||||
]
|
||||
|
||||
export interface UniconAttributesToIndices {
|
||||
[UniconAttributes.GradientStart]: number
|
||||
[UniconAttributes.GradientEnd]: number
|
||||
[UniconAttributes.Container]: number
|
||||
[UniconAttributes.Shape]: number
|
||||
}
|
||||
|
||||
export interface UniconAttributeData {
|
||||
[UniconAttributes.GradientStart]: string
|
||||
[UniconAttributes.GradientEnd]: string
|
||||
[UniconAttributes.Container]: React.SVGProps<SVGPathElement>[]
|
||||
[UniconAttributes.Shape]: React.SVGProps<SVGPathElement>[]
|
||||
}
|
||||
|
||||
export const gradientStarts = [
|
||||
'#6100FF',
|
||||
'#5065FD',
|
||||
'#36DBFF',
|
||||
'#5CFE9D',
|
||||
'#B1F13C',
|
||||
'#F9F40B',
|
||||
'#FF6F1E',
|
||||
'#F14544',
|
||||
'#FC72FF',
|
||||
'#C0C0C0',
|
||||
]
|
||||
|
||||
export const blurs = [
|
||||
'#D3EBA3',
|
||||
'#F06DF3',
|
||||
'#9D99F5',
|
||||
'#EDE590',
|
||||
'#B0EDFE',
|
||||
'#FBAA7F',
|
||||
'#C8BB9B',
|
||||
'#9D99F5',
|
||||
'#A26AF3',
|
||||
'#D3EBA3',
|
||||
]
|
||||
|
||||
export const gradientEnds = [
|
||||
'#D0B2F3',
|
||||
'#BDB8FA',
|
||||
'#63CDE8',
|
||||
'#76D191',
|
||||
'#9BCD46',
|
||||
'#EDE590',
|
||||
'#FBAA7F',
|
||||
'#FEA79B',
|
||||
'#F5A1F5',
|
||||
'#B8C3B7',
|
||||
]
|
||||
|
||||
export const UniconNumOptions = {
|
||||
[UniconAttributes.GradientStart]: gradientStarts.length,
|
||||
[UniconAttributes.GradientEnd]: gradientEnds.length,
|
||||
[UniconAttributes.Container]: containerPaths.length,
|
||||
[UniconAttributes.Shape]: emblemPaths.length,
|
||||
}
|
||||
50
src/components/Unicon/utils.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { isAddress } from 'ethers/lib/utils'
|
||||
|
||||
import { svgPaths as containerPaths } from './Container'
|
||||
import { svgPaths as emblemPaths } from './Emblem'
|
||||
import {
|
||||
gradientEnds,
|
||||
gradientStarts,
|
||||
UniconAttributeData,
|
||||
UniconAttributes,
|
||||
UniconAttributesArray,
|
||||
UniconAttributesToIndices,
|
||||
UniconNumOptions,
|
||||
} from './types'
|
||||
|
||||
const NUM_CHARS_TO_USE_PER_ATTRIBUTE = 2
|
||||
|
||||
export const isEthAddress = (address: string) => {
|
||||
return address.startsWith('0x') && isAddress(address.toLowerCase())
|
||||
}
|
||||
|
||||
export const deriveUniconAttributeIndices = (
|
||||
address: string,
|
||||
randomSeed = 0
|
||||
): UniconAttributesToIndices | undefined => {
|
||||
if (!isEthAddress(address)) return
|
||||
|
||||
const hexAddr = address.slice(-40)
|
||||
const newIndices = {
|
||||
[UniconAttributes.GradientStart]: 0,
|
||||
[UniconAttributes.GradientEnd]: 0,
|
||||
[UniconAttributes.Container]: 0,
|
||||
[UniconAttributes.Shape]: 0,
|
||||
} as UniconAttributesToIndices
|
||||
for (const a of UniconAttributesArray) {
|
||||
const optionHex = hexAddr.slice(NUM_CHARS_TO_USE_PER_ATTRIBUTE * a, NUM_CHARS_TO_USE_PER_ATTRIBUTE * (a + 1))
|
||||
const optionDec = parseInt(optionHex, 16) + randomSeed
|
||||
const optionIndex = optionDec % UniconNumOptions[a]
|
||||
newIndices[a] = optionIndex
|
||||
}
|
||||
return newIndices
|
||||
}
|
||||
|
||||
export const getUniconAttributeData = (attributeIndices: UniconAttributesToIndices): UniconAttributeData => {
|
||||
return {
|
||||
[UniconAttributes.GradientStart]: gradientStarts[attributeIndices[UniconAttributes.GradientStart]],
|
||||
[UniconAttributes.GradientEnd]: gradientEnds[attributeIndices[UniconAttributes.GradientEnd]],
|
||||
[UniconAttributes.Container]: containerPaths[attributeIndices[UniconAttributes.Container]],
|
||||
[UniconAttributes.Shape]: emblemPaths[attributeIndices[UniconAttributes.Shape]],
|
||||
} as UniconAttributeData
|
||||
}
|
||||
@@ -9,8 +9,6 @@ import Tooltip from 'components/Tooltip'
|
||||
import { getConnection } from 'connection/utils'
|
||||
import { getChainInfoOrDefault } from 'constants/chainInfo'
|
||||
import { SupportedChainId } from 'constants/chains'
|
||||
import { BaseVariant } from 'featureFlags'
|
||||
import { useFiatOnrampFlag } from 'featureFlags/flags/fiatOnramp'
|
||||
import useCopyClipboard from 'hooks/useCopyClipboard'
|
||||
import useStablecoinPrice from 'hooks/useStablecoinPrice'
|
||||
import useNativeCurrency from 'lib/hooks/useNativeCurrency'
|
||||
@@ -225,7 +223,6 @@ const AuthenticatedHeader = () => {
|
||||
closeModal()
|
||||
}, [clearCollectionFilters, closeModal, navigate, resetSellAssets, setSellPageState])
|
||||
|
||||
const fiatOnrampFlag = useFiatOnrampFlag()
|
||||
// animate the border of the buy crypto button when a user navigates here from the feature announcement
|
||||
// can be removed when components/FiatOnrampAnnouncment.tsx is no longer used
|
||||
const [acknowledgements, acknowledge] = useFiatOnrampAck()
|
||||
@@ -316,47 +313,43 @@ const AuthenticatedHeader = () => {
|
||||
>
|
||||
<Trans>View and sell NFTs</Trans>
|
||||
</ProfileButton>
|
||||
{fiatOnrampFlag === BaseVariant.Enabled && (
|
||||
<>
|
||||
<BuyCryptoButton
|
||||
$animateBorder={animateBuyCryptoButtonBorder}
|
||||
size={ButtonSize.medium}
|
||||
emphasis={ButtonEmphasis.medium}
|
||||
onClick={handleBuyCryptoClick}
|
||||
disabled={disableBuyCryptoButton}
|
||||
>
|
||||
{error ? (
|
||||
<ThemedText.BodyPrimary>{error}</ThemedText.BodyPrimary>
|
||||
<BuyCryptoButton
|
||||
$animateBorder={animateBuyCryptoButtonBorder}
|
||||
size={ButtonSize.medium}
|
||||
emphasis={ButtonEmphasis.medium}
|
||||
onClick={handleBuyCryptoClick}
|
||||
disabled={disableBuyCryptoButton}
|
||||
>
|
||||
{error ? (
|
||||
<ThemedText.BodyPrimary>{error}</ThemedText.BodyPrimary>
|
||||
) : (
|
||||
<>
|
||||
{fiatOnrampAvailabilityLoading ? (
|
||||
<StyledLoadingButtonSpinner />
|
||||
) : (
|
||||
<>
|
||||
{fiatOnrampAvailabilityLoading ? (
|
||||
<StyledLoadingButtonSpinner />
|
||||
) : (
|
||||
<CreditCard height="20px" width="20px" />
|
||||
)}{' '}
|
||||
<Trans>Buy crypto</Trans>
|
||||
</>
|
||||
)}
|
||||
</BuyCryptoButton>
|
||||
{Boolean(!fiatOnrampAvailable && fiatOnrampAvailabilityChecked) && (
|
||||
<FiatOnrampNotAvailableText marginTop="8px">
|
||||
<Trans>Not available in your region</Trans>
|
||||
<Tooltip
|
||||
show={showFiatOnrampUnavailableTooltip}
|
||||
text={<Trans>Moonpay is not available in some regions. Click to learn more.</Trans>}
|
||||
>
|
||||
<FiatOnrampAvailabilityExternalLink
|
||||
onMouseEnter={openFiatOnrampUnavailableTooltip}
|
||||
onMouseLeave={closeFiatOnrampUnavailableTooltip}
|
||||
style={{ color: 'inherit' }}
|
||||
href="https://support.uniswap.org/hc/en-us/articles/11306664890381-Why-isn-t-MoonPay-available-in-my-region-"
|
||||
>
|
||||
<StyledInfoIcon />
|
||||
</FiatOnrampAvailabilityExternalLink>
|
||||
</Tooltip>
|
||||
</FiatOnrampNotAvailableText>
|
||||
)}
|
||||
</>
|
||||
<CreditCard height="20px" width="20px" />
|
||||
)}{' '}
|
||||
<Trans>Buy crypto</Trans>
|
||||
</>
|
||||
)}
|
||||
</BuyCryptoButton>
|
||||
{Boolean(!fiatOnrampAvailable && fiatOnrampAvailabilityChecked) && (
|
||||
<FiatOnrampNotAvailableText marginTop="8px">
|
||||
<Trans>Not available in your region</Trans>
|
||||
<Tooltip
|
||||
show={showFiatOnrampUnavailableTooltip}
|
||||
text={<Trans>Moonpay is not available in some regions. Click to learn more.</Trans>}
|
||||
>
|
||||
<FiatOnrampAvailabilityExternalLink
|
||||
onMouseEnter={openFiatOnrampUnavailableTooltip}
|
||||
onMouseLeave={closeFiatOnrampUnavailableTooltip}
|
||||
style={{ color: 'inherit' }}
|
||||
href="https://support.uniswap.org/hc/en-us/articles/11306664890381-Why-isn-t-MoonPay-available-in-my-region-"
|
||||
>
|
||||
<StyledInfoIcon />
|
||||
</FiatOnrampAvailabilityExternalLink>
|
||||
</Tooltip>
|
||||
</FiatOnrampNotAvailableText>
|
||||
)}
|
||||
{isUnclaimed && (
|
||||
<UNIButton onClick={openClaimModal} size={ButtonSize.medium} emphasis={ButtonEmphasis.medium}>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Trans } from '@lingui/macro'
|
||||
import { sendAnalyticsEvent, user } from '@uniswap/analytics'
|
||||
import { CustomUserProperties, InterfaceEventName, WalletConnectionResult } from '@uniswap/analytics-events'
|
||||
import { getWalletMeta } from '@uniswap/conedison/provider/meta'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import { Connector } from '@web3-react/types'
|
||||
import { WalletConnect } from '@web3-react/walletconnect'
|
||||
import { sendEvent } from 'components/analytics'
|
||||
import { AutoColumn } from 'components/Column'
|
||||
import { AutoRow } from 'components/Row'
|
||||
@@ -14,6 +16,7 @@ import {
|
||||
getIsInjected,
|
||||
getIsMetaMaskWallet,
|
||||
} from 'connection/utils'
|
||||
import { isSupportedChain } from 'constants/chains'
|
||||
import usePrevious from 'hooks/usePrevious'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { ArrowLeft } from 'react-feather'
|
||||
@@ -129,16 +132,19 @@ const sendAnalyticsEventAndUserInfo = (
|
||||
account: string,
|
||||
walletType: string,
|
||||
chainId: number | undefined,
|
||||
isReconnect: boolean
|
||||
isReconnect: boolean,
|
||||
peerWalletAgent: string | undefined
|
||||
) => {
|
||||
sendAnalyticsEvent(InterfaceEventName.WALLET_CONNECT_TXN_COMPLETED, {
|
||||
result: WalletConnectionResult.SUCCEEDED,
|
||||
wallet_address: account,
|
||||
wallet_type: walletType,
|
||||
is_reconnect: isReconnect,
|
||||
peer_wallet_agent: peerWalletAgent,
|
||||
})
|
||||
user.set(CustomUserProperties.WALLET_ADDRESS, account)
|
||||
user.set(CustomUserProperties.WALLET_TYPE, walletType)
|
||||
user.set(CustomUserProperties.PEER_WALLET_AGENT, peerWalletAgent ?? '')
|
||||
if (chainId) {
|
||||
user.postInsert(CustomUserProperties.ALL_WALLET_CHAIN_IDS, chainId)
|
||||
}
|
||||
@@ -155,7 +161,7 @@ export default function WalletModal({
|
||||
ENSName?: string
|
||||
}) {
|
||||
const dispatch = useAppDispatch()
|
||||
const { connector, account, chainId } = useWeb3React()
|
||||
const { connector, account, chainId, provider } = useWeb3React()
|
||||
const previousAccount = usePrevious(account)
|
||||
|
||||
const location = useLocation()
|
||||
@@ -202,7 +208,7 @@ export default function WalletModal({
|
||||
|
||||
// Keep the network connector in sync with any active user connector to prevent chain-switching on wallet disconnection.
|
||||
useEffect(() => {
|
||||
if (chainId && connector !== networkConnection.connector) {
|
||||
if (chainId && isSupportedChain(chainId) && connector !== networkConnection.connector) {
|
||||
networkConnection.connector.activate(chainId)
|
||||
}
|
||||
}, [chainId, connector])
|
||||
@@ -211,13 +217,14 @@ export default function WalletModal({
|
||||
useEffect(() => {
|
||||
if (account && account !== lastActiveWalletAddress) {
|
||||
const walletType = getConnectionName(getConnection(connector).type)
|
||||
const peerWalletAgent = provider ? getWalletMeta(provider)?.agent : undefined
|
||||
const isReconnect =
|
||||
connectedWallets.filter((wallet) => wallet.account === account && wallet.walletType === walletType).length > 0
|
||||
sendAnalyticsEventAndUserInfo(account, walletType, chainId, isReconnect)
|
||||
sendAnalyticsEventAndUserInfo(account, walletType, chainId, isReconnect, peerWalletAgent)
|
||||
if (!isReconnect) addWalletToConnectedWallets({ account, walletType })
|
||||
}
|
||||
setLastActiveWalletAddress(account)
|
||||
}, [connectedWallets, addWalletToConnectedWallets, lastActiveWalletAddress, account, connector, chainId])
|
||||
}, [connectedWallets, addWalletToConnectedWallets, lastActiveWalletAddress, account, connector, chainId, provider])
|
||||
|
||||
const tryActivation = useCallback(
|
||||
async (connector: Connector) => {
|
||||
@@ -367,8 +374,20 @@ export default function WalletModal({
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not show <WalletModal /> when WalletConnect connection modal is open to prevent focus issues when
|
||||
* trying to interact with a WalletConnect modal.
|
||||
*/
|
||||
const isWalletConnectModalOpen =
|
||||
walletView === WALLET_VIEWS.PENDING && pendingConnector instanceof WalletConnect && !pendingError
|
||||
|
||||
return (
|
||||
<Modal isOpen={walletModalOpen} onDismiss={toggleWalletModal} minHeight={false} maxHeight={90}>
|
||||
<Modal
|
||||
isOpen={walletModalOpen && !isWalletConnectModalOpen}
|
||||
onDismiss={toggleWalletModal}
|
||||
minHeight={false}
|
||||
maxHeight={90}
|
||||
>
|
||||
<Wrapper data-testid="wallet-modal">{getModalContent()}</Wrapper>
|
||||
</Modal>
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Trans } from '@lingui/macro'
|
||||
import { t, Trans } from '@lingui/macro'
|
||||
import { sendAnalyticsEvent, TraceEvent } from '@uniswap/analytics'
|
||||
import { BrowserEvent, InterfaceElementName, InterfaceEventName } from '@uniswap/analytics-events'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
@@ -242,6 +242,7 @@ function Web3StatusInner() {
|
||||
const chevronProps = {
|
||||
...CHEVRON_PROPS,
|
||||
color: theme.textSecondary,
|
||||
'aria-label': walletIsOpen ? t`Close wallet connection options` : t`Open wallet connection options`,
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -251,7 +252,7 @@ function Web3StatusInner() {
|
||||
pending={hasPendingTransactions}
|
||||
isClaimAvailable={isClaimAvailable}
|
||||
>
|
||||
{!hasPendingTransactions && <StatusIcon size={24} connectionType={connectionType} />}
|
||||
{!hasPendingTransactions && <StatusIcon enableInfotips={true} size={24} connectionType={connectionType} />}
|
||||
{hasPendingTransactions ? (
|
||||
<RowBetween>
|
||||
<Text>
|
||||
@@ -272,6 +273,7 @@ function Web3StatusInner() {
|
||||
...CHEVRON_PROPS,
|
||||
color: theme.accentAction,
|
||||
'data-testid': 'navbar-wallet-dropdown',
|
||||
'aria-label': walletIsOpen ? t`Close wallet connection options` : t`Open wallet connection options`,
|
||||
}
|
||||
return (
|
||||
<TraceEvent
|
||||
|
||||
@@ -9,14 +9,13 @@ import { Trade } from '@uniswap/router-sdk'
|
||||
import { Currency, TradeType } from '@uniswap/sdk-core'
|
||||
import {
|
||||
AddEthereumChainParameter,
|
||||
DialogAnimationType,
|
||||
EMPTY_TOKEN_LIST,
|
||||
Field,
|
||||
OnReviewSwapClick,
|
||||
SwapWidget,
|
||||
SwapWidgetSkeleton,
|
||||
} from '@uniswap/widgets'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import { usePermit2Enabled } from 'featureFlags/flags/permit2'
|
||||
import { useActiveLocale } from 'hooks/useActiveLocale'
|
||||
import {
|
||||
formatPercentInBasisPointsNumber,
|
||||
@@ -32,7 +31,7 @@ import { useIsDarkMode } from 'state/user/hooks'
|
||||
import { computeRealizedPriceImpact } from 'utils/prices'
|
||||
import { switchChain } from 'utils/switchChain'
|
||||
|
||||
import { useSyncWidgetInputs } from './inputs'
|
||||
import { DefaultTokens, useSyncWidgetInputs } from './inputs'
|
||||
import { useSyncWidgetSettings } from './settings'
|
||||
import { DARK_THEME, LIGHT_THEME } from './theme'
|
||||
import { useSyncWidgetTransactions } from './transactions'
|
||||
@@ -46,24 +45,25 @@ function useWidgetTheme() {
|
||||
}
|
||||
|
||||
interface WidgetProps {
|
||||
token?: Currency
|
||||
defaultTokens: DefaultTokens
|
||||
width?: number | string
|
||||
defaultField: Field
|
||||
onTokenChange?: (token: Currency) => void
|
||||
onDefaultTokenChange?: (token: Currency) => void
|
||||
onReviewSwapClick?: OnReviewSwapClick
|
||||
}
|
||||
|
||||
export default function Widget({
|
||||
token,
|
||||
defaultTokens,
|
||||
width = DEFAULT_WIDGET_WIDTH,
|
||||
defaultField,
|
||||
onTokenChange,
|
||||
onDefaultTokenChange,
|
||||
onReviewSwapClick,
|
||||
}: WidgetProps) {
|
||||
const { connector, provider } = useWeb3React()
|
||||
const { connector, provider, chainId } = useWeb3React()
|
||||
const locale = useActiveLocale()
|
||||
const theme = useWidgetTheme()
|
||||
const { inputs, tokenSelector } = useSyncWidgetInputs({ token, onTokenChange, defaultField })
|
||||
const { inputs, tokenSelector } = useSyncWidgetInputs({
|
||||
defaultTokens,
|
||||
onDefaultTokenChange,
|
||||
})
|
||||
const { settings } = useSyncWidgetSettings()
|
||||
const { transactions } = useSyncWidgetTransactions()
|
||||
|
||||
@@ -153,43 +153,50 @@ export default function Widget({
|
||||
[initialQuoteDate, trace]
|
||||
)
|
||||
|
||||
const permit2Enabled = usePermit2Enabled()
|
||||
|
||||
if (!(inputs.value.INPUT || inputs.value.OUTPUT)) {
|
||||
return <WidgetSkeleton />
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<SwapWidget
|
||||
hideConnectionUI
|
||||
brandedFooter={false}
|
||||
permit2={permit2Enabled}
|
||||
routerUrl={WIDGET_ROUTER_URL}
|
||||
locale={locale}
|
||||
theme={theme}
|
||||
width={width}
|
||||
// defaultChainId is excluded - it is always inferred from the passed provider
|
||||
onConnectWalletClick={onConnectWalletClick}
|
||||
provider={provider}
|
||||
onSwitchChain={onSwitchChain}
|
||||
tokenList={EMPTY_TOKEN_LIST} // prevents loading the default token list, as we use our own token selector UI
|
||||
{...inputs}
|
||||
{...settings}
|
||||
{...transactions}
|
||||
onExpandSwapDetails={onExpandSwapDetails}
|
||||
onReviewSwapClick={onReviewSwapClick}
|
||||
onSubmitSwapClick={onSubmitSwapClick}
|
||||
onSwapApprove={onApproveToken}
|
||||
onInitialSwapQuote={onInitialSwapQuote}
|
||||
onSwapPriceUpdateAck={onSwapPriceUpdateAck}
|
||||
/>
|
||||
<div style={{ zIndex: 1, position: 'relative' }}>
|
||||
<SwapWidget
|
||||
hideConnectionUI
|
||||
brandedFooter={false}
|
||||
permit2
|
||||
routerUrl={WIDGET_ROUTER_URL}
|
||||
locale={locale}
|
||||
theme={theme}
|
||||
width={width}
|
||||
defaultChainId={chainId}
|
||||
onConnectWalletClick={onConnectWalletClick}
|
||||
provider={provider}
|
||||
onSwitchChain={onSwitchChain}
|
||||
tokenList={EMPTY_TOKEN_LIST} // prevents loading the default token list, as we use our own token selector UI
|
||||
{...inputs}
|
||||
{...settings}
|
||||
{...transactions}
|
||||
onExpandSwapDetails={onExpandSwapDetails}
|
||||
onReviewSwapClick={onReviewSwapClick}
|
||||
onSubmitSwapClick={onSubmitSwapClick}
|
||||
onSwapApprove={onApproveToken}
|
||||
onInitialSwapQuote={onInitialSwapQuote}
|
||||
onSwapPriceUpdateAck={onSwapPriceUpdateAck}
|
||||
dialogOptions={{
|
||||
pageCentered: true,
|
||||
animationType: DialogAnimationType.FADE,
|
||||
}}
|
||||
onError={(error, errorInfo) => {
|
||||
sendAnalyticsEvent(SwapEventName.SWAP_ERROR, { error, errorInfo, ...trace })
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{tokenSelector}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export function WidgetSkeleton() {
|
||||
export function WidgetSkeleton({ width = DEFAULT_WIDGET_WIDTH }: { width?: number | string }) {
|
||||
const theme = useWidgetTheme()
|
||||
return <SwapWidgetSkeleton theme={theme} width={DEFAULT_WIDGET_WIDTH} />
|
||||
return <SwapWidgetSkeleton theme={theme} width={width} />
|
||||
}
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
import { sendAnalyticsEvent, useTrace } from '@uniswap/analytics'
|
||||
import { InterfaceSectionName, SwapEventName } from '@uniswap/analytics-events'
|
||||
import { Currency, Field, SwapController, SwapEventHandlers, TradeType } from '@uniswap/widgets'
|
||||
import { useWeb3React } from '@web3-react/core'
|
||||
import CurrencySearchModal from 'components/SearchModal/CurrencySearchModal'
|
||||
import { isSupportedChain } from 'constants/chains'
|
||||
import usePrevious from 'hooks/usePrevious'
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
|
||||
const EMPTY_AMOUNT = ''
|
||||
|
||||
type SwapValue = Required<SwapController>['value']
|
||||
type SwapTokens = Pick<SwapValue, Field.INPUT | Field.OUTPUT> & { default?: Currency }
|
||||
export type DefaultTokens = Partial<SwapTokens>
|
||||
|
||||
function includesDefaultToken(tokens: SwapTokens) {
|
||||
if (!tokens.default) return true
|
||||
return tokens[Field.INPUT]?.equals(tokens.default) || tokens[Field.OUTPUT]?.equals(tokens.default)
|
||||
function missingDefaultToken(tokens: SwapTokens) {
|
||||
if (!tokens.default) return false
|
||||
return !tokens[Field.INPUT]?.equals(tokens.default) && !tokens[Field.OUTPUT]?.equals(tokens.default)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -20,30 +24,42 @@ function includesDefaultToken(tokens: SwapTokens) {
|
||||
* Enforces that token is a part of the returned value.
|
||||
*/
|
||||
export function useSyncWidgetInputs({
|
||||
token,
|
||||
defaultField,
|
||||
onTokenChange,
|
||||
defaultTokens,
|
||||
onDefaultTokenChange,
|
||||
}: {
|
||||
token?: Currency
|
||||
defaultField: Field
|
||||
|
||||
onTokenChange?: (token: Currency) => void
|
||||
defaultTokens: DefaultTokens
|
||||
onDefaultTokenChange?: (token: Currency) => void
|
||||
}) {
|
||||
const trace = useTrace({ section: InterfaceSectionName.WIDGET })
|
||||
|
||||
const { chainId } = useWeb3React()
|
||||
const previousChainId = usePrevious(chainId)
|
||||
|
||||
const [type, setType] = useState<SwapValue['type']>(TradeType.EXACT_INPUT)
|
||||
const [amount, setAmount] = useState<SwapValue['amount']>(EMPTY_AMOUNT)
|
||||
const [tokens, setTokens] = useState<SwapTokens>({ [defaultField]: token, default: token })
|
||||
const [tokens, setTokens] = useState<SwapTokens>(defaultTokens)
|
||||
|
||||
useEffect(() => {
|
||||
setTokens((tokens) => {
|
||||
const update = { ...tokens, default: token }
|
||||
if (!includesDefaultToken(update)) {
|
||||
return { [defaultField]: update.default, default: update.default }
|
||||
}
|
||||
return update
|
||||
})
|
||||
}, [defaultField, token])
|
||||
if (!tokens[Field.INPUT] && !tokens[Field.OUTPUT]) {
|
||||
setTokens({
|
||||
...tokens,
|
||||
[Field.INPUT]: defaultTokens[Field.INPUT] ?? tokens[Field.INPUT],
|
||||
[Field.OUTPUT]: defaultTokens[Field.OUTPUT] ?? tokens[Field.OUTPUT] ?? defaultTokens.default,
|
||||
default: defaultTokens.default,
|
||||
})
|
||||
}
|
||||
}, [defaultTokens, tokens])
|
||||
|
||||
useEffect(() => {
|
||||
if (chainId !== previousChainId && !!previousChainId && isSupportedChain(chainId)) {
|
||||
setTokens({
|
||||
...tokens,
|
||||
[Field.INPUT]: undefined,
|
||||
[Field.OUTPUT]: undefined,
|
||||
})
|
||||
setAmount(EMPTY_AMOUNT)
|
||||
}
|
||||
}, [chainId, previousChainId, tokens])
|
||||
|
||||
const onAmountChange = useCallback(
|
||||
(field: Field, amount: string, origin?: 'max') => {
|
||||
@@ -99,13 +115,14 @@ export function useSyncWidgetInputs({
|
||||
return type
|
||||
})
|
||||
|
||||
if (!includesDefaultToken(update)) {
|
||||
onTokenChange?.(update[Field.OUTPUT] || selectingToken)
|
||||
if (missingDefaultToken(update)) {
|
||||
onDefaultTokenChange?.(update[Field.OUTPUT] ?? selectingToken)
|
||||
}
|
||||
setTokens(update)
|
||||
},
|
||||
[onTokenChange, selectingField, tokens]
|
||||
[onDefaultTokenChange, selectingField, tokens]
|
||||
)
|
||||
|
||||
const tokenSelector = (
|
||||
<CurrencySearchModal
|
||||
isOpen={selectingField !== undefined}
|
||||
@@ -113,6 +130,7 @@ export function useSyncWidgetInputs({
|
||||
selectedCurrency={selectingField && tokens[selectingField]}
|
||||
otherSelectedCurrency={selectingField && tokens[invertField(selectingField)]}
|
||||
onCurrencySelect={onTokenSelect}
|
||||
showCommonBases
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -120,11 +138,11 @@ export function useSyncWidgetInputs({
|
||||
() => ({
|
||||
type,
|
||||
amount,
|
||||
// If the default has not yet been handled, preemptively disable the widget by passing no tokens. Effectively,
|
||||
// If the initial state has not yet been set, preemptively disable the widget by passing no tokens. Effectively,
|
||||
// this resets the widget - avoiding rendering stale state - because with no tokens the skeleton will be rendered.
|
||||
...(token && tokens.default?.equals(token) ? tokens : undefined),
|
||||
...(tokens[Field.INPUT] || tokens[Field.OUTPUT] ? tokens : undefined),
|
||||
}),
|
||||
[amount, token, tokens, type]
|
||||
[amount, tokens, type]
|
||||
)
|
||||
const valueHandlers: SwapEventHandlers = useMemo(
|
||||
() => ({ onAmountChange, onSwitchTokens, onTokenSelectorClick }),
|
||||
|
||||
@@ -9,8 +9,12 @@ class TokenLogoLookupTable {
|
||||
initialize() {
|
||||
const dict: { [key: string]: string[] | undefined } = {}
|
||||
|
||||
DEFAULT_LIST_OF_LISTS.forEach((list) =>
|
||||
store.getState().lists.byUrl[list].current?.tokens.forEach((token) => {
|
||||
DEFAULT_LIST_OF_LISTS.forEach((list) => {
|
||||
const listData = store.getState().lists.byUrl[list]
|
||||
if (!listData) {
|
||||
return
|
||||
}
|
||||
listData.current?.tokens.forEach((token) => {
|
||||
if (token.logoURI) {
|
||||
const lowercaseAddress = token.address.toLowerCase()
|
||||
const currentEntry = dict[lowercaseAddress + ':' + token.chainId]
|
||||
@@ -21,7 +25,7 @@ class TokenLogoLookupTable {
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
})
|
||||
this.dict = dict
|
||||
this.initialized = true
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { FACTORY_ADDRESS as V2_FACTORY_ADDRESS } from '@uniswap/v2-sdk'
|
||||
import { FACTORY_ADDRESS as V3_FACTORY_ADDRESS } from '@uniswap/v3-sdk'
|
||||
import { SupportedChainId } from 'constants/chains'
|
||||
|
||||
import { constructSameAddressMap } from '../utils/constructSameAddressMap'
|
||||
import { SupportedChainId } from './chains'
|
||||
|
||||
type AddressMap = { [chainId: number]: string }
|
||||
|
||||
@@ -15,36 +15,43 @@ export const V2_ROUTER_ADDRESS: AddressMap = constructSameAddressMap('0x7a250d56
|
||||
|
||||
// celo v3 addresses
|
||||
const CELO_V3_CORE_FACTORY_ADDRESSES = '0xAfE208a311B21f13EF87E33A90049fC17A7acDEc'
|
||||
const CELO_ROUTER_ADDRESS = '0x5615CDAb10dc425a742d643d949a7F474C01abc4'
|
||||
const CELO_V3_MIGRATOR_ADDRESSES = '0x3cFd4d48EDfDCC53D3f173F596f621064614C582'
|
||||
const CELO_MULTICALL_ADDRESS = '0x633987602DE5C4F337e3DbF265303A1080324204'
|
||||
const CELO_QUOTER_ADDRESSES = '0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8'
|
||||
const CELO_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = '0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A'
|
||||
const CELO_TICK_LENS_ADDRESSES = '0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D'
|
||||
|
||||
// arbitrum goerli v3 addresses
|
||||
const ARBITRUM_GOERLI_V3_CORE_FACTORY_ADDRESSES = '0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6'
|
||||
const ARBITRUM_GOERLI_V3_MIGRATOR_ADDRESSES = '0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3'
|
||||
const ARBITRUM_GOERLI_MULTICALL_ADDRESS = '0x8260CB40247290317a4c062F3542622367F206Ee'
|
||||
const ARBITRUM_GOERLI_QUOTER_ADDRESSES = '0x1dd92b83591781D0C6d98d07391eea4b9a6008FA'
|
||||
const ARBITRUM_GOERLI_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = '0x622e4726a167799826d1E1D150b076A7725f5D81'
|
||||
const ARBITRUM_GOERLI_TICK_LENS_ADDRESSES = '0xb52429333da969a0C79a60930a4Bf0020E5D1DE8'
|
||||
|
||||
/* V3 Contract Addresses */
|
||||
export const V3_CORE_FACTORY_ADDRESSES: AddressMap = {
|
||||
...constructSameAddressMap(V3_FACTORY_ADDRESS, [
|
||||
SupportedChainId.OPTIMISM,
|
||||
SupportedChainId.OPTIMISM_GOERLI,
|
||||
SupportedChainId.ARBITRUM_ONE,
|
||||
SupportedChainId.ARBITRUM_RINKEBY,
|
||||
SupportedChainId.POLYGON_MUMBAI,
|
||||
SupportedChainId.POLYGON,
|
||||
]),
|
||||
[SupportedChainId.CELO]: CELO_V3_CORE_FACTORY_ADDRESSES,
|
||||
[SupportedChainId.CELO_ALFAJORES]: CELO_V3_CORE_FACTORY_ADDRESSES,
|
||||
[SupportedChainId.ARBITRUM_GOERLI]: ARBITRUM_GOERLI_V3_CORE_FACTORY_ADDRESSES,
|
||||
}
|
||||
|
||||
export const V3_MIGRATOR_ADDRESSES: AddressMap = {
|
||||
...constructSameAddressMap('0xA5644E29708357803b5A882D272c41cC0dF92B34', [
|
||||
SupportedChainId.ARBITRUM_ONE,
|
||||
SupportedChainId.ARBITRUM_RINKEBY,
|
||||
SupportedChainId.POLYGON_MUMBAI,
|
||||
SupportedChainId.POLYGON,
|
||||
]),
|
||||
[SupportedChainId.CELO]: CELO_V3_MIGRATOR_ADDRESSES,
|
||||
[SupportedChainId.CELO_ALFAJORES]: CELO_V3_MIGRATOR_ADDRESSES,
|
||||
[SupportedChainId.ARBITRUM_GOERLI]: ARBITRUM_GOERLI_V3_MIGRATOR_ADDRESSES,
|
||||
}
|
||||
|
||||
export const MULTICALL_ADDRESS: AddressMap = {
|
||||
@@ -55,22 +62,9 @@ export const MULTICALL_ADDRESS: AddressMap = {
|
||||
SupportedChainId.POLYGON,
|
||||
]),
|
||||
[SupportedChainId.ARBITRUM_ONE]: '0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB',
|
||||
[SupportedChainId.ARBITRUM_RINKEBY]: '0xa501c031958F579dB7676fF1CE78AD305794d579',
|
||||
[SupportedChainId.CELO]: CELO_MULTICALL_ADDRESS,
|
||||
[SupportedChainId.CELO_ALFAJORES]: CELO_MULTICALL_ADDRESS,
|
||||
}
|
||||
|
||||
export const SWAP_ROUTER_ADDRESSES: AddressMap = {
|
||||
...constructSameAddressMap('0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45', [
|
||||
SupportedChainId.OPTIMISM,
|
||||
SupportedChainId.OPTIMISM_GOERLI,
|
||||
SupportedChainId.ARBITRUM_ONE,
|
||||
SupportedChainId.ARBITRUM_RINKEBY,
|
||||
SupportedChainId.POLYGON,
|
||||
SupportedChainId.POLYGON_MUMBAI,
|
||||
]),
|
||||
[SupportedChainId.CELO]: CELO_ROUTER_ADDRESS,
|
||||
[SupportedChainId.CELO_ALFAJORES]: CELO_ROUTER_ADDRESS,
|
||||
[SupportedChainId.ARBITRUM_GOERLI]: ARBITRUM_GOERLI_MULTICALL_ADDRESS,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,12 +101,12 @@ export const QUOTER_ADDRESSES: AddressMap = {
|
||||
SupportedChainId.OPTIMISM,
|
||||
SupportedChainId.OPTIMISM_GOERLI,
|
||||
SupportedChainId.ARBITRUM_ONE,
|
||||
SupportedChainId.ARBITRUM_RINKEBY,
|
||||
SupportedChainId.POLYGON_MUMBAI,
|
||||
SupportedChainId.POLYGON,
|
||||
]),
|
||||
[SupportedChainId.CELO]: CELO_QUOTER_ADDRESSES,
|
||||
[SupportedChainId.CELO_ALFAJORES]: CELO_QUOTER_ADDRESSES,
|
||||
[SupportedChainId.ARBITRUM_GOERLI]: ARBITRUM_GOERLI_QUOTER_ADDRESSES,
|
||||
}
|
||||
|
||||
export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap = {
|
||||
@@ -120,19 +114,17 @@ export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap = {
|
||||
SupportedChainId.OPTIMISM,
|
||||
SupportedChainId.OPTIMISM_GOERLI,
|
||||
SupportedChainId.ARBITRUM_ONE,
|
||||
SupportedChainId.ARBITRUM_RINKEBY,
|
||||
SupportedChainId.POLYGON_MUMBAI,
|
||||
SupportedChainId.POLYGON,
|
||||
]),
|
||||
[SupportedChainId.CELO]: CELO_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES,
|
||||
[SupportedChainId.CELO_ALFAJORES]: CELO_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES,
|
||||
[SupportedChainId.ARBITRUM_GOERLI]: ARBITRUM_GOERLI_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES,
|
||||
}
|
||||
|
||||
export const ENS_REGISTRAR_ADDRESSES: AddressMap = {
|
||||
[SupportedChainId.MAINNET]: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
||||
[SupportedChainId.ROPSTEN]: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
||||
[SupportedChainId.GOERLI]: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
||||
[SupportedChainId.RINKEBY]: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
||||
}
|
||||
|
||||
export const SOCKS_CONTROLLER_ADDRESSES: AddressMap = {
|
||||
@@ -141,7 +133,7 @@ export const SOCKS_CONTROLLER_ADDRESSES: AddressMap = {
|
||||
|
||||
export const TICK_LENS_ADDRESSES: AddressMap = {
|
||||
[SupportedChainId.ARBITRUM_ONE]: '0xbfd8137f7d1516D3ea5cA83523914859ec47F573',
|
||||
[SupportedChainId.ARBITRUM_RINKEBY]: '0xbfd8137f7d1516D3ea5cA83523914859ec47F573',
|
||||
[SupportedChainId.ARBITRUM_GOERLI]: ARBITRUM_GOERLI_TICK_LENS_ADDRESSES,
|
||||
[SupportedChainId.CELO]: CELO_TICK_LENS_ADDRESSES,
|
||||
[SupportedChainId.CELO_ALFAJORES]: CELO_TICK_LENS_ADDRESSES,
|
||||
}
|
||||
|
||||
@@ -5,10 +5,11 @@ import { default as arbitrumCircleLogoUrl, default as arbitrumLogoUrl } from 'as
|
||||
import celoLogo from 'assets/svg/celo_logo.svg'
|
||||
import optimismLogoUrl from 'assets/svg/optimistic_ethereum.svg'
|
||||
import polygonMaticLogo from 'assets/svg/polygon-matic-logo.svg'
|
||||
import { SupportedChainId } from 'constants/chains'
|
||||
import ms from 'ms.macro'
|
||||
import { darkTheme } from 'theme/colors'
|
||||
|
||||
import { SupportedChainId, SupportedL1ChainId, SupportedL2ChainId } from './chains'
|
||||
import { SupportedL1ChainId, SupportedL2ChainId } from './chains'
|
||||
import { ARBITRUM_LIST, CELO_LIST, OPTIMISM_LIST } from './lists'
|
||||
|
||||
export const AVERAGE_L1_BLOCK_TIME = ms`12s`
|
||||
@@ -64,36 +65,6 @@ const CHAIN_INFO: ChainInfoMap = {
|
||||
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
|
||||
color: darkTheme.chain_1,
|
||||
},
|
||||
[SupportedChainId.RINKEBY]: {
|
||||
networkType: NetworkType.L1,
|
||||
docs: 'https://docs.uniswap.org/',
|
||||
explorer: 'https://rinkeby.etherscan.io/',
|
||||
infoLink: 'https://info.uniswap.org/#/',
|
||||
label: 'Rinkeby',
|
||||
logoUrl: ethereumLogoUrl,
|
||||
nativeCurrency: { name: 'Rinkeby Ether', symbol: 'rETH', decimals: 18 },
|
||||
color: darkTheme.chain_4,
|
||||
},
|
||||
[SupportedChainId.ROPSTEN]: {
|
||||
networkType: NetworkType.L1,
|
||||
docs: 'https://docs.uniswap.org/',
|
||||
explorer: 'https://ropsten.etherscan.io/',
|
||||
infoLink: 'https://info.uniswap.org/#/',
|
||||
label: 'Ropsten',
|
||||
logoUrl: ethereumLogoUrl,
|
||||
nativeCurrency: { name: 'Ropsten Ether', symbol: 'ropETH', decimals: 18 },
|
||||
color: darkTheme.chain_3,
|
||||
},
|
||||
[SupportedChainId.KOVAN]: {
|
||||
networkType: NetworkType.L1,
|
||||
docs: 'https://docs.uniswap.org/',
|
||||
explorer: 'https://kovan.etherscan.io/',
|
||||
infoLink: 'https://info.uniswap.org/#/',
|
||||
label: 'Kovan',
|
||||
logoUrl: ethereumLogoUrl,
|
||||
nativeCurrency: { name: 'Kovan Ether', symbol: 'kovETH', decimals: 18 },
|
||||
color: darkTheme.chain_420,
|
||||
},
|
||||
[SupportedChainId.GOERLI]: {
|
||||
networkType: NetworkType.L1,
|
||||
docs: 'https://docs.uniswap.org/',
|
||||
@@ -153,19 +124,19 @@ const CHAIN_INFO: ChainInfoMap = {
|
||||
color: darkTheme.chain_42,
|
||||
backgroundColor: darkTheme.chain_42161_background,
|
||||
},
|
||||
[SupportedChainId.ARBITRUM_RINKEBY]: {
|
||||
[SupportedChainId.ARBITRUM_GOERLI]: {
|
||||
networkType: NetworkType.L2,
|
||||
blockWaitMsBeforeWarning: ms`10m`,
|
||||
bridge: 'https://bridge.arbitrum.io/',
|
||||
docs: 'https://offchainlabs.com/',
|
||||
explorer: 'https://rinkeby-explorer.arbitrum.io/',
|
||||
explorer: 'https://goerli.arbiscan.io/',
|
||||
infoLink: 'https://info.uniswap.org/#/arbitrum/',
|
||||
label: 'Arbitrum Rinkeby',
|
||||
label: 'Arbitrum Goerli',
|
||||
logoUrl: arbitrumLogoUrl,
|
||||
defaultListUrl: ARBITRUM_LIST,
|
||||
defaultListUrl: ARBITRUM_LIST, // TODO: use arbitrum goerli token list
|
||||
helpCenterUrl: 'https://help.uniswap.org/en/collections/3137787-uniswap-on-arbitrum',
|
||||
nativeCurrency: { name: 'Rinkeby Arbitrum Ether', symbol: 'rinkArbETH', decimals: 18 },
|
||||
color: darkTheme.chain_421611,
|
||||
nativeCurrency: { name: 'Goerli Arbitrum Ether', symbol: 'goerliArbETH', decimals: 18 },
|
||||
color: darkTheme.chain_421613,
|
||||
},
|
||||
[SupportedChainId.POLYGON]: {
|
||||
networkType: NetworkType.L1,
|
||||
|
||||