Compare commits

...

356 Commits

Author SHA1 Message Date
Uniswap Labs Service Account
195703495c ci(release): publish latest release 2023-12-15 21:42:35 +00:00
Uniswap Labs Service Account
690d2970cd ci(release): publish latest release 2023-12-13 20:51:43 +00:00
Uniswap Labs Service Account
8465f6848c ci(release): publish latest release 2023-12-07 22:16:26 +00:00
Uniswap Labs Service Account
ba367959eb ci(release): publish latest release 2023-12-06 02:56:00 +00:00
Uniswap Labs Service Account
3e5fb0516d ci(release): publish latest release 2023-12-05 21:38:58 +00:00
Kristie Huang
fc7ecc7e3b feat: [info] add multi-chain balances on TDP (#7493)
* feat: wip, [info] add TDP crosschain balances

* very wip new balances

* progress on balances

* wip new balance

* add todo for native tokens

* fix bridge info caching

* fix bridge info caching & clean up

* cleanup query logic

* remove pollinginterval enum change

* fix logo flickering

* minor comment cleanup

* more minor comment cleanup

* use gqlToCurrency instead

* css changes for balance box

* css changes for mobile balance summary footer

* fix apollo client caching tokens merge

* clarify comment

* make chainId required

* comment cleanup

* fix: balance fetch caching

* fix prefetchbalancewrapper css jank

* remove padding

* delete extraneous borderRadius

* update comment

* should not show balancecard at all if no balances

* rename to multichain

* changes to mobile bar css

* use surface1 theme background

* oops add back bottom-bar

* fix cypress tests ??

* revert change

* broken apollo merge??

* remove extraneous tokens call

* remove apollo merge for portfolio>tokens

* oops fix some pr review

* load portfolio balances as it updates

* pr review

* update comment linear ticket

* remove extraneous chainId prop

* increase timeout time

* should not do symbols check

* pr review

* pr review

* refactor multichainbalances into map

* remove address native

* nit pr review

* use portfoliobalance fragment

* fix typechecking gql

* TYPES

---------

Co-authored-by: cartcrom <cartergcromer@gmail.com>
2023-11-27 13:40:19 -05:00
Kristie Huang
4a5a41c59e fix: fix uniswapx feature flag test cleanup (#7615) 2023-11-21 14:42:40 -05:00
Kristie Huang
4bec816e6c fix: disable fees and uniswapx tests + skip localStorage reads for bl… (#7580)
fix: disable fees and uniswapx tests + skip localStorage reads for blocked addresses (#7564)

* fix: disable fees tests

* skip uniswapx tests for now

* turn off uniswapx for classic swap test

* skip local cache reads for blocked accounts

* fix: broken pools test (#7562)

* test: update hardhat blocknumber (#7559)

* init

* fix: remove console log

* fix: add comment

---------

Co-authored-by: Tina <59578595+tinaszheng@users.noreply.github.com>
Co-authored-by: cartcrom <cartergcromer@gmail.com>
Co-authored-by: cartcrom <39385577+cartcrom@users.noreply.github.com>
2023-11-21 14:10:28 -05:00
Kristie Huang
1d1b15f4ac fix: android banner DownloadButton onClick should not propagate up (#7611)
* android banner link - remove linktarget

* stop propagation?

* linter
2023-11-20 12:36:02 -05:00
Tina
1ffaf723de fix: dont show USD price difference for wraps (#7610)
dont show stableconi price difference on wraps
2023-11-17 17:46:16 -05:00
Tina
dd4b2dc764 fix: only change input currency to weth after eth wrap completes for uniswapx eth input trades (#7604)
* only change input currency to weth after wrap completes

* add e2e test

* update test
2023-11-17 10:47:16 -05:00
eddie
5ded55e061 feat: x rollout cleanup (#7582)
* feat: cleanup post x rollout

* feat: remove feature flag

* fix: remove more unused styled components

* fix: delete deprecated value from redux store

* fix: lint

* fix: remove userOptedOutOfUniswapX

* fix: migrate verion in edge case, add test
2023-11-16 13:59:36 -08:00
eddie
0f4ca592f2 fix: remove /increase route (#7603)
* fix: remove /increase route

* fix: rename confusing components
2023-11-16 13:36:57 -08:00
Kristie Huang
90497dc08a chore: refactor TDP time selector (#7600)
* feat: [info] add tdp charts toggle, WIP

* some refactoring

* remove chartType related changes after cherrypick

* nit

* remove setTransition
2023-11-16 13:46:25 -05:00
eddie
2e618fb2aa fix: remove 3 launched feature flags (#7589)
* fix: remove 3 launched feature flags

* fix: remove unused componnent

* fix: remove another apple logo
2023-11-15 11:17:02 -08:00
cartcrom
0aa5727cdd fix: don't format wrap input amount (#7592)
* fix: don't format wrap input amount

* lint
2023-11-15 13:58:57 -05:00
Tina
79e74e1d13 fix: disable showing approve cost for arbitrum (#7594)
disable showing approve cost for arbitrum
2023-11-15 13:24:13 -05:00
eddie
52dc441e31 feat: swap component refactor limits (#7588)
* feat: add limits tab, flag

* feat: add unit test

* fix: update snapshot
2023-11-15 09:00:03 -08:00
Tina
ff6d1cc510 feat: read token taxes from backend response (#7532)
* read token taxes from backend

* revert env changes

* upgrade router-sdk for updated price impact logic

* add tax information to trade currencies instead of directly on trade object

* consolidate getTradeCurrencies with getSwapCurrenciesWithTaxInfo

* delete feature flag for token taxes!

* run yarn dedupe again

* fix unit tests

* update logic for disabling inputs

* update snapshot again

* fix return value for uniswapx

* remove unused constants and update comment

* pr review

* re-add useSwapTaxes for token descriptor page

* add in client-side tax fetching on currency level

* revert removing newline

* typecheck....

* typecheck...

* remove inputTax, outputTax from routing-api arguments because they are now unused

* dont pass in tax info to preview trade
2023-11-15 09:57:43 -05:00
cartcrom
76157c057e fix: portfolioLogo alignment (#7585)
* fix: portfolioLogo alignment

* fix: snapshot
2023-11-14 17:02:16 -05:00
eddie
a1bd6f5eb4 feat: update default router preference in redux (#7571) 2023-11-14 11:05:47 -08:00
Jack Short
f903eedc15 fix: redux migration to flush german locale (#7584)
* fix: redux migration to flush german locale

* lint

* my linter was not workking
2023-11-14 13:29:17 -05:00
eddie
1feeaea181 test: update e2e tests after X rollout (#7583)
test: updatea e2e tests after X rollout
2023-11-14 09:13:57 -08:00
eddie
7b10c94e4d fix: update robots.txt file (#7570) 2023-11-14 09:13:44 -08:00
eddie
f2f59d52cb feat: update legacy redux migration post X rollout (#7572) 2023-11-13 15:19:28 -08:00
eddie
a5034cb1c0 fix: reset token selections when changing chains on /add (#7561)
* fix: reset token selections when  changing chains on /add

* fix: tests

* fix: add e2e test

* fix: remove .only
2023-11-13 15:10:44 -08:00
eddie
2227a38276 fix: set current redux version to 3 (#7578)
* fix: set current redux version to 3

* fix: tests
2023-11-13 14:21:50 -08:00
Thomas Thachil
9f06747958 fix(): deeplink for android wc (#7573) 2023-11-13 16:46:15 -05:00
Kristie Huang
c6b44bb5c9 fix: use NativeCurrency for polygon matic (#7567)
* fix: use NativeCurrency for polygon matic

* add comment

* update snapshots??

* Revert "update snapshots??"

This reverts commit 280758be11.
2023-11-13 16:11:33 -05:00
Zach Pomerantz
1d64d24d31 fix: update function tests for 404ing collections (#7575) 2023-11-13 15:39:51 -05:00
cartcrom
d8e43f0834 fix: broken pools test (#7562) 2023-11-09 19:57:01 -05:00
cartcrom
82f27186cf test: update hardhat blocknumber (#7559)
* init

* fix: remove console log

* fix: add comment
2023-11-09 18:43:10 -05:00
Kristie Huang
876d3a1cc3 feat: [info] add new tdp nav (#7531)
* feat: [info] add new tdp nav

* tidy up code

* pr review

* nit remove unused component style

* pr review

* lol extraneous extra
2023-11-09 14:51:23 -05:00
Nate Wienert
712f82cb1a chore: align eslint version with wallet repo (#7526) 2023-11-09 08:11:13 -10:00
Tina
682215a574 feat: use useUSDPrice hook for calculating token usd value for auto slippage (#7555) 2023-11-09 13:08:54 -05:00
Kristie Huang
395b390df6 feat: add android announcement banner (#7551)
* feat [wip]: add android announcement banner

* feat: [wip] add android announcement banner

* finish css

* remove hideBaseWallet references

* phil changes

* minor lint nit

* pr review

* growth copy
2023-11-08 16:18:16 -05:00
Tina
cee3390b71 fix: skip all quote / pricing requests if window is not visible (#7554)
* skip all quote / pricing requests if window is not visible

* add unit tests

* add ts-ignore comment
2023-11-08 15:14:50 -05:00
Jack Short
418ee08b00 chore: adds e2e test for when usd quote fetch fails (#7215)
* chore: adds e2e test for when usd quote fetch fails

* Update src/components/CurrencyInputPanel/SwapCurrencyInputPanel.tsx

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update cypress/e2e/swap/errors.test.ts

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-11-08 13:27:10 -05:00
Charles Bachmeier
ebfcd8fbbe refactor: move pool details components to the components folder (#7553)
* refactor: move pool details components to the components folder

* cleanup index imports

* update snapshot
2023-11-08 10:24:59 -08:00
Jack Short
c27e70b87c chore: e2e insufficient liquidity test (#7075)
* chore: e2e insufficient liquidity test

* Update cypress/e2e/swap/errors.test.ts

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* fixing lint

* waiting for quote

* stubbing insufficient liquidity response

* req reply

* trying full url

* maybe cors

* moving before visit

* adding back timeout

* Revert "adding back timeout"

This reverts commit 89cff3afb8.

* in describe block

* moving to new file

* moving to errors test file

* moving comment

* removing extra describe

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-11-08 13:11:41 -05:00
Jack Short
b4f3555600 chore: add appropriate padding and update chain selector to styled (#7549)
* chore: add appropriate padding and update chain selector to styled

* light gray on hover remove

* Update src/components/NavBar/ChainSelector.tsx

Co-authored-by: Charles Bachmeier <charles@bachmeier.io>

---------

Co-authored-by: Charles Bachmeier <charles@bachmeier.io>
2023-11-08 12:31:45 -05:00
Jack Short
0e87c38548 chore: disabling exact output for fot tokens (#7550)
* chore: disabling exact output for fot tokens

* fixing currency symbol
2023-11-08 12:28:23 -05:00
Charles Bachmeier
245d0eed06 fix: hide invalid nft collections with 0 items from search bar (#7547)
fix: hide invalid collecitons with 0 items
2023-11-08 12:21:14 -05:00
Kristie Huang
46c8caa09c feat: update app download tracking for Android launch (#7542)
* feat: change UniwalletModal android text

* very wip android WC

* adding android/ios disambiguated event names

* put analytics events in todos

* use analytics package

* use isAndroidGALaunched

* fix ternary

* add navbar menu element

* broken onelink changes

* replace utm with onelinks

* use microsite link in address redirect

* fix unit tests, no longer discriminate between platforms expected behavior

* nit lint
2023-11-07 17:24:44 -05:00
Jack Short
aa056adaf9 chore: removing check mark on token selector (#7533) 2023-11-07 15:20:49 -05:00
Charles Bachmeier
ce4df4f79e fix: add chainId to dependency array (#7548)
fix: add chain to dependency array
2023-11-07 09:58:25 -08:00
Kristie Huang
769a7ab9b5 fix: rename WrappedTokenInfo class (#7495)
* fix: rename WrappedTokenInfo class

* delete old wrappedTokenInfo file

* rename to TokenFromList

* move back to state/lists

* appease linter

* fix nftlistrow
2023-11-06 16:15:41 -05:00
Kristie Huang
5cbc56cf65 feat: [info] add new stats box (#7522)
* feat: [info] add new stats section, wip

* add stats section

* implement fdv and market cap

* use fdv from backend gql

* code cleanup

* update cypress tests

* should only wrap if screen width <= 640

* minor design nits

* remove sitemap change

* nit pr review
2023-11-06 15:54:43 -05:00
eddie
098c7b9cbe fix: update uniwallet wc link (#7450)
* fix: update uniwallet wc link

* fix: undo url change for redirect
2023-11-06 12:22:03 -08:00
Jack Short
a0d880cf81 fix: spam tokens showing up in currency selector (#7545)
* fix: spam tokens showing up in currency selector

* chain id check

* token chain id
2023-11-06 14:40:36 -05:00
Kristie Huang
443a00a777 fix: remove version check in redux lists update + migrate outdated USDC saved tokens (#7544)
* fix: remove version check lists update

* add migration and test

* pr review
2023-11-06 14:20:55 -05:00
Jack Short
9eaa22f644 chore: converting useStablecoinPrice to useUsdPrice in autoslippage (#7543) 2023-11-03 12:51:04 -04:00
Nate Wienert
1c92482855 fix: basel font using wrong variation settings (#7536)
* fix: basel font using wrong variation settings
2023-11-02 11:05:13 -10:00
Nate Wienert
274d79dfde chore: align uniswap deps with wallet repo (#7527)
* chore: align uniswap deps with wallet repo
2023-11-02 11:02:09 -10:00
Charles Bachmeier
c2ca9ab93e feat: [info] update token links (#7505)
* update pdp link styles

* dynamic link text

* move links to their own file

* border width case

* todo comments

* add explorer icon

* hide chain logos on other chain

* remove quotes

* clean up

* unused style
2023-11-02 13:53:18 -07:00
Tina
0fbc826581 feat: Remove logging whole error object for analytics (#7540) 2023-11-02 16:32:12 -04:00
Charles Bachmeier
e9f784b2bc refactor: clean up getExplorerLink helper fn (#7537) 2023-11-02 09:11:13 -07:00
Charles Bachmeier
f9a9469523 feat: [info] Add token description to TDP (#7504)
* update token description for TDP

* add tooltip to fee

* show buy/sell fees

* remove token description from PDP

* remove unused styles

* update snapshots

* undo fee component testing

* isInfoTDPEnabled

* update explorer fn
2023-11-02 08:32:58 -07:00
Jack Short
b995f4d671 fix: fixing ugly scrollbar (#7535) 2023-11-01 14:27:07 -04:00
Kristie Huang
3f62bcf2f0 feat: add Android feature flag & change some app logos (#7524)
* fix: generalize iOS language to app, and add color app icon

* remove apple logo

* delete more apple logos

* remove learn more arrow

* update snapshots

* add feature flags to android changes
2023-11-01 14:25:15 -04:00
Jack Short
bd30721989 chore: updating nft numbers (#7351)
* format price impact

* format price

* adding confirm swap modal

* removing export

* adding export back

* half of test functions done

* format numbers tests

* formatting

* making numberFormat local

* making formatCurrencyAmount internal

* price impact

* formatSlippage

* formatTickPrice

* formatNumberOrString

* formatFiatPrice

* removing formatPreciseFloat

* formatReviewSwapCurrencyAmount

* correct active currency

* explore table

* deleting formatTickPrice

* fixing explore table

* nft assset details

* removing all instancees of ethnumberstandardformatter

* removing format wei impls

* explore table

* collectino stats

* removing almost everything from nft/numbers

* filter button

* final nft fixes

* removing put commas

* explore page

* listing page

* extraneous functions

* responding to comments

* formatEhter

* updating formatter names

* dep array

* comments

---------

Co-authored-by: John Short <john.short@CORN-Jack-899.local>
2023-11-01 12:44:45 -04:00
Jack Short
802d56231a fix: updating currency search panel for number formatting (#7407) 2023-10-31 16:46:02 -04:00
Kristie Huang
9536df2ff1 fix: remove bridged USDC from quickselect (#7529)
* fix: remove bridged usdc from quickselect

* oops remove migrations logic

* update routing test
2023-10-31 16:26:44 -04:00
Jack Short
ff3ed31dd7 chore: cleaning up previous uk blocking functionality (#7489) 2023-10-31 13:45:26 -04:00
Jack Short
719f82c7c4 feat: pool page currency conversion (#7416) 2023-10-31 13:44:38 -04:00
mr-uniswap
0937e35095 ci: removed snyk files (#7521)
removed snyk files
2023-10-31 13:36:24 -04:00
Matthew Spector
3f9b436c86 fix: Changing some language around fees (#7492)
* fix: Changing some language around fees

* adding chain name to toolti

* lowercase network

* fixing tests
2023-10-31 09:34:04 -07:00
Kristie Huang
40afc7388a fix: add space to migrateV2 link (#7523) 2023-10-31 01:52:36 -04:00
mr-uniswap
eff6484a10 ci: basic semgrep configuration (#7520)
* basic semgrep configuration

* only main branch
2023-10-30 16:00:40 -04:00
Kristie Huang
635875345e fix: add native USDC to Optimism quick-select (#7499)
* fix: add native USDC to Optimism quick-select

* fix jest test
2023-10-30 13:08:28 -04:00
Kristie Huang
b670affd4c fix: add native USDC to Polygon quick-select (#7500)
* fix: add native USDC to Polygon quick-select

* remove usdce

* pr review
2023-10-30 11:35:45 -04:00
Charles Bachmeier
6798bf3cf1 feat: [info] add PDP loading skeleton (#7494)
* initial skeleton setup

* responsive table skeleton

* correct table widht

* right side column added

* add comments

* move loading components to their corresponding component

* remove extra bubble and adjust some styles

* move table skeleton to its own file

* add shared styles and skele file

* add loading skeleton tests

* design style nits

* update tests

* bips_base

* fix regression
2023-10-20 13:11:22 -07:00
Kristie Huang
8734ee5986 fix: dedupe matic native token (#7485)
* fix: dedupe matic native token, wip

* use precompile address

* prefill swap currency with page chain, not connected chain

* fix token-explore test
2023-10-20 14:13:58 -04:00
Charles Bachmeier
226fc441a7 refactor: allow missing input for useSwapTaxes (#7498) 2023-10-20 09:54:13 -07:00
eddie
36242d14b0 feat: add temporary logging to swap_signed (#7472) 2023-10-19 13:49:13 -07:00
eddie
b02352e8bf fix: dont try to log unserializable objects (#7497)
* fix: dont log unserializable objects to amplitude

* fix: add more fields

* fix: nits

* fix: add chainid
2023-10-19 13:38:16 -07:00
Nate Wienert
819e2f5712 fix: fix contrast on l2 network text (#7466)
* fix: fix contrast on l2 network text
2023-10-19 13:05:26 -04:00
Jack Short
5357c58ac9 chore: removing german from supported languages (#7490)
* chore: removing german from supported languages

* updating tests

* Update src/utils/formatNumbers.test.ts

Co-authored-by: Charles Bachmeier <charles@bachmeier.io>

---------

Co-authored-by: Charles Bachmeier <charles@bachmeier.io>
2023-10-18 16:01:47 -04:00
Zach Pomerantz
aada666c1a fix: de-flake Cypress through various means (#7488)
* build: reduce retries to discourage flakes

* fix: lazy-load asset logos

* chore: simplify logging test

* fix: guard against dutch orders for pricing

* test: only stub non-pricing quotes

* fix: opt in flicker

* test: mock statsig
2023-10-18 12:44:52 -07:00
cartcrom
86fc15907a refactor: consolidate percent formatting util (#7467)
* refactor: consolidate percent formatting util

* refactor: use generic percent formatter

* fix: add descriptive comment for formatDelta
2023-10-18 14:34:37 -04:00
Kristie Huang
c5f2df4bc0 fix: update USDbC to default USDC on Base (#7377)
* fix: update usdbc to default usdc

* add base to chainid logo lookup

* remove nit

* replace dai with usdbc
2023-10-18 14:03:55 -04:00
ksvat
71d3661b22 fix: currency balance for search token (#7471) 2023-10-18 10:54:47 -07:00
eddie
740db0fe16 fix: merge portfolio tokens w/ default token list in Currency Selector (#7479) 2023-10-17 14:00:39 -07:00
Kristie Huang
ed6afb50de feat: [info] add explore page (#7381)
* feat: add explore page

* add explore filter options

* add search bar defocus

* use Tokens Tab state for filters

* flag-gate /tokens

* filter bar css

* remove duplicate Explore page, use flag instead

* fixes

* create tabbednav interface

* rename Tokens to Explore

* simplify routing

* nit

* padding nit

* pr review

* fix menu flyouts

* fix TDP nav

* add analytics events + ui updates + pr review

* nit

* nit

* add small comment

* menu flyout nit

* fix merge conflict

* min width expand menu flyouts

* fix redirects

* update routing snapshot

* nit css

* oops

* breakpoints

* fix tab routing

* pr review

* add better tab dynamic routing

* fix redirects

* error handle edge urls

* further fix routing

* define return val for useExploreParams

* Update snapshot
2023-10-17 15:34:34 -04:00
eddie
9d439e7f62 feat: organize sitemaps (#7475) 2023-10-17 11:07:23 -07:00
charity-sock-pacifist
6b60855362 fix: learn more url [main] (#7483)
* fix: learn more url

* fix: snapshots

---------

Co-authored-by: charity-sock-pacifist <interface-github@example.com>
2023-10-17 13:58:16 -04:00
dependabot[bot]
53b53c2207 build(deps-dev): bump @uniswap/default-token-list from 11.2.0 to 11.8.0 (#7480)
Bumps [@uniswap/default-token-list](https://github.com/Uniswap/default-token-list) from 11.2.0 to 11.8.0.
- [Release notes](https://github.com/Uniswap/default-token-list/releases)
- [Commits](https://github.com/Uniswap/default-token-list/commits)

---
updated-dependencies:
- dependency-name: "@uniswap/default-token-list"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 12:12:41 -04:00
charity-sock-pacifist
2818167131 feat: swap fees [main] (#7478) 2023-10-16 19:32:39 -04:00
eddie
c2440d1080 fix: use a different ipfs gateway (#7473) 2023-10-16 14:20:44 -07:00
eddie
f556f745fb fix: remove sitemap step from ci (#7470) 2023-10-13 13:20:10 -07:00
cartcrom
7f597c0fab refactor: use bips base constant (#7464)
* refactor: use bips base constant

* fix: missed usage
2023-10-13 16:15:28 -04:00
Tina
cfaf5d79c1 feat: Remove local routing setting (#7462)
* remove client side router preference

* update e2e test

* fix comment
2023-10-13 14:33:47 -04:00
eddie
e9fbf61375 fix: position X opt in tooltip on TDP (#7465) 2023-10-13 10:20:10 -07:00
eddie
749c9b40ea fix: specify canonical URLs (#7455)
* fix: app.uniswap.org canonicals

* fix: deps test

* fix: use window.location.origin
2023-10-13 09:27:15 -07:00
eddie
b553a6fcd8 feat: nfts sitemap (#7456)
* feat: add nft collections to sitemap

* feat: size check on sitemap

* fix: update generate-sitemap script
2023-10-13 09:17:57 -07:00
eddie
ad1e2c60a1 fix: delay setting user.router_preference until statsig and redux initialize (#7458) 2023-10-12 15:42:57 -07:00
eddie
7001452f89 fix: move user prop updater into statsigProvider (#7442) 2023-10-12 11:30:02 -07:00
eddie
5fee3c6fdd fix: sitemap format (#7453) 2023-10-11 15:23:15 -07:00
eddie
40b1e40721 fix: remove bridge usdc arbitrum (#7446) 2023-10-11 12:16:15 -07:00
eddie
aee4df10a8 fix: change default tx deadline to 10m (#7451)
* fix: change deadline to 10m

* test: add unit tests

* fix: improve unit tests
2023-10-11 12:15:51 -07:00
Charles Bachmeier
82a194987a feat: [info] Add Token Description Component (#7400)
* working token details section

* update decription styling

* different chain explorers

* remove wrap check for color extraction

* move token description to its own component, add copy, make simple project query

* rename styled components and add tests

* remove old comment

* await test fragment

* fix: update description truncation from TokenDescription (#7413)

* fix: update description truncation from TokenDescription

* fix: use better name

* fix: test if description is hidden or not (#7422)

---------

Co-authored-by: Charles Bachmeier <charles@bachmeier.io>

* make darker or lighter

* showCopy default false

* update test

* remove unused styles

---------

Co-authored-by: eddie <66155195+just-toby@users.noreply.github.com>
2023-10-11 10:32:33 -07:00
eddie
1882b14690 fix: hide slippage warning when trade is x (#7439) 2023-10-11 10:21:43 -07:00
gnewfield
d56030a920 feat: add progress_indicator_v2 flag (#7445)
* feat: add progress_indicator_v2 flag

* rename flag hook
2023-10-11 12:53:10 -04:00
Kristie Huang
b75438bc8b fix: fix sitemaps routes test (#7441)
* fix: fix sitemaps routes test

* avoid checking all top-tokens paths
2023-10-11 12:53:01 -04:00
Thomas Thachil
9f44e48cf1 chore(): update deeplink package names (#7399) 2023-10-11 12:17:45 -04:00
cartcrom
48855f487f feat: animated review expando (#7440)
* feat: animated review expando

* test: update snapshots

* fix: pr comments + spacing
2023-10-11 09:23:28 -04:00
eddie
f09ded1a3f fix: user prop updater staging (#7443)
fix: move user prop updater into statsigProvider
2023-10-10 15:51:26 -07:00
cartcrom
e16348e2e0 feat: new chain logos (#7438)
* feat: new consolidated chain logos

* test: update snapshots

* refactor: simplify border radius formula

* fix: pass style prop to portofolio logo container

* lint

* fix: accessibility

* fix: pr nits'

* fix: unnused styled component
2023-10-10 18:25:50 -04:00
Kristie Huang
45c3e1dc78 feat: add dynamicconfig modal setting (#7395)
* feat: add dynamicconfig feature flags setting

* better typing

* use diff atom for configs

* fix

* add config to devflagsbox

* fix devbox intiailization

* lint
2023-10-10 15:37:47 -04:00
Charles Bachmeier
24ddace1eb feat: [info] update color extract default and have PDP fallback (#7432)
* feat: [info] update color extract default and have a fallback

* uncomment section removed for testing

* update snapshot
2023-10-10 12:24:57 -07:00
eddie
b38ce038e6 feat: remove sitemap script from prepare step (#7437) 2023-10-10 10:41:08 -07:00
Charles Bachmeier
04bf075826 fix: broken Checkmark image for Mobile NFT Sort dropdown (#7401)
fix broken image
2023-10-10 10:02:21 -07:00
eddie
27ec2e018c feat: add robots.txt (#7435) 2023-10-06 17:09:04 -07:00
eddie
3ffe7693cf feat: add top token urls to sitemap and improve script (#7429)
* feat: add top token urls to sitemap and improve script

* fix: remove unnecessary header

* fix: test
2023-10-06 17:08:46 -07:00
Jack Short
2c7381ff47 fix: removing scrollbar on swap with banner (#7434) 2023-10-06 15:33:04 -04:00
Jack Short
6e4746a7fe feat: uk disclaimer banner (#7428)
* feat: uk disclaimer banner

* bad merge with sitemap

* button

* cypress test

* intercept ordering

* comments

* sitemap was committed idk why

* font weights

* moving uk disclaimer

* removing trash
2023-10-06 14:00:07 -04:00
Kristie Huang
48379c66ce feat: [info] remove balance summaries from TDP (#7430) 2023-10-06 13:07:29 -04:00
eddie
1b7f0d11fd fix: override user pref in analytics (#7420) 2023-10-06 09:21:18 -07:00
Kristie Huang
db1d264ad3 fix: unhide native gas token from miniportfolio (#7374)
* fix: unhide native gas token from miniportfolio

* wip tests & gql types

* fix tests, default hide small balances

* pr review

* fix e2e hidden count
2023-10-06 12:11:44 -04:00
Connor McEwen
fd24cb890a fix: meta tag injector uses property, not name (#7431) 2023-10-06 11:46:39 -04:00
cartcrom
932c4482d2 feat: updated rate/routing tooltips (#7412)
* feat: updated routing tooltips

* refactor: gas price formatting

* fit: boolean rendering
2023-10-05 17:25:53 -04:00
Connor McEwen
2d8dac5c15 fix: merge issue (#7427)
* fix: merge issue

* update snapshots
2023-10-05 16:30:57 -04:00
Kristie Huang
0e3d188a9a feat: add feature flags settings overrides box (#7406)
* add feature flags settings overrides box

* cat

* useGate hook monstrosity

* pr changes

* exclude devflagsbox from code cov

* pr review

* mobile bottom bar

* nit

* initialize atom

* fix atom initialization

* remove comments

* fix devbox initialization

* nit remove diff
2023-10-05 15:48:02 -04:00
cartcrom
1be62f0bec feat: updated slippage ui (#7409)
* feat: updated slippage ui

* fix: update settings to also have period in max slippage string

* test: update e2e test search string
2023-10-05 15:34:23 -04:00
Connor McEwen
e6519a7dd1 feat: support redirects for a list of header paths (#7411)
* add country code to meta tag

* use blocked paths header

* proper types

* add test

* Update functions/components/metaTagInjector.ts

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update functions/components/metaTagInjector.ts

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update src/pages/App.tsx

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* pr suggestions

* skip failing e2e

* revert test change

* take file from main

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-10-05 15:25:45 -04:00
eddie
3ced65b8a4 feat: add sitemap for app.uniswap.org (#7408)
* feat: add sitemap for app.uniswap.org

* feat: script to update lastmod

* fix: deps and snapshots

* fix: use xml2js

* fix: improve test and sitemap
2023-10-05 12:19:58 -07:00
eddie
bab8506919 fix: dont crash on invalid tokenId (#7410) 2023-10-05 12:12:34 -07:00
eddie
4a79280edc feat: allow manual test runs (#7415) 2023-10-05 12:12:21 -07:00
eddie
53f0ca9b7e fix: disable UniswapX opt-out in e2e tests (#7423) 2023-10-05 11:54:24 -07:00
eddie
0381200fec fix: ignore large slices in immutable check (#7425) 2023-10-05 11:40:52 -07:00
Matthew Spector
040ebb5475 fix: Remove Minus Sign for FOT Display (#7419) 2023-10-05 11:33:28 -07:00
Charles Bachmeier
0752314d87 fix: click on test row directly (#7424) 2023-10-05 11:08:39 -07:00
Charles Bachmeier
9db5fd104a fix: use in house token for low volume test (#7414)
* fix: use discontinued project for low volume test

* use token I created

* update comment

* no info available

* remove socials

* update comment

* checksummed address
2023-10-04 18:18:57 -07:00
cartcrom
b9db195017 feat: gas costs ui updates (#7405)
* feat: gas costs ui updates

* lint

* test: update snapshots

* test: update other snapshots
2023-10-04 16:08:00 -04:00
eddie
b6bdbcf587 test: mock http requests in jest (#7394)
* test: try no coverage for unit tests

* test: onlychanged

* test: try parallel

* fix: no http in unit tests

* fix: deduplicate

* fix: nock only

* fix: maxworkers 2

* fix: remove nock

* fix: restore nock

* fix: comment

* fix: try again with jest-offline

* fix: remove jest-offline

* test: try 2 again

* fix: 100%
2023-10-03 14:37:27 -07:00
eddie
cc325b2fbe fix: no stale trade when otherCurrency is missing (#7403) 2023-10-03 14:33:48 -07:00
Jack Short
2694379c97 chore: currency percentages (#7358)
* formatPercent

* hook deps

* price chart

* price chart formatting

* bug bash findings

* Update src/utils/formatNumbers.ts

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* fixing merge errors

* unit tests

* special cases

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-10-03 13:29:36 -07:00
cartcrom
82aaf0784a refactor: swap line items and tooltips decomposition (#7390)
* refactor: swap line items and tooltips decomposition

* test: test line items directly

* refactor: added tooltip prop

* refactor: preview trade logic

* fix: percentage color

* lint

* fix: exchange rate alignment

* fix: initial pr comments

* test: fix snapshots

* refactor: var naming

* fix: uneeded dep array var

* refactor: small nit
2023-10-03 15:22:07 -04:00
Jordan Frankfurt
55a509cad8 chore: update @web3-react/* (#7398)
* chore: update @web3-react/walletconnect-v2

* update remaining packages and their patches
2023-10-03 13:46:02 -05:00
Tina
463dd6fdfb feat: Move UniswapX signature expiry back to deadline (#7402)
startTime -> deadline
2023-10-03 14:29:03 -04:00
Kristie Huang
3ad4fb6846 feat: change address screening service to Uniswap /screen API (#7339)
* change fetch url to uniswap api

* clean code + write tests

* nit updates

* nit-rename test

---------

Co-authored-by: Kristie Huang <kristie.huang@uniswap.org>
2023-10-02 13:04:30 -04:00
gnewfield
1c76277c46 feat: polish blocked, nonexistent NFT collection page (#7373)
* add pages for nonexistent and blocked NFT collections

* add padding

* fix themed text import

* update design and revise based on pr comments
2023-10-02 13:02:28 -04:00
Charles Bachmeier
f90f81b3d9 feat: add error message to wallet connect fail event (#7387) 2023-10-02 09:56:35 -07:00
Charles Bachmeier
81accd1864 feat: [info] Add Liquidity and Swap buttons on PDP (#7382)
* feat: setup initial pool details page and route

* add pool data query and call on enw page

* make query dynamic to url chainId

* Get and display Header info

* add token symbols

* split header into its own file

* add helper function to not default to eth chain

* add helper function tests

* add header component tests

* add mocked test for PDP

* use valid values

* allow unsupported BE chains supported by thegraph

* typecheck

* remove useless row

* no longer needed child

* use first and last child

* move mock consts to their own file

* skele linear task

* return null

* descriptiive pool not found bool

* modify correct logo container

* update snapshots

* instantiate all chain apollo clients

* added snapshot test

* merge main and update snapshots

* Update src/pages/PoolDetails/PoolDetailsHeader.tsx

Co-authored-by: Nate Wienert <natewienert@gmail.com>

* type feeTier

* setup init stats component

* correctly query pool data for t24, t48, and tWeek timestamps

* add comments

* sanitize pool data and update tests

* correct test data

* add todo

* lint

* show correct data

* remove logs

* use formatter

* showing colored bars

* styled graph

* get muted color

* refactor: move getColor to src

* refactor useColor to use getColor function

* remove consts

* refactor files

* 1st class var support courtesy of carter

* remove logging and adds comments

* mobile styling

* move Stats to its own file

* add test cases

* add test file

* update padding

* remove old test file

* respond to feedback

* right column wrapper

* add non-functional pdp buttons

* update tests

* add button functionality

* working tokenId for position

* split buttons in their own file

* add tests

* reduce screenshots

---------

Co-authored-by: Nate Wienert <natewienert@gmail.com>
2023-10-02 09:56:17 -07:00
eddie
524ce49fcb feat: dynamic defaultCurrencyCode for moonpay (#7383) 2023-10-02 09:48:55 -07:00
Kristie Huang
cbec108172 feat: add chains dynamicconfig for feature flags (#7389)
* feat: add feature flags dynamic config for chains

* fix

* add better chainid error checking

* quiet linter

* refactor & should be quick_route_chains only
2023-09-29 14:53:01 -04:00
eddie
3a4dc91e49 fix: wrap/unwrap activity parsing (#7384)
* fix: add unit test

* fix: re-use swap parse logic
2023-09-29 10:26:09 -07:00
Jack Short
af80079957 feat: remove buy button and landing terminology for uk (#7386)
* feat: remove buy button and landing terminology for uk

* removing tarballs

* mocked setup

* setting compliance to gb

* turning back on defaults

* cache for user

* moving to hook and grid sizing

* fixing tests

* comments

* landinage page cards

* cypress test

* removing extra store
2023-09-29 12:32:05 -04:00
Tina
c7a8e9e5a7 feat: Quick routes (#7348)
* wip, added PreviewTrade and now amending request arg type

* updates

* update logic to progress to swap review screen

* add token tax info to preview trades

* add loading component

* add feature flag and fix analytics and perf stuff

* update debounce amount

* add latencyMs measure

* change types

* add inline comments

* actually pass in feature flags

* dep array

* fix snapshot and unit tests

* fix unit tests

* update font color for loading text

* remove all chains feature flag

* remove from feature flag modal

* dont flicker review modal when allowance is loading

* remove comment

* add snapshot tests

* triple equals

* add comment

* change cast
2023-09-29 12:20:10 -04:00
eddie
e6362212c6 feat: uniswapx deadline (#7376)
* feat: uniswapX time-to-sign

* fix: animation timing

* fix: bug

* fix: improve props and remove memo
2023-09-28 10:52:35 -07:00
Charles Bachmeier
d63bdf1887 feat: [info] Add Stats Section to PDP (#7353)
* feat: setup initial pool details page and route

* add pool data query and call on enw page

* make query dynamic to url chainId

* Get and display Header info

* add token symbols

* split header into its own file

* add helper function to not default to eth chain

* add helper function tests

* add header component tests

* add mocked test for PDP

* use valid values

* allow unsupported BE chains supported by thegraph

* typecheck

* remove useless row

* no longer needed child

* use first and last child

* move mock consts to their own file

* skele linear task

* return null

* descriptiive pool not found bool

* modify correct logo container

* update snapshots

* instantiate all chain apollo clients

* added snapshot test

* merge main and update snapshots

* Update src/pages/PoolDetails/PoolDetailsHeader.tsx

Co-authored-by: Nate Wienert <natewienert@gmail.com>

* type feeTier

* setup init stats component

* correctly query pool data for t24, t48, and tWeek timestamps

* add comments

* sanitize pool data and update tests

* correct test data

* add todo

* lint

* show correct data

* remove logs

* use formatter

* showing colored bars

* styled graph

* get muted color

* refactor: move getColor to src

* refactor useColor to use getColor function

* remove consts

* refactor files

* 1st class var support courtesy of carter

* remove logging and adds comments

* mobile styling

* move Stats to its own file

* add test cases

* add test file

* update padding

* remove old test file

* respond to feedback

* right column wrapper

* update tests

---------

Co-authored-by: Nate Wienert <natewienert@gmail.com>
2023-09-28 09:27:29 -07:00
eddie
3bb55c6b5d fix: hide price when no amount input (#7379)
* fix: hide price when no amount input

* fix: snapshots
2023-09-27 10:47:16 -07:00
Kristie Huang
71212f7e32 fix: use sentence case for text (#7375) 2023-09-27 12:46:09 -04:00
eddie
731ff4a485 feat: user property git commit hash (#7378) 2023-09-26 13:37:08 -07:00
eddie
519ba8963a test: unit tests for parseRemote (#7359) 2023-09-26 13:36:56 -07:00
Jack Short
ec784ccb36 chore: updating input currency panel to handle comma separator (#7336) 2023-09-26 12:33:15 -05:00
Brendan Wong
20d8404717 fix: update polygon branding (#7190)
* update polygon branding

* Update matic-token-icon.svg
2023-09-25 12:11:12 -04:00
Jordan Frankfurt
809841df0a feat: new app provider w/ fallback behavior (#7205)
* feat: new app provider w/ fallback behavior

* progress

* update useContractX signer params

* Revert "update useContractX signer params"

This reverts commit 386d1580df.

* extend jsonrpcprovider

* add mainnet quicknode example, use old staticJsonRpc extension

* add tests

* unit testing

* fixes to tests/tsc

* Update src/state/routing/gas.ts

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* pr review

* e2e tests should only talk to the chain via connected wallet

* Revert "e2e tests should only talk to the chain via connected wallet"

This reverts commit 0ce76eb7e4.

* add charlie's null nit

* fix e2e

* add feature flag

* Update cypress/support/setupTests.ts

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* pr review

* pr feedback

* fix tests

* add generic send test

* fix merge error

* add a failure rate calculation and inline comments on scoring algo w/ an example

* fix sort test

* cleaner provider creation

* simplify sort

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-09-22 14:05:27 -05:00
Tina
2dc5a6efb4 fix: Remove e2e test (#7369)
* remove now untrue test

* add test about missing stats
2023-09-22 11:35:54 -07:00
eddie
7cd72a706d feat: show usd price with no input amount (#7328)
* feat: show usd price with no input amount

* fix: snapshots

* fix: make tokens undefined only - no null

* fix: readability

* fix: syntax improvements
2023-09-22 10:31:23 -07:00
Kristie Huang
4f8956f79a fix: should show slippage/deadline on LP flow settings (#7367)
* fix: should show slippage/deadline on LP flow settings

* write unit tests & update

---------

Co-authored-by: Kristie Huang <kristie.huang@uniswap.org>
2023-09-22 13:12:32 -04:00
Charles Bachmeier
beef7f2d86 feat: Condense color extraction logic and improve fallback (#7347)
* refactor: move getColor to src

* refactor useColor to use getColor function

* remove consts

* refactor files

* clean up color convert fn

* move getColor test and import test images

* hardcode array buffers for images

* add invalid png
2023-09-22 10:09:05 -07:00
Zach Pomerantz
b667662b49 fix: lazy load nft profile (#7361) 2023-09-22 10:08:22 -07:00
Zach Pomerantz
ed87df6269 feat: account suspense (#7337)
* feat: eagerly connect outside of react lifecycle

* test: reflect selected wallet in localStorage

* test: spy only on portfolio balances

* feat: connectionReady

* feat: connecting state

* feat: leave space for address

* fix tests

* better meta

* fix

* fix wallet change

* add interactivity earlier

* add validation

* update localstorage key in cypress setup

* even less thrash

* load per account

* simplify, hopefully

* explanatory

* inf render

* whoopsie

* ordering
2023-09-22 09:57:35 -07:00
Charles Bachmeier
622c72d4a8 feat: [info] Migrate Historical Pool Data Queries (#7310)
* correctly query pool data for t24, t48, and tWeek timestamps

* add comments

* sanitize pool data and update tests

* correct test data

* add todo

* lint

* remove logs

* 1st class var support courtesy of carter

* remove logging and adds comments
2023-09-22 09:47:25 -07:00
eddie
df6c44d2c4 fix: use Date as a performance tracker fallback (#7349) 2023-09-22 09:40:25 -07:00
eddie
59e7a2867a fix: ui fixes on the add liquidity flow (#7352) 2023-09-22 09:40:10 -07:00
eddie
0a31428d7a feat: uniswapX opt-out update (#7368) 2023-09-22 09:38:47 -07:00
Zach Pomerantz
fbc7e64032 chore: prohibit barrels (#7362)
* chore: prohibit barrels

* lint

* lint

* more lint

* add motivation to eslint message
2023-09-21 19:38:17 -07:00
eddie
4a8fb760d2 fix: show common bases on mobile (#7365)
* fix: show common bases on mobile

* test: add unit tests
2023-09-21 13:26:59 -07:00
eddie
15c510b742 fix: reset LDO approvals (#7345)
* fix: reset LDO approvals

* fix: constant file, better name

* Update src/components/swap/constants.ts

Co-authored-by: Charles Bachmeier <charles@bachmeier.io>

---------

Co-authored-by: Charles Bachmeier <charles@bachmeier.io>
2023-09-21 13:03:25 -07:00
eddie
e81b0a4d1f test: unit tests for activity tab createGroups, and update cloud test snapshots (#7364)
* test: unit tests for activity tab createGroups

* fix: update cloud test snapshots
2023-09-21 12:03:10 -07:00
Zach Pomerantz
b9fc65ec9a feat: lazy-load safe only if iframed (#7360) 2023-09-21 11:31:38 -07:00
Zach Pomerantz
d73c368ee4 fix: defer popper style recalc until use (#7330) 2023-09-21 11:29:43 -07:00
Zach Pomerantz
5e1c430657 build: improve tree-shaking (#7325)
* build: improve tree-shaking

* dedup terser
2023-09-21 11:29:22 -07:00
eddie
d4f19e42f8 feat: log chain changed (#7350) 2023-09-20 14:58:28 -07:00
cartcrom
60593df077 refactor: price chart organization (#7304)
* refactor: implement chart model type

* refactor: move PriceChart component into charts folder

* refactor: relocate pricechart test file

* lint

* fix: pr comments

* fix: use formatter hook in price chart file
2023-09-20 15:58:41 -04:00
Nate Wienert
aeef2c2356 fix: Fix visual issues in Spore (#7240)
* feat: make meta theme-color adapt to new spore background colors

* fix: make glow behind swap modal use a blur strategy rather than box shadow for a more squared glow

* test: grainy bg

* fix: make pool liquidity add input focus border same as swap

* remove svg grain
2023-09-20 09:44:25 -10:00
Zach Pomerantz
54880d201a feat: eagerly connect outside of react lifecycle (#7334)
* feat: eagerly connect outside of react lifecycle

* test: reflect selected wallet in localStorage

* test: spy only on portfolio balances
2023-09-20 12:31:54 -07:00
Zach Pomerantz
0f6581bf47 fix: preconnect (#7340) 2023-09-20 12:30:20 -07:00
Zach Pomerantz
37c3330897 fix: wait to fetch lists until rehydration (#7332) 2023-09-20 09:40:57 -07:00
Zach Pomerantz
7a981923f6 fix: do not re-init active locale (#7329) 2023-09-20 09:32:50 -07:00
Brendan Wong
9672c2db9a fix: remove settings button from lp page (#7105)
remove settings button from lp page
2023-09-19 14:16:46 -07:00
Charles Bachmeier
13f57d8d73 feat: block dynamic link previews for blocked collections (#7344)
* feat: block link previews for blocked collections

* update collection test

* single invalid

* move blocklist to its own const file

* rename file to blocklist
2023-09-19 11:07:07 -07:00
Charles Bachmeier
43f4d0f1b0 chore: block requested collection (#7342) 2023-09-19 08:06:58 -07:00
Zach Pomerantz
19c83c92ab test: spy only on portfolio balances (#7335) 2023-09-19 07:59:21 -07:00
Jack Short
91c2013522 chore: only exposing useFormatter (#7308) 2023-09-18 20:21:21 -04:00
eddie
cf09e80934 fix: fetch balances when opening token selector in LP page (#7321)
* fix: fetch balances when opening token selector in LP page

* fix: move PrefetchBalancesWrapper
2023-09-18 14:49:39 -07:00
Zach Pomerantz
ad9879b4f9 fix: avoid scrollTo on pageload (#7323) 2023-09-18 13:09:01 -07:00
Zach Pomerantz
c528c6169e fix: block number memoization (#7331) 2023-09-18 13:08:51 -07:00
Zach Pomerantz
33c93b5ded fix: spurious Swap re-renders (#7333) 2023-09-18 13:08:37 -07:00
Charles Bachmeier
5ba046f111 feat: remove overlay cutoff (#7322) 2023-09-18 11:59:01 -07:00
Callil Capuozzo
5414a7c7ef fix: [Spore] polish search (#7297)
* Polish search bar styles

* fix hover state

* Change background to surface1

* update tests

* Update styles
2023-09-16 10:22:38 -04:00
Zach Pomerantz
22fd0cc7bb build: fix sourcemap warnings (#7318) 2023-09-15 19:41:38 -07:00
Kristie Huang
784fbfe7b1 test: add remove-liquidity interface tests (#7309)
* fix: duplicate or single-token remove-liquidity routes should show error page

* use maxUint256 for nonexistent pool

* move tests back to rem-liq

* rename pooled token id

* nit: use uni address from sdk core

* nit: use maxuint256 from sdk core

* nit: use liqudityValue for doublecurrencylogo

---------

Co-authored-by: Kristie Huang <kristie.huang@uniswap.org>
2023-09-15 16:05:56 -04:00
Zach Pomerantz
f47d00be37 feat: lazy-load popups/modals/chrome (#7313)
* fix: synchronously load first page

* feat: lazy-load popups/modals/chrome
2023-09-15 12:40:19 -07:00
Tina
2eb145ab80 feat: Add intent to swap quote request (#7245)
add intent to swap quote
2023-09-15 15:30:22 -04:00
Zach Pomerantz
adaa7f1a0d feat: lazy-load smart-order-router (#7317) 2023-09-15 12:24:00 -07:00
Zach Pomerantz
2506c95816 feat: lazy-load non-swap routes (#7315)
* feat: lazy-load non-swap routes

* retain swap nav location
2023-09-15 12:10:01 -07:00
Jack Short
6303293037 chore: updating all numbers in swap flow to be converted properly (#7301)
* format price impact

* format price

* adding confirm swap modal

* removing export

* adding export back

* correct active currency

* activeLocalCurrencyIsUSD

* fallback to usd if no conversion rate for previous
2023-09-15 14:42:30 -04:00
Matthew Spector
185cb52501 chore: Remove Hardcoded Uni Wallet Supported Chains List (#7320) 2023-09-15 11:04:32 -07:00
Zach Pomerantz
92cf5b42c0 fix: lazy-load web3-react libs (#7319) 2023-09-15 10:28:06 -07:00
Nicolas Brugneaux
ea45289460 feat: replace cMC02 by WBTC in the celo tokens (#7244) 2023-09-15 11:38:53 -05:00
Zach Pomerantz
7f81073037 fix: synchronously load first page (#7312) 2023-09-14 17:50:48 -07:00
eddie
ac9a6f0398 fix: v2 pool ui (#7316)
* fix: v2 pool ui

* fix: use one wrapper
2023-09-14 14:51:39 -07:00
eddie
172160deb5 feat: improved logging 9 12 (#7306)
* feat: add chain id and update name

* log metamask version

* fix: tests
2023-09-14 12:03:14 -07:00
Nate Wienert
7fc005024d fix: ci added CODEOWNERS github format (#7285)
* fix: ci added CODEOWNERS github format

* Update .github/workflows/1-main-to-staging.yml

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-09-14 07:59:28 -10:00
Nate Wienert
05ba0e4a66 fix: make popups appear above drawer and near top conditionally only … (#7201)
* fix: make popups appear above drawer and near top conditionally only when drawer is open

* remove logic around top bar
2023-09-14 07:49:59 -10:00
Jordan Frankfurt
5c53d8237d test: update cloud test snapshots (#7311)
fix: -u on cloud tests
2023-09-14 12:27:58 -05:00
cartcrom
6aaf0db78d refactor: price chart utility functions (#7266)
* refactor: price chart utility functions

* fix: snapshot

* fix: combine useMemos

* fix: pr nits
2023-09-14 13:13:17 -04:00
eddie
1c3ce8fdb7 fix: remove GA code (#7303)
* feat: move ga events to amplitude

* fix: remove GA code
2023-09-12 13:23:49 -07:00
eddie
3e05db4b87 feat: check chain ID before all transactions (#7177)
* feat: check chain ID before all transactions

* fix: use WrongChainError

* fix: remove asyncs
2023-09-12 11:20:06 -07:00
eddie
a9b2179eab feat: move ga events to amplitude (#7300)
* feat: move ga events to amplitude

* fix: add deets to add events
2023-09-12 10:28:12 -07:00
Callil Capuozzo
0fffff66dc fix: [Spore] general polish items (#7302)
* Add polish notes

* Polish balances

* update gap in mini portfolio names
2023-09-11 19:37:31 -04:00
eddie
1316a45c7a fix: zustand, migrate to createWithEqualityFn (#7220) 2023-09-11 16:06:36 -07:00
Charles Bachmeier
dcf7d29357 feat: [info] Initial Pool Details Page (#7250)
* feat: setup initial pool details page and route

* add pool data query and call on enw page

* make query dynamic to url chainId

* Get and display Header info

* add token symbols

* split header into its own file

* add helper function to not default to eth chain

* add helper function tests

* add header component tests

* add mocked test for PDP

* use valid values

* allow unsupported BE chains supported by thegraph

* typecheck

* remove useless row

* no longer needed child

* use first and last child

* move mock consts to their own file

* skele linear task

* return null

* descriptiive pool not found bool

* modify correct logo container

* update snapshots

* instantiate all chain apollo clients

* added snapshot test

* merge main and update snapshots

* Update src/pages/PoolDetails/PoolDetailsHeader.tsx

Co-authored-by: Nate Wienert <natewienert@gmail.com>

* type feeTier

---------

Co-authored-by: Nate Wienert <natewienert@gmail.com>
2023-09-11 14:48:16 -07:00
Jack Short
184d515e16 chore: formatter to use local currency price (#7273)
* chore: updating formatCurrencyAmount to handle multiple langs and currencies

* missed advanced swap details

* missed confirmed swap modal

* removing updating visual effects

* removing it from parseLocale

* chore: displaying local currency and language formatting

* making effects visible

* moving to hook

* useFormatCurrencyAmount

* moving it to useformatter hook

* exporting formatting locales

* missed one parsed remote

* initial passover of using conversion rate in formatting function

* moving hook to bottom of file

* moving to bottom

* moving to bottom

* fallback to usd

* refactors

* better fallback protection

* moving to function

* fixing typecheck
2023-09-11 14:42:48 -04:00
Jack Short
86e4dd5153 chore: updating formatCurrencyAmount to handle multiple langs and cur… (#7263)
* chore: updating formatCurrencyAmount to handle multiple langs and currencies

* missed advanced swap details

* missed confirmed swap modal

* removing updating visual effects

* removing it from parseLocale

* chore: displaying local currency and language formatting

* making effects visible

* moving to hook

* useFormatCurrencyAmount

* moving it to useformatter hook

* exporting formatting locales

* missed one parsed remote

* moving hook to bottom of file

* moving to bottom
2023-09-11 13:51:11 -04:00
cartcrom
e4d103b015 refactor: price chart timestamps (#7265)
* refactor: price chart timestamps

* fix: remove unnused file

* refactor: util file name

* fix: use correct var for axis

* refactor: use backup var instead of throwing error for timeMinute interval
2023-09-11 13:16:30 -04:00
eddie
f71c781530 fix: add tax amounts to swap quote received (#7299) 2023-09-11 10:15:02 -07:00
Jack Short
736e395cd7 chore: displaying local currency and language formatting (#7267)
* chore: displaying local currency and language formatting

* moving to hook

* moving it to useformatter hook

* moving hook to bottom of file
2023-09-11 13:13:49 -04:00
Jack Short
8021135879 chore: remove extra blocknumber from dep array (#7295) 2023-09-11 12:29:39 -04:00
Tina
acdeb402ec feat: Log auto slippage setting for gas estimate failed event (#7231)
* log auto slippage setting for gas estimate failed

* add to dep array
2023-09-11 08:41:31 -07:00
eddie
84f5d8f94d fix: only log swap success for swap txs (#7284) 2023-09-08 12:03:59 -07:00
cartcrom
bb28235bee refactor: consolidate price delta components (#7268)
* refactor: move delta component out of price chart file

* refactor: remove PortfolioArrow

* refactor: search row arrow cell

* fix: svg prop + snapshots failing unit tests

* refactor: css nit
2023-09-08 14:58:39 -04:00
cartcrom
f69226c1d1 fix: use updated feature flag (#7278) 2023-09-08 14:42:03 -04:00
cartcrom
35ca1b974e fix: remove sentry warnings for failed tax fetches (#7281) 2023-09-08 14:41:47 -04:00
Nate Wienert
fdb9d8a8c9 feat: redirect /address links to the wallet download landing page or app store (#7210) 2023-09-08 08:33:21 -10:00
Zach Pomerantz
16cefb9cdb test: fix cloud tests (#7280) 2023-09-08 10:53:22 -07:00
Zach Pomerantz
63bf1c0ac8 feat: path-based routing (#7275) 2023-09-08 10:43:59 -07:00
Nate Wienert
44e3b87ae1 fix: CODEOWNERS to use GitHub syntax currently uses google (#7200)
* improve cypress test

* fix: CODEOWNERS uses Github syntax
2023-09-08 07:22:52 -10:00
eddie
a3fbab9163 feat: uniswapx start time buffer (#7279)
* wip

* feat: use startTimeBufferSecs from API response
2023-09-08 09:30:57 -07:00
cartcrom
1ac1002c37 fix: fot ui bug in swap details dropdown (#7277)
* init

* fix: completely hide tax rows while syncing

* test: use syncing = false for fot tests
2023-09-08 10:27:18 -04:00
eddie
08e0fb7f4b fix: replace base rpc urls with public rpcs (#7259)
* fix: replace base rpc urls with public rpcs

* fix: designation of safe vs fallback

* fix: remove duplicate
2023-09-07 13:56:30 -07:00
eddie
24d62d9594 feat: uniswapX default feature flag (#7246)
* feat: uniswapX default feature flag

* fix: bad merge

* fix: toggle behavior and style issues

* fix: toggle behavior
2023-09-07 12:52:24 -07:00
cartcrom
28ea390863 fix: gate FOT UI (#7272)
* fix: gate FOT UI in swap component

* feat: help article
2023-09-07 14:18:04 -04:00
eddie
4ba0d8ffc0 test: unit tests for swapFlowLoggers (#7257) 2023-09-07 10:07:56 -07:00
Jordan Frankfurt
7306423192 fix: eliminate flake from account connect race condition (#7212)
* fix: reduce flake from race condition

* use interface instead of type for props

* closeMenu instead of closeModal with type

* simplify useCloseModal

* fix bug

* pr feedback

* remove unnecessary code

* fix button wrapper style

* remove ApplicationModal.WALLET

* update color for spore
2023-09-06 17:52:47 -05:00
Zach Pomerantz
147a9bcbb2 fix: move off deprecated gql fields (#7269) 2023-09-06 13:48:02 -07:00
Charles Bachmeier
652a8305c8 feat: add BNB support to Token Search and Explore (#7223) 2023-09-05 10:57:21 -07:00
Jack Short
80a77dd567 fix: typecheck failing on main (#7264) 2023-09-05 13:54:19 -04:00
Jack Short
5951d0c40c feat: adding currency conversion hook to useUSDPrice (#7251)
* feat: adding currency conversion hook

* 5m cache policy

* conversion rate hook

* usd check in outer hook

* converting usd price to localcurrencyprice

* checking usd manually
2023-09-05 13:38:33 -04:00
Jack Short
60acc689ee chore: updating numberFormat for other currencies and languages (#7239)
* adding currency settings option

* moving menu item to shared component

* adding supported currencies

* currency menu items

* currency url params

* currency selector e2e tests

* fixing tests

* currency icons

* removing eslint

* removing another eslint disable

* renaming to local currency

* more name changes

* design updates

* adding currencies

* changing formatter rules to formatter options

* renaming file

* fixing lint

* custom currency symbol in number formatting

* refactoring input to number formatter

* locale selection

* updating all format numbers with currency and locale

* updating portfolio

* better formatting symbols

* removing adding locale and currency

* upgrading constants to be translatable

* refactoring

* adding tests

* updating comment

* removing 0 from hardcoded input and comment
2023-09-05 12:59:43 -04:00
Charles Bachmeier
cd520a9e2c refactor: add source to subgraph queries (#7253)
* feat: add source to subgraph queries

* update test
2023-09-05 08:44:57 -07:00
cartcrom
b6e388c68c feat: dynamic FOT tax fetching (#7252)
* feat: disable exact_output FOT swaps

* fix: pr comments

* test: update snapshots

* feat: dynamically fetch tax rates

* remove tax constants file

* test: update useRoutingAPITrade expected args

* fix: useSwapTaxes nits

* lint: useSwapTaxes dependency array
2023-09-01 14:56:26 -04:00
cartcrom
45a138dec1 fix: detect refunds on exact_out native swaps (#7227)
* fix: detect refunds on exact_out native swaps

* fix: correct comment
2023-09-01 14:55:42 -04:00
cartcrom
26d2ab53e8 feat: disable exact_output FOT swaps (#7237)
* feat: disable exact_output FOT swaps

* fix: pr comments

* test: update snapshots
2023-09-01 14:23:21 -04:00
gnewfield
e50ecc8309 fix: un-nest translation on AddLiquidityV2 page (#7258)
fix nested translation components causing translation error
2023-09-01 13:05:49 -04:00
eddie
406d7fe964 feat: remove dead statsig flag (#7229)
* feat: remove dead statsig flag

* fix: e2e test
2023-08-30 13:08:18 -07:00
eddie
366f4d98ef fix: remove unused feature flags (#7234)
* fix: remove unused feature flags

* fix: remove flag from tests

* fix: tests

* fix: remove useUniswapX param
2023-08-30 12:37:50 -07:00
Jack Short
4eda18a4d5 feat: currency selector (#7196)
* adding currency settings option

* moving menu item to shared component

* adding supported currencies

* currency menu items

* currency url params

* currency selector e2e tests

* fixing tests

* currency icons

* removing eslint

* removing another eslint disable

* renaming to local currency

* more name changes

* design updates

* renaming file

* fixing lint

* Update src/components/AccountDrawer/SettingsMenu.tsx

Co-authored-by: Charles Bachmeier <charles@bachmeier.io>

* alphabetical ordering currencies

* column padding

* padding only for mobile

* memoizing into switch

---------

Co-authored-by: Charles Bachmeier <charles@bachmeier.io>
2023-08-30 14:48:53 -04:00
eddie
ea66b8b959 fix: null check in lists code (#7248) 2023-08-30 11:41:40 -07:00
Charles Bachmeier
1eab4291f6 refactor: log NO_ROUTE found instead of paging (#7242)
* refactor: log no route found instead of paging

* typo

* log router preference

---------

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2023-08-29 13:59:51 -07:00
eddie
bed144b994 fix: remove base goerli from chain selector (#7238)
* fix: remove base goerli from chain selector

* fix: remove all base goerli references

* fix: typecheck
2023-08-29 13:25:10 -07:00
Charles Bachmeier
dac334f975 feat: add info site migration feature flags (#7228)
* feat: add info site migration feature flags

* feat: feature flag modal improvements

* scrollbar padding

* button padding
2023-08-28 13:13:31 -07:00
Charles Bachmeier
5478cb0c7b feat: useUSDPrice for nft eth usd price (#7232)
* feat: useStableCointValue for nft eth usd price

* add new file

* useUSDPrice

* rename
2023-08-28 09:09:30 -07:00
Nate Wienert
b47cebd40b fix: Spore color fixes (#7233)
* fix: bridge chain popup line break

* fix: background initial gradient to match the default ETH bg for light and dark mode
2023-08-25 11:43:26 -10:00
Tina
bb51be545b feat: Support UniswapX exact out trades (#7225)
* add feature flag for uniswapx exact out trades

* dont route PRICE lookups through uniswapx

* add e2e test
2023-08-25 15:00:22 -04:00
Charles Bachmeier
ce8105bf08 feat: track connected wallet provider calls to be replaced with BE/infura (#7197)
* feat: track connected wallet provider calls to be replaced with be/infura

* update analytics events

* wrap analytics events in useEffects

* Update src/hooks/useContract.ts

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>

---------

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
2023-08-25 09:51:56 -07:00
Nate Wienert
59db4c5b02 feat: Spore colors refresh (#7118)
* Add colors and type and fix everywhere

* fix text.tsx

* Color and text adjustments

* Further tweaks

* Removed promotional gradient

Changed to pink

* Add new icons and tweak broken colors

* Kill shadows

Removes shadows from NFT cards, Pools and Tokens tables

* Update icons

Update filled and info icons to filled versions

* Update bag icon

Changed to fill style

* Change share icon

Changed to the new filled arrow

* Fix merge errors

* update tests

* Complete find and replace old colors

* Fix colors on pool pages

* Update index.test.tsx.snap

* fix header hover states

* update test

* Update connect button hover state

* Update styles design bash

* Update tests

* Update fonts

* fix buy button font weight

* update tests

* fix jumping input boxes

* lint

* lints

* update tests

* redo auth header

* fix issues

* fix snapshots

* use individual weights instead of variable for nicer $ signn

* update tests

* make dark mode glow distinct

* remove commented out code

* icons in react

* update textSecondary

* fix feedback

* port over token test fix

* lint

* fix: make popups appear above drawer and near top conditionally only when drawer is open

* Revert "fix: make popups appear above drawer and near top conditionally only when drawer is open"

This reverts commit 9946971443.

---------

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
Co-authored-by: pp-hh-ii-ll <111304124+pp-hh-ii-ll@users.noreply.github.com>
Co-authored-by: Callil Capuozzo <callil@uniswap.org>
2023-08-24 17:14:24 -10:00
Jack Short
1f6f1f1dbd fix: smart contract wallets unsupported (#7226)
* fix: smart contract wallets unsupported

* logging to amp

* response was deleted
2023-08-24 16:56:07 -04:00
cartcrom
1c142bb71f feat: workaround for FOT swaps (#7218)
* fix: workaround to include tax in slippage tolerance

* refactor: simplify tax line item components

* docs: update FOT comments

* fix: simplify tax calculation logic

* docs: update comment and add TODO

* fix: use postTaxAmountOut for price change calculation

* fix: use preTaxStablecoinPriceImpact for swab button warnings

* test: unit test for swap details/modal

* feat: add feature flag to gate FOT changes

* docs: add comment to postTaxOutputAmount getter

* fix: reword fee tooltip

* refactor: warning theme color variable usage

* fix: update snapshots

* fix: use preTaxStablecoinPriceImpact for price impact prompt logic

* lint: dependency array
2023-08-24 10:56:48 -04:00
eddie
3e67982bb4 fix: reset USDT logic (#7219) 2023-08-23 16:09:07 -07:00
Charles Bachmeier
bb79c73416 feat: add sentry monitoring for NO_ROUTE error (#7204)
feat: add sentry monitoring for no_route error
2023-08-23 14:59:26 -07:00
Jordan Frankfurt
b1da7d87f9 fix: proposal creation layout on safari (#7203)
* fix: proposal creation layout on safari

* add important to header margin
2023-08-23 16:06:24 -05:00
Jordan Frankfurt
a79324f23c fix: repair broken link (#7198) 2023-08-23 16:06:09 -05:00
Jordan Frankfurt
9008db5166 fix: add v2 to lp importer link (#7199) 2023-08-23 15:58:09 -05:00
eddie
bcc57e4612 fix: null check on elapsedTime for some browsers (#7213) 2023-08-23 10:53:51 -07:00
eddie
8c7315760a fix: make WrongChainError more specific (#7175)
* fix: setTraceError in swap callback

* fix: move error class to util file
2023-08-23 09:30:51 -07:00
Jordan Frankfurt
290083b414 fix: isolate assertions into single tests (#7209) 2023-08-22 16:34:29 -05:00
cartcrom
4bc778ff3e feat: add client and router blocknumbers to analytics (#7170) 2023-08-22 16:03:23 -04:00
Jordan Frankfurt
49ae6ef6bd fix: ensure lists are present before running update (#7206)
* fix: ensure lists are present before running update

* pr input from zzmp
2023-08-22 14:52:59 -05:00
Nate Wienert
3dab1da5ea fix: cypress flaky token details test (#7193)
improve cypress test
2023-08-21 08:46:08 -10:00
Jack Short
6ec9bb7362 chore: moving conedison/provider to interface (#7119)
* chore: moving provider from coned to interface

* moving signing over to interface

* updating lockfile

* dedup

* use d3-array build for jest

* downgrading jest/types

* Revert "downgrading jest/types"

This reverts commit 88d3746c00.
2023-08-18 16:26:08 -04:00
Brendan Wong
31d0c3c9b3 fix: reorganize chain priority (#7189)
reorganize chain priority
2023-08-18 15:39:42 -04:00
Zach Pomerantz
88b7acf3ae feat: use cache while debouncing quotes (#7188)
* feat: check cache before debouncing quote

* feat: use cached values if available

* fix: initial loading state

* fix: no transition to loading

* chore: return skipToken from args

* test: update snapshots

* fix: add back stale state
2023-08-18 12:36:24 -07:00
eddie
877e000da6 feat: swap quote event (#7174)
* wip: more metrics

* wip: SWAP_INPUT_FIRST_USED

* feat: track elapsed times

* feat: add e2e test

* fix: order of logging

* feat: swap quote request logging

* feat: e2e test

* feat: another property

* test: test events separately

* fix: dont log for price quotes
2023-08-18 11:47:45 -07:00
Jack Short
3f05a88409 chore: revert path based routing (#7192)
* Revert "feat: use router depending on the origin (#6982)"

This reverts commit c9b4016b78.

* updating tests

* fixing import from styled components

* fixing styled imports
2023-08-18 14:40:47 -04:00
Zach Pomerantz
03ab5c80a8 feat: prefetch eth price for swap currencies (#7187)
* feat: prefetch eth price for swap currencies

* chore: clarify namings
2023-08-18 10:47:14 -07:00
Jordan Frankfurt
4faaa60aea chore: update web3-react (#7158)
* chore: update web3-react

yarn deduplicate

* catch .warn warnings
2023-08-18 11:31:50 -05:00
Zach Pomerantz
3a94a99293 fix: debouncing as a loading state (#7183)
fix: consider debouncing as loading state
2023-08-17 17:35:54 -07:00
Brendan Wong
e893bc2685 fix: make line height bigger for token preview (#7186)
* make line height bigger

* Update [[index]].tsx
2023-08-17 17:20:18 -04:00
Brendan Wong
cccf6ac680 fix: add assets to public folder (#7153)
* fix: add assets to public folder

* Update global-teardown.ts

* update assets

* resize logos
2023-08-17 16:15:17 -04:00
Jack Short
ea5af12b1d chore: moving language selection to own settings panel (#7169)
* chore: moving language selection to own settings panel

* auto switch when close

* updating e2e

* clickable style

* moving behind feature flag

* fixing tests

* this looks nicer

* nowrap for overflow
2023-08-17 16:05:18 -04:00
eddie
bf1f613a4f fix: network connector fix and lists fix (#7185) 2023-08-17 12:29:34 -07:00
Brendan Wong
49f1acb52a fix: displays price when not updated on TDP (#7068)
* Update PriceChart.tsx

* simplify deltaarrow function

* update text coloring

* increase gap a bit more

* rename tags

* restyling of information

* fix import issue

* Update src/components/Tokens/TokenDetails/PriceChart.tsx

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>

* unit testing!

---------

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
2023-08-17 14:27:16 -04:00
Jordan Frankfurt
a97005e2e1 feat: dedupe on commit (#7171)
* feat: dedupe on commit

* run existing script
2023-08-17 12:58:35 -05:00
Brendan Wong
966b02b2de fix: add distance check from white for token rich link previews (#7152)
* feat: lower white levels if too close

* testing and parameterization

* Update getColor.ts

* Update getColor.test.ts

* Update getColor.ts

* Update getColor.test.ts

* Update getColor.test.ts
2023-08-17 13:30:58 -04:00
eddie
024bbce9a4 feat: more swap metric logging (#7173)
* wip: more metrics

* wip: SWAP_INPUT_FIRST_USED

* feat: track elapsed times

* feat: add e2e test

* fix: order of logging

* fix: nits
2023-08-17 10:16:51 -07:00
Brendan Wong
c960c14170 fix: update default rich link preview image (#7176)
Update 1200x630_Rich_Link_Preview_Image.png
2023-08-17 12:05:52 -04:00
Zach Pomerantz
39295e9a33 feat: add real paths to app site association (#7179) 2023-08-17 09:05:10 -07:00
Brendan Wong
0feddebcc3 feat: add CodeCov to cloud tests (#7154)
* feat: add CodeCov to cloud tests

* Update codecov.yml

* Update codecov.yml

* get cov to 80%

* remove unneeded test
2023-08-17 11:30:56 -04:00
Thomas Thachil
5e4108fbdc chore(): deeplink fingerprint update (#7181) 2023-08-17 10:30:25 -04:00
eddie
38cce46c7b feat: redux migration (#6830)
* feat: start working on redux migrations

* feat: fix migations and add tests

* feat: fix persistence and improve tests

* fix: tests

* fix: rename test file so it doesnt run in jest

* fix: tests

* fix: lint

* feat: indexedDB

* fix: e2e tests

* fix: address some comments

* fix: update legacy migrations

* fix: fix rehydrations

* fix: remove PersistGate and fix e2e tests

* fix: add comment to helper function
2023-08-16 10:56:06 -07:00
Nate Wienert
69ae42f285 fix: broken spacing in tokens fixture (#7168) 2023-08-16 07:36:15 -10:00
cartcrom
ef9619b1bd test: uniswapx e2e activity (#7137)
* test: e2e uniswapX toggle/opt-in tests

* fix: update visit to match new version of hardhat

* test: e2e gouda orders

* fix: remove swapping before allowance has loaded

* refactor: opt-in rather than toggle

* fix: test comment

* test: uniswapx activity

* fix: lint and small pending hook refactors

* test: e2e UniswapX orders (#7110)

* test: e2e gouda orders

* fix: remove swapping before allowance has loaded

* refactor: opt-in rather than toggle

* fix: test comment

* fix: PR nits
2023-08-15 15:02:24 -04:00
cartcrom
041f3d5ba2 test: e2e uniswapX toggle/opt-in and order tests (#7067)
* test: e2e uniswapX toggle/opt-in tests

* fix: update visit to match new version of hardhat

* test: e2e UniswapX orders (#7110)

* test: e2e gouda orders

* fix: remove swapping before allowance has loaded

* refactor: opt-in rather than toggle

* fix: test comment

* fix: PR nits
2023-08-15 14:50:08 -04:00
Charles Bachmeier
666bb79833 fix: test id based on address & chain instead of ticker (#7167)
* fix: test id based on address instead of ticker

* add chain to test id

* use token address

* lowercase
2023-08-15 11:22:20 -07:00
Charles Bachmeier
2736d94432 feat: Add base support to Explore & Search (#7165)
* filter search results

* feat: add full base TDP support

* add base to uni wallet supported chains
2023-08-15 10:12:33 -07:00
eddie
57b098f309 feat: swap quote latency logging (#7143)
* feat: swap quote latency

* feat: measure quote latency

* feat: swap quote latency

* fix: improve variable name
2023-08-14 14:20:03 -07:00
Tina
c802132bd5 feat: bump version of uniswapx-sdk for eth output trades (#7160)
bump ver
2023-08-14 17:08:31 -04:00
Nate Wienert
485764fe38 feat: improve logic around hidden section of mini-portfolio balances spam tokens (#6988) 2023-08-14 11:06:40 -10:00
Brendan Wong
51dc10b467 fix: remove flakey tests from cloud functions and overall deflake (#7156)
* fix: remove flakey tests

* increase setup time

* reduce max workers

* Update .github/workflows/test.yml

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update functions/global-setup.ts

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update global-teardown.ts

* add retry time

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-08-14 16:50:49 -04:00
Tina
7cf768b8dd chore: feature flag cleanup for routing_api_price (#7159)
feature flag cleanup
2023-08-14 16:28:01 -04:00
eddie
59b5e81d16 feat: add chainId to SWAP_TRANSACTION_COMPLETED (#7094)
* feat: add chainId to swap_tx_completed

* feat: time_to_sign

* test: add tests for SignedTransactionTimestampRegistry

* fix: remove time_to_sign
2023-08-14 13:26:51 -07:00
Brendan Wong
8fc98abb1a fix: margins for nav on mobile (#6908)
* fix margins for nav

* fix spacing on mobile

* Revert "fix spacing on mobile"

This reverts commit c87791669a.

* update css for minis
2023-08-14 15:27:39 -04:00
Tina
def4ab3bc0 feat: add time to sign analytics (#7140)
* add time to sign analytics

* move comment
2023-08-14 14:13:38 -04:00
Jack Short
bb6de9056b fix: token margin in searchbar (#7155)
fix: token margin is searchbar
2023-08-14 13:59:45 -04:00
Tina
cc52da9fc4 fix: Remove double client side quoting (#7121)
* remove double client side quoting

* remove additional file

* remove file

* remove file

* MOVE YET ANOTHER FILE

* remove unused tokens

* fix export

* remove unused token constant and swap out for wbtc
2023-08-11 19:25:57 -04:00
Brendan Wong
b98e62cac8 fix: remove description from custom rich link previews (#7142)
* fix: remove description from custom rich link previews

* add static assets to prepare for prep

* remove added assets
2023-08-11 18:53:48 -04:00
Brendan Wong
6cd1f04584 fix: remove lowering opacity for token previews (#7145)
Update [[index]].tsx
2023-08-11 18:32:16 -04:00
cartcrom
8ffe4e991b fix: properly display FOT swaps (#7146) 2023-08-11 18:19:28 -04:00
eddie
2b85852a48 fix: fail UR transaction if chain IDs don't match (#7150)
* fix: verify UR deployed

* fix: dont fallback to 1

* fix: dont instantiate contract

* fix: use chainId instead

* fix: compare chainIds
2023-08-11 18:15:35 -04:00
Nate Wienert
94015b279c fix: fix jest breaking with new swc setting (#7149) 2023-08-11 13:53:48 -07:00
Jack Short
1291887049 chore: add to blocked nft infringing collections (#7125) 2023-08-11 14:53:10 -04:00
Nate Wienert
d4a26a5610 fix: make swc not break WalletConnect by targeting a newer version of es (#7139) 2023-08-11 07:57:55 -10:00
Jack Short
1249371397 feat: currency conversion feature flag (#7123)
* feat: currency conversion feature flag

* removing eslint
2023-08-11 13:13:17 -04:00
Brendan Wong
2ce7b08244 feat: custom colors for rich link previews (#7141)
* add custom color logic

* increase timeout
2023-08-11 12:27:46 -04:00
Tina
156254afa9 feat: Upgrade uniswapx-sdk for eth output (#7135)
upgrade sdk for eth output
2023-08-11 10:59:03 -04:00
Tina
e31f4e549b feat: Fetch updated nonce before a UniswapX swap (#7120)
* add method to fetch updated gouda nonce

* remove console log
2023-08-11 10:33:07 -04:00
Brendan Wong
f47e1f16d7 fix: color extraction for rich link previews (#7138)
* feat: add token and nft injection

* feat: basic tests

* fix: get jest configured properly

* fix: change timeout

* fix: uninstall port ready

* fix: readd port ready

* fix: local tests work

* Update yarn.lock

* add lint disable for setup files

* fix: update dependencies

* fix: basic test suite for nfts/tokens

* feat: collection data

* fix: make tests more comprehensive

* fix: change matches to contains

* fix: tests for twitter alt image tag

* fix: image gen

* fix: add patch-package

* fix: update yarn install

* feat: basic image gen for nfts and collections

* fix: remove vibrant attempt

* use watermark asset

* dynamically grab color

* modularize code and prototype for token preview

* refactor code

* finalize css

* fix color grabber

* update tests

* fix up css

* refactor code a bit more

* remove console logs

* tests

* update tests

* update images based on design feedback

* network logos

* update lint

* slight refactoring

* more refactoring

* fix packages

* Update yarn.lock

* remove dynamically generated image stuff

* Revert "remove dynamically generated image stuff"

This reverts commit a80241edb3.

* change image reference and revamp tests

* cleanup return values

* Create README.md

* Revert "Create README.md"

This reverts commit 7a91c98d38.

* First round of feedback

* comments

* feat: cache

* Update test.yml

* Update test.yml

* Update test.yml

* feedback round 2

* final feedback

* final final feedback

* add coverage and other options

* Update test.yml

* start typecheck

* update cache

* update snapshots?

* Update jest.config.json

* Update jest.config.json

* give timeout some buffer

* update import

* upgrade ts

* fix typing for apollo deps

* finalize typechecks

* downgrade typescript to original version

* add cache directory to jest

* remove coverage

* remove google analytics from tests

* merge main

* remove timeout

* update tests

* update graphql queries

* review changes

* try cache setup

* Update cache.test.ts

* make cache helper function

* cache test

* remove unneeded test causing issues

* feat: parallelize cache (#6930)

* feat: parallelize cache?

* remove graph query from concurrency await

* most of feedback

* move tests

* update token tests

* singleton cache

* restructuring res and cache promise

* abstract away repeated graph logic

* update tests and functions

* refactor

* update typing, parallelize, and start tests

* fix one tsc issue

* final feedback

* Update yarn.lock

* final final feedback

* add svgs

* try and setup svg

* stashing changes

* cleanup!

* prepare for start of feedback?

* LESS GOO

* modify versioning

* fix: update wrangler version

* Update yarn.lock

* downgrade wrangler

* Update yarn.lock

* Update yarn.lock

* fix type error

* update github test

* cleanup tests

* Delete custom.d.ts

* fix: cloudfunctions

* update tests

* final touchups

* lint

* change github action

* Update yarn.lock

* styling updates

* nate's feedback

* feedback p1

* typing feedback

* update yarn

* Create wrangler.toml

* move wrangler.toml location

* last try

* Delete wrangler.toml

* use 2.20?

* remove comment

* Update yarn.lock

* change compatibility date

* update wrangler and fix bugs

* Update colorthief+2.4.0.patch

* build: cleanup flags

* cleaner patches

* update compatibility date

* quick tweeks

* cleanup rendering and lint

* patch things up

* fix: color extraction

* DONE!

* tests and other qol updates

* lint

* add more tests

* feedback

* simplify getcolors

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-08-10 18:32:08 -04:00
Brendan Wong
9954f9502d feat: dynamically generated images for rich link previews (#6902)
* feat: add token and nft injection

* feat: basic tests

* fix: get jest configured properly

* fix: change timeout

* fix: uninstall port ready

* fix: readd port ready

* fix: local tests work

* Update yarn.lock

* add lint disable for setup files

* fix: update dependencies

* fix: basic test suite for nfts/tokens

* feat: collection data

* fix: make tests more comprehensive

* fix: change matches to contains

* fix: tests for twitter alt image tag

* fix: image gen

* fix: add patch-package

* fix: update yarn install

* feat: basic image gen for nfts and collections

* fix: remove vibrant attempt

* use watermark asset

* dynamically grab color

* modularize code and prototype for token preview

* refactor code

* finalize css

* fix color grabber

* update tests

* fix up css

* refactor code a bit more

* remove console logs

* tests

* update tests

* update images based on design feedback

* network logos

* update lint

* slight refactoring

* more refactoring

* fix packages

* Update yarn.lock

* remove dynamically generated image stuff

* Revert "remove dynamically generated image stuff"

This reverts commit a80241edb3.

* change image reference and revamp tests

* cleanup return values

* Create README.md

* Revert "Create README.md"

This reverts commit 7a91c98d38.

* First round of feedback

* comments

* feat: cache

* Update test.yml

* Update test.yml

* Update test.yml

* feedback round 2

* final feedback

* final final feedback

* add coverage and other options

* Update test.yml

* start typecheck

* update cache

* update snapshots?

* Update jest.config.json

* Update jest.config.json

* give timeout some buffer

* update import

* upgrade ts

* fix typing for apollo deps

* finalize typechecks

* downgrade typescript to original version

* add cache directory to jest

* remove coverage

* remove google analytics from tests

* merge main

* remove timeout

* update tests

* update graphql queries

* review changes

* try cache setup

* Update cache.test.ts

* make cache helper function

* cache test

* remove unneeded test causing issues

* feat: parallelize cache (#6930)

* feat: parallelize cache?

* remove graph query from concurrency await

* most of feedback

* move tests

* update token tests

* singleton cache

* restructuring res and cache promise

* abstract away repeated graph logic

* update tests and functions

* refactor

* update typing, parallelize, and start tests

* fix one tsc issue

* final feedback

* Update yarn.lock

* final final feedback

* add svgs

* try and setup svg

* stashing changes

* cleanup!

* prepare for start of feedback?

* LESS GOO

* modify versioning

* fix: update wrangler version

* Update yarn.lock

* downgrade wrangler

* Update yarn.lock

* Update yarn.lock

* fix type error

* update github test

* cleanup tests

* Delete custom.d.ts

* fix: cloudfunctions

* update tests

* final touchups

* lint

* change github action

* Update yarn.lock

* styling updates

* nate's feedback

* feedback p1

* typing feedback

* update yarn

* Create wrangler.toml

* move wrangler.toml location

* last try

* Delete wrangler.toml

* use 2.20?

* remove comment

* Update yarn.lock

* change compatibility date

* update wrangler and fix bugs

* Update colorthief+2.4.0.patch

* build: cleanup flags

* cleaner patches

* update compatibility date

* quick tweeks

* cleanup rendering and lint

* final color update

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-08-10 15:29:37 -04:00
eddie
9fbdc3cab1 feat: base flag cleanup (#7134)
feat: remove base feature flag
2023-08-10 11:05:48 -07:00
eddie
e04be0711f fix: unknown token logo styling (#7132)
* fix: unknown token logo styling

* fix: tests
2023-08-10 11:05:32 -07:00
eddie
5c3caa7143 feat: query base backend (#7133) 2023-08-10 11:05:23 -07:00
Jack Short
1ea724609f feat: bottom sheet for mobile swap settings (#7072)
* feat: bottom sheet for settings dialogue

* renaming to settings

* renmaing

* cypress tests

* fixing the cypress tests

* chore: e2e insufficient liquidity test

* Revert "chore: e2e insufficient liquidity test"

This reverts commit 8250730f35.
2023-08-10 12:20:31 -04:00
Jordan Frankfurt
2b6948db94 fix: standardize styled component file names and ignore them in codecov (#7113)
* fix: standardize styled component file names and ignore them in codecov

* Update codecov.yml

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-08-10 11:15:33 -05:00
Jordan Frankfurt
0b8026e6fe feat: add base promotional advert (#7124)
* feat: add base promotional advert

add mobile layout

tweak text container size

only show new banner on Base

fix import

update to new state structure

* Update src/components/Banner/BaseAnnouncementBanner/index.tsx

Co-authored-by: Charles Bachmeier <charles@bachmeier.io>

* pr feedback

---------

Co-authored-by: Charles Bachmeier <charles@bachmeier.io>
2023-08-10 11:03:21 -05:00
Brendan Wong
b14831be12 fix: downgrade wrangler (#7128)
* downgrade wrangler

* remove report

* comment and update test

* update comment
2023-08-09 20:20:02 -04:00
Charles Bachmeier
b12a61e2fb feat: add multichain_ux flag (#7122)
* feat: add multichain_ux flag

* update flag text

* add new flag file
2023-08-09 16:47:38 -07:00
Jordan Frankfurt
6f6c9d7174 chore: remove e2e coverage from aggregate calculation in codecov (#7108)
* chore: remove e2e coverage from aggregate calculation in codecov

* pr feedback
2023-08-09 14:48:59 -05:00
Jordan Frankfurt
89c3ec7526 chore: reduce patch coverage requirement to 50% (#7109) 2023-08-09 14:40:48 -05:00
Charles Bachmeier
06c81d9304 feat: add amplitude logging for gas estimate failures (#7095)
* send gas estimate failure

* update event name

* update analytics events package

* add error and tx to analytics event
2023-08-09 12:28:52 -07:00
Thomas Thachil
15c59e8149 fix: fixing deeplinks json nesting (#7126) 2023-08-09 15:28:26 -04:00
Nate Wienert
f6b66c759a fix: make loading indicator for pools nft card use a shine rather than spinner (#7071)
fix: make loading indicator for pools nft card use a shine rather than spinner and fill the full height
2023-08-09 08:14:08 -10:00
Jack Short
b1c99d4b37 chore: moving coned formatting to interface (#7114) 2023-08-09 14:01:37 -04:00
Thomas Thachil
add6df46e6 feat: adding more fingerprints for deeplink apps (#7107) 2023-08-09 11:49:10 -04:00
Zach Pomerantz
b2dfb29f51 build: simplify/fix test caching (#7084)
* build: rm unnecessary cache-on-main

* build: hardhat fan-in cache
2023-08-08 16:48:27 -07:00
Brendan Wong
097ef6a3df feat: fallback metadata injection (#7070)
* feat: fallback metadata

* fix lint

* Update tsconfig.json

* feedback

* fix: cloudfunctions

* update test
2023-08-08 15:50:52 -04:00
Brendan Wong
984cf81911 fix: cleanup cloud function environment (#7085)
* cleanup!

* update comments

* fix: cloudfunctions
2023-08-08 15:21:30 -04:00
Zach Pomerantz
08501234a8 build: replace babel with swc (#7056)
* chore: refactor ms.macro to ms

* build: upgrade lingui@4

* chore: avoid styled-components/macro

* build: replace babel loader with swc

* build: upgrade vanilla-extract

* build: simplify e2e config

* build: migrate jest to swc

* build: dedup

* whoops

* fix: initial translations

* build: coverage

* build: ignore static extract warning

* build: rm old babel pkg

* test: rm e2e codecov

* build: fix swc cache

* cleanup

* fix visible t9ns

* cleanup

* cleanup setup

* crank it

* actual merge conflict resolution

* fix: restore locale initialization
2023-08-08 10:38:37 -07:00
Jordan Frankfurt
3afe7fe9f2 fix: add back correct fellback setter (#7102) 2023-08-08 12:37:57 -05:00
cartcrom
bd573724b9 fix: uniswapx review modal success display (#7097)
* fix: update swapConfirmed logic

* fix: success icon display
2023-08-08 10:15:32 -07:00
Zach Pomerantz
684258dc17 fix: keep a referentially stable connectors list (#7090) 2023-08-08 08:46:01 -07:00
Charles Bachmeier
a53e773e5d refactor: shelve Details redesign for now (#7077)
* shelve Details redesign for now

* remove feature flag enum

* no longer used utils
2023-08-08 08:28:43 -07:00
cartcrom
5307d113a8 feat: eth output feature flag for uniswapx orders (#7078) 2023-08-08 11:23:46 -04:00
Nate Wienert
9e7d59f1fe chore: fix typecheck error due to jest and cypress overlapping types (#7101) 2023-08-07 18:40:43 -07:00
Brendan Wong
2ccd228f23 fix: cloud tests broken by path based (#7100)
fix: cloudfunctions
2023-08-07 20:18:14 -04:00
Nate Wienert
a726f67453 fix: bring back flake retries for flaky test (only flakes ~33% of time) (#7063) 2023-08-07 14:14:41 -10:00
Mike Grabowski
c9b4016b78 feat: use router depending on the origin (#6982)
* feat: initial commit

* chore: whitelist vercel

* chore: fix e2e test

* chore: update all occurences of #

* chore: tweaks

* chore: remove todo

* chore: revert changes

* chore: bring back old tweet logic and fix nested URLs

* chore: fix merge

* improve check

* fix: cypress

* chore: fix tests

* chore: update snapshot

* chore: update readme

* address review

* satisfy eslint

* chore: fix ui issue

* fix: tests

* fix: e2e test
2023-08-07 15:01:45 -07:00
eddie
a7135c9ab1 fix: check chainId in findCancelTx (#7098)
* fix: check chainId in findCancelTx

* fix: add comment explaining fix

---------

Co-authored-by: cartcrom <cartergcromer@gmail.com>
2023-08-07 13:58:33 -07:00
Jordan Frankfurt
a1b3776686 feat: vertical LP (#7000)
* Re-organize add liquidity page

* fix title alignment

* Update styles

* Update logic for disable/enable input on creation

* lint and clean up a couple small things

* lint and clean up a couple small things

* Tweak UI

* clean up code

* add back range selector

* remove inline styles

---------

Co-authored-by: Callil Capuozzo <callil@uniswap.org>
2023-08-07 14:22:45 -05:00
Brendan Wong
dc2225a2bc fix: update wrangler version (#7093)
* fix: update wrangler version

* yarn deduplicate

* Update .gitignore

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-08-07 12:56:59 -04:00
Nate Wienert
41571169c6 chore: align @reduxjs/toolkit dep versions with wallet (#7038) 2023-08-07 06:47:26 -10:00
Nate Wienert
7506dbb29c chore: update typescript to 4.9.4 to align with wallet repo (#7036)
* chore: update typescript to 4.9.4 to align with wallet repo

* fix: update mainnet block (#7042)

* fix: update mainnet block

* fix: typecheck

* fix: use deeplink instead of universal link (#7017)

* fix: use deeplink instead of universal link

* docs: added comment

* test: mock quotes to avoid errors logged (#7031)

* fix: change style of mobile pool buttons and menu (#7020)

* fix: menu flyout alignment overridden on mobile

* fix: change button order, sizing

* Replace deprecated media queries and text components

* fix: remove flakey token test (#7029)

* fix: reverted swap state (#7044)

* fix: wait for transaction status in ConfirmSwapModal

* fix: use actual swap status in ConfirmSwapModal

* feat: add test

* fix: shared hook

* fix: fix test

* fix: dont create Activity instance

* fix: clearing input on connect wallet (#6928)

* fix: clearing input on connect wallet

* update e2e tests

* fix: text wrap and spacing on mobile TDP (#6909)

fix text wrap and spacing on mobile TDP

* fix: top token charts on mobile (#6967)

* fix: top token charts on mobile

* Update TokenRow.test.tsx.snap

* Update src/components/Tokens/TokenTable/TokenRow.tsx

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update src/components/Tokens/TokenTable/__snapshots__/TokenRow.test.tsx.snap

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* update

* Update TokenRow.test.tsx.snap

* Update TokenRow.test.tsx.snap

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* test: deflake and clean universal search (#7034)

* fix: improve v2 network support (#7012)

* fix: improve v2 network support

* add an unsupported message to all v2 pages

* test: add v2 pool tests

* add guard on transaction callbacks

* fix: dep array

---------

Co-authored-by: eddie <66155195+just-toby@users.noreply.github.com>

* fix: failing nft buy test (#7049)

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
Co-authored-by: cartcrom <39385577+cartcrom@users.noreply.github.com>
Co-authored-by: gnewfield <18626088+gnewfield@users.noreply.github.com>
Co-authored-by: Brendan Wong <35351983+LunrEclipse@users.noreply.github.com>
Co-authored-by: eddie <66155195+just-toby@users.noreply.github.com>
Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
Co-authored-by: Jack Short <john.short.tj@gmail.com>
2023-08-04 10:52:49 -10:00
Nate Wienert
4f25c4a2bb chore: align @graphql-codegen dep versions with wallet (#7041) 2023-08-04 10:52:17 -10:00
3849 changed files with 300969 additions and 88833 deletions

17
.editorconfig Normal file
View File

@@ -0,0 +1,17 @@
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
# Windows files
[*.bat]
end_of_line = crlf

8
.eslintignore Normal file
View File

@@ -0,0 +1,8 @@
**/dist/**
**/build/**
**/node_modules/**
**/types/**
**/*.test.{js,jsx,ts,tsx}
**/*.spec.{js,jsx,ts,tsx}
**/config-overrides.js
**/.eslintrc.js

View File

@@ -1,78 +0,0 @@
/* eslint-env node */
require('@uniswap/eslint-config/load')
const rulesDirPlugin = require('eslint-plugin-rulesdir')
rulesDirPlugin.RULES_DIR = 'eslint_rules'
module.exports = {
extends: ['@uniswap/eslint-config/react'],
plugins: ['rulesdir'],
overrides: [
{
files: ['**/*'],
rules: {
'multiline-comment-style': ['error', 'separate-lines'],
'rulesdir/no-undefined-or': 'error',
},
},
{
// Configuration/typings typically export objects/definitions that are used outside of the transpiled package
// (eg not captured by the tsconfig). Because it's typical and not exceptional, this is turned off entirely.
files: ['**/*.config.*', '**/*.d.ts'],
rules: {
'import/no-unused-modules': 'off',
},
},
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'import/no-restricted-paths': [
'error',
{
zones: [
{
target: ['src/**/*[!.test].ts', 'src/**/*[!.test].tsx'],
from: 'src/test-utils',
},
],
},
],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'moment',
// tree-shaking for moment is not configured because it degrades performance - see craco.config.cjs.
message: 'moment is not configured for tree-shaking. If you use it, update the Webpack configuration.',
},
{
name: 'zustand',
importNames: ['default'],
message: 'Default import from zustand is deprecated. Import `{ create }` instead.',
},
],
},
],
},
},
{
files: ['**/*.ts', '**/*.tsx'],
excludedFiles: ['src/analytics/*'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@uniswap/analytics',
message: `Do not import from '@uniswap/analytics' directly. Use 'analytics' instead.`,
},
],
},
],
},
},
],
}

5
.firebaserc Normal file
View File

@@ -0,0 +1,5 @@
{
"projects": {
"default": "uniswap-mobile"
}
}

3
.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
# Windows files should use crlf line endings
# https://help.github.com/articles/dealing-with-line-endings/
*.bat text eol=crlf

1
.github/CODEOWNERS vendored
View File

@@ -1 +0,0 @@
@uniswap/web-admins

View File

@@ -1,22 +0,0 @@
---
name: Bug Report
about: Describe an issue in the Uniswap Interface
title: ''
labels: bug
assignees: ''
---
**Bug Description**
A clear and concise description of the bug.
**Steps to Reproduce**
1. Go to ...
2. Click on ...
...
**Expected Behavior**
A clear and concise description of what you expected to happen.
**Additional Context**
Add any other context about the problem here (screenshots, whether the bug only occurs only in certain mobile/desktop/browser environments, etc.)

View File

@@ -1,8 +0,0 @@
blank_issues_enabled: true
contact_links:
- name: Support
url: https://discord.gg/FCfyBSbCU5
about: Please ask and answer questions here
- name: List a token
url: https://github.com/Uniswap/default-token-list#adding-a-token
about: Any requests to add a token to Uniswap should go here

View File

@@ -1,19 +0,0 @@
---
name: Feature Request
about: Suggest an idea for improving the UX of the Uniswap Interface
title: ''
labels: 'improvement'
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -1,32 +0,0 @@
name: Cache on main
description: caches node_modules/.cache, but only saves from main
inputs:
path:
description: 'A list of files, directories, and wildcard patterns to cache and store'
required: true
key:
description: 'An explicit key for restoring and saving the cache'
required: true
restore-keys:
description: 'An ordered list of keys to use for restoring stale cache if no cache hit occured for key. Note `cache-hit` returns false in this case.'
required: false
# Many build steps have their own caches to improve subsequent build times.
# Build tools are configured to cache to node_modules/.cache, so they are cached independently of node_modules.
# Caches are saved every run *on main* (by keying on github.run_id), and the most recent available cache is loaded.
# Caches are not saved on feature branches because they have limited utility, and extend the runtime of the workflow.
# See https://jongleberry.medium.com/speed-up-your-ci-and-dx-with-node-modules-cache-ac8df82b7bb0.
runs:
using: composite
steps:
- uses: actions/cache/restore@v3
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
restore-keys: ${{ inputs.restore-keys }}
- if: github.ref_name == 'main'
uses: actions/cache/save@v3
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}

View File

@@ -1,48 +0,0 @@
name: Report
description: Report test failures via Slack
inputs:
name:
description: The name of the failing test
required: true
SLACK_WEBHOOK_URL:
description: The webhook URL to send the report to
required: true
runs:
using: composite
steps:
- uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844
with:
payload: |
{
"text": "${{ inputs.name }} failing on `${{ github.ref_name }}`",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${{ inputs.name }} failing on `${{ github.ref_name }}`:* <https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id }}|view failing action>"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "_This is blocking pull requests and branch promotions._\n_Please prioritize fixing the build._"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
# The !oncall bot requires its own message:
- uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844
with:
payload: |
{
"text": "!oncall web"
}
env:
SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

View File

@@ -1,69 +0,0 @@
name: Setup
description: checkout repo, setup node, and install node_modules
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org
# cache is intentionally omitted, as it is faster with yarn v1 to cache node_modules.
- uses: actions/cache@v3
id: install-cache
with:
# node_modules/.cache is intentionally omitted, as this is used for build tool caches.
path: |
node_modules
!node_modules/.cache
key: ${{ runner.os }}-install-${{ hashFiles('yarn.lock') }}
- if: steps.install-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --ignore-scripts
shell: bash
# Validators compile quickly, so caching can be omitted.
- run: yarn ajv
shell: bash
# Contracts are compiled from source. If source hasn't changed, the contracts do not need to be re-compiled.
- uses: actions/cache@v3
id: contracts-cache
with:
path: |
src/abis/types
src/types/v3
key: ${{ runner.os }}-contracts-${{ hashFiles('src/abis/**/*.json', 'node_modules/@uniswap/**/artifacts/contracts/**/*.json') }}
- if: steps.contracts-cache.outputs.cache-hit != 'true'
run: yarn contracts
shell: bash
# GraphQL is generated from schema and client-side graphql queries. The schema is always fetched and changes to
# client-side queries are hard to detect, so it is always re-generated.
# TODO(WEB-2498): Cache based on both fetched schema and client-side graphql queries.
# This will require some processing: cp all literal graphql tags into a separate file and hash it?
- run: yarn graphql
shell: bash
# Messages are extracted from source.
# A record of source file content hashes and catalogs is maintained in node_modules/.cache/lingui.
# Messages are always extracted, but extraction may short-circuit from the custom extractor's cache.
- uses: ./.github/actions/cache-on-main
with:
path: node_modules/.cache
key: ${{ runner.os }}-i18n-extract-${{ github.run_id }}
restore-keys: ${{ runner.os }}-i18n-extract-
- run: yarn i18n:extract
shell: bash
# Translations are compiled from messages. If messages haven't changed, the translations do not need to be re-compiled.
- uses: actions/cache@v3
id: i18n-compile-cache
with:
path: src/locales/*.js
key: ${{ runner.os }}-i18n-compile-${{ hashFiles('src/locales/*.po') }}
- if: steps.i18n-compile-cache.outputs.cache-hit !='true'
run: yarn i18n:compile
shell: bash

View File

@@ -1,12 +0,0 @@
version: 2
updates:
- package-ecosystem: npm
# Files stored in repository root
directory: '/'
schedule:
interval: 'daily'
allow:
- dependency-name: '@uniswap/default-token-list'
- dependency-name: '@uniswap/token-lists'
reviewers:
- 'Uniswap/dependabot-reviewers'

View File

@@ -1,52 +0,0 @@
<!-- Your PR title must follow conventional commits: https://github.com/Uniswap/interface#pr-title -->
## Description
<!-- Summary of change, including motivation and context. -->
<!-- Use verb-driven language: "Fixes XYZ" instead of "This change fixes XYZ" -->
<!-- Delete inapplicable lines: -->
_Linear ticket:_
_Slack thread:_
_Relevant docs:_
<!-- Delete this section if your change does not affect UI. -->
## Screen capture
### Before
| Mobile | Desktop |
| ------------ | ------------ |
| paste_before | paste_before |
### After
| Mobile | Desktop |
| ------------ | ----------- |
| paste_after | paste_after |
## Test plan
<!-- Delete this section if your change is not a bug fix. -->
### Reproducing the error
<!-- Include steps to reproduce the bug. -->
1.
### QA (ie manual testing)
<!-- Include steps to test the change, ensuring no regression. -->
- [ ] N/A
#### Devices
<!-- If applicable, include different devices and screen sizes that may be affected, and how you've tested them. -->
### Automated testing
<!-- If N/A, check and note so it is obvious to your reviewers and does not show up as an incomplete task. -->
<!-- eg - [x] Unit test N/A -->
- [ ] Unit test
- [ ] Integration/E2E test

View File

@@ -1,73 +0,0 @@
name: 1 | Push main -> staging
# This CI job is responsible for pushing the current contents of the `main` branch to the
# `releases/staging` branch, which will in turn kick off a deploy to the staging environment.
on:
workflow_dispatch:
# https://stackoverflow.com/questions/57921401/push-to-origin-from-github-action
jobs:
push-staging:
name: 'Push to staging branch'
runs-on: ubuntu-latest
environment:
name: push/staging
steps:
- name: Check test status
uses: actions/github-script@v6.4.1
with:
script: |
const statuses = await github.rest.repos.listCommitStatusesForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.sha
})
const status = statuses.data.find(status => status.context === 'Test / promotion')?.state || 'missing'
core.info('Status: ' + status)
if (status !== 'success') {
core.setFailed('"Test / promotion" must be successful before pushing')
}
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
token: ${{ secrets.RELEASE_SERVICE_ACCESS_TOKEN }}
ref: main
# The source file must exist for the corresponding translation messages to be downloaded.
- run: touch src/locales/en-US.po
- name: Download translations
uses: crowdin/github-action@3133cc916c35590475cf6705f482fb653d8e36e9
with:
upload_sources: false
download_translations: true
project_id: 458284
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN_SECRET }}
source: 'src/locales/en-US.po'
translation: 'src/locales/%locale%.po'
localization_branch_name: main
create_pull_request: false
push_translations: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Git config
run: |
git config user.name 'UL Service Account'
git config user.email 'hello-happy-puppy@users.noreply.github.com'
- name: Add translations
run: |
rm src/locales/en-US.po
git add -f src/locales/*.po
git commit -m 'ci(t9n): download translations from crowdin'
- name: Add CODEOWNERS
run: |
echo '@uniswap/web-admins' > CODEOWNERS
git add CODEOWNERS
git commit -m 'ci: add global CODEOWNERS'
- name: Git push
run: |
git push origin main:releases/staging --force

View File

@@ -1,64 +0,0 @@
name: 2 | Deploy staging
on:
push:
branches:
- 'releases/staging'
jobs:
deploy-to-staging:
runs-on: ubuntu-latest
environment:
name: deploy/staging
steps:
- uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844
continue-on-error: true
with:
payload: |
{
"text": "Deploy _started_ for ${{ github.ref_name }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn build
env:
REACT_APP_STAGING: 1
- name: Update Cloudflare Pages deployment
id: pages-deployment
uses: cloudflare/pages-action@364c7ca09a4b57837c5967871d64a2c31adb8c0d
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: interface-staging
directory: build
githubToken: ${{ secrets.GITHUB_TOKEN }}
# Cloudflare uses `main` as the default production branch, so we push using the `main` branch so that it can be aliased by a custom domain.
branch: main
- uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844
continue-on-error: true
if: always()
with:
payload: |
{
"text": "Deploy *${{ steps.pages-deployment.outcome }}* for ${{ github.ref_name }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Upload source maps to Sentry
uses: getsentry/action-release@bd5f874fcda966ba48139b0140fb3ec0cb3aabdd
continue-on-error: true
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: staging
sourcemaps: './build/static/js'
url_prefix: '~/static/js'

View File

@@ -1,42 +0,0 @@
name: 3 | Push staging -> prod
# This CI job is responsible for force pushing the content of releases/staging to releases/prod. It
# is restricted to web-reviewers through virtue of the GitHub environment protection rules for the
# prod environment.
on:
workflow_dispatch:
jobs:
push-prod:
name: 'Push to prod branch'
runs-on: ubuntu-latest
environment:
name: push/prod
steps:
- name: Check test status
uses: actions/github-script@v6.4.1
with:
script: |
const statuses = await github.rest.repos.listCommitStatusesForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.sha
})
const status = statuses.data.find(status => status.context === 'Test / promotion')?.state || 'missing'
core.info('Status: ' + status)
if (status !== 'success') {
core.setFailed('"Test / promotion" must be successful before pushing')
}
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
token: ${{ secrets.RELEASE_SERVICE_ACCESS_TOKEN }}
ref: releases/staging
- name: Git config
run: |
git config user.name "UL Service Account"
git config user.email "hello-happy-puppy@users.noreply.github.com"
- name: Git push
run: |
git push origin releases/staging:releases/prod --force

View File

@@ -1,111 +0,0 @@
name: 4 | Deploy prod
on:
push:
branches:
- 'releases/prod'
jobs:
deploy-to-prod:
runs-on: ubuntu-latest
environment:
name: deploy/prod
steps:
- uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844
continue-on-error: true
with:
payload: |
{
"text": "Deploy _started_ for ${{ github.ref_name }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn build
- name: Bump and tag
id: github-tag-action
uses: mathieudutour/github-tag-action@d745f2e74aaf1ee82e747b181f7a0967978abee0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: releases/prod
default_bump: patch
- name: Pin to IPFS
id: pinata
uses: anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d
with:
pin-name: Uniswap ${{ steps.github-tag-action.outputs.new_tag }}
path: './build'
pinata-api-key: ${{ secrets.PINATA_API_KEY }}
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }}
- name: Convert CIDv0 to CIDv1
id: convert-cidv0
uses: uniswap/convert-cidv0-cidv1@v1.0.0
with:
cidv0: ${{ steps.pinata.outputs.hash }}
- name: Publish release
uses: actions/create-release@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.github-tag-action.outputs.new_tag }}
release_name: Release ${{ steps.github-tag-action.outputs.new_tag }}
body: |
IPFS hash of the deployment:
- CIDv0: `${{ steps.pinata.outputs.hash }}`
- CIDv1: `${{ steps.convert-cidv0.outputs.cidv1 }}`
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
You can also access the Uniswap Interface from an IPFS gateway.
**BEWARE**: The Uniswap interface uses [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to remember your settings, such as which tokens you have imported.
**You should always use an IPFS gateway that enforces origin separation**, or our hosted deployment of the latest release at [app.uniswap.org](https://app.uniswap.org).
Your Uniswap settings are never remembered across different URLs.
IPFS gateways:
- https://${{ steps.convert-cidv0.outputs.cidv1 }}.ipfs.dweb.link/
- https://${{ steps.convert-cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/
- [ipfs://${{ steps.pinata.outputs.hash }}/](ipfs://${{ steps.pinata.outputs.hash }}/)
${{ steps.github-tag-action.outputs.changelog }}
- name: Update Cloudflare Pages deployment
uses: cloudflare/pages-action@364c7ca09a4b57837c5967871d64a2c31adb8c0d
id: pages-deployment
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: build
githubToken: ${{ secrets.GITHUB_TOKEN }}
# Cloudflare uses `main` as the default production branch, so we push using the `main` branch so that it can be aliased by a custom domain.
branch: main
- uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844
continue-on-error: true
if: always()
with:
payload: |
{
"text": "Deploy *${{ steps.pages-deployment.outcome }}* for ${{ github.ref_name }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Upload source maps to Sentry
uses: getsentry/action-release@4744f6a65149f441c5f396d5b0877307c0db52c7
continue-on-error: true
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
sourcemaps: './build/static/js'
url_prefix: '~/static/js'

View File

@@ -1,17 +0,0 @@
name: Check PR Title
on:
pull_request_target:
types:
- opened
- edited
- synchronize
jobs:
# Ensures that the PR title adheres to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).
conventional-commit:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,26 +0,0 @@
name: Crowdin Upload
on:
push:
branches:
- main
jobs:
upload-sources:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn i18n:extract
- name: Upload Crowdin sources
uses: crowdin/github-action@3133cc916c35590475cf6705f482fb653d8e36e9
with:
upload_sources: true
download_translations: false
project_id: 458284
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN_SECRET }}
source: 'src/locales/en-US.po'
translation: 'src/locales/%locale%.po'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,91 +0,0 @@
name: Slack notification on pushes to releases/*
# This CI job will push notifications to Slack whenever code is merged into any releases/* branch
#
# The steps of the command line kung-fu shown below are as follows:
# First we take the JSON-formatted Github context
# echo $GITHUB_CONTEXT \
# Then we parse out the specific fields we want for our messages using jq and format it into tab-separated values
# | jq '.event.commits[] | [.url, .id[0:7], .author.username, .timestamp, .message] | @tsv' \
# We need to do some cleaning on this output - specifically removing quotes and replacing newlines with something easier to split
# | sed 's/"//g' | sed 's/\\t/;/g' | sed 's/\\n/;/g' | sed 's/\\//g' \
# We then use awk to format the TSV into a Slack message
# | awk -F';' '{print "• <"$1"|"$2"> (<https://github.com/"$3"|"$3">, "$4") - "$5}' \
# We need to deal with some escaping issues with newlines so that we don't break the Slack message format
# | sed 's/$/\\n/g' | tr -d '\n' \
# Finally we have to truncate the message to 3,000 characters max, otherwise Slack will reject it
# | awk '{print substr($0,0,3000);}' \
# Then shove the bytes into a file to store them in their exact format
# > /tmp/parsed_github_context
on:
push:
branches:
- 'releases/*'
jobs:
notify-slack:
runs-on: ubuntu-latest
environment:
name: notify/releases
steps:
- name: Parse event to slug
id: parse-slug
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
# Formats the contents of the GitHub event into slugs: one line per commit, formatted for Slack.
# Explanation for each line is in the comments above.
run: |
echo $GITHUB_CONTEXT \
| jq '.event.commits[] | [.url, .id[0:7], .author.username, .timestamp, .message] | @tsv' \
| sed 's/"//g' | sed 's/\\t/;/g' | sed 's/\\n/;/g' | sed 's/\\//g' \
| awk -F';' '{print "• <"$1"|"$2"> (<https://github.com/"$3"|"$3">, "$4") - "$5}' \
| sed 's/$/\\n/g' | tr -d '\n' \
| awk '{print substr($0,0,3000);}' \
> /tmp/parsed_github_context
echo "SLACK_COMMITS=$(cat /tmp/parsed_github_context)" >> "$GITHUB_OUTPUT"
- uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844
with:
payload: |
{
"text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}",
"blocks": [
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Code merged to <https://github.com/Uniswap/interface/tree/${{ github.ref }}|${{ github.ref_name }}> branch:*\n"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Actor*: <https://github.com/${{ github.triggering_actor }}/|${{ github.triggering_actor }}>\n*Force pushed*: ${{ github.event.forced || false }}\n"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ steps.parse-slug.outputs.SLACK_COMMITS || 'New branch created' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.event.compare}}|View Diff>"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

40
.github/workflows/tag_and_release.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: "Tag and release"
on:
push:
branches:
- 'main'
jobs:
deploy-to-prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 🧷️ Get version
uses: juliangruber/read-file-action@02bbba9876a8f870efd4ad64e3b9088d3fb94d4b
id: version
with:
path: VERSION
- name: 🧾️ Get release notes
uses: juliangruber/read-file-action@02bbba9876a8f870efd4ad64e3b9088d3fb94d4b
id: release-notes
with:
path: RELEASE
- name: 🏷️ Tag
id: github-tag-action
uses: uniswap/github-tag-action@7bddacd4864a0f5671e836721db60174d8a9c399
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.version.outputs.content }}
tag_prefix: ""
- name: 🪽 Release
uses: actions/create-release@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.github-tag-action.outputs.new_tag }}
release_name: Release ${{ steps.github-tag-action.outputs.new_tag }}
body: ${{ steps.release-notes.outputs.content }}

View File

@@ -1,264 +0,0 @@
name: Test
# Many build steps have their own caches, so each job has its own cache to improve subsequent build times.
# Build tools are configured to cache to node_modules/.cache, so they are cached independently of node_modules.
# Caches are saved every run (by keying on github.run_id), and the most recent available cache is loaded.
# See https://jongleberry.medium.com/speed-up-your-ci-and-dx-with-node-modules-cache-ac8df82b7bb0.
on:
push:
branches:
- main
- releases/staging
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/cache-on-main
with:
path: node_modules/.cache
key: ${{ runner.os }}-eslint-${{ github.run_id }}
restore-keys: ${{ runner.os }}-eslint-
- run: yarn lint
- if: failure() && github.ref_name == 'main'
uses: ./.github/actions/report
with:
name: Lint
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/cache-on-main
with:
path: node_modules/.cache
key: ${{ runner.os }}-tsc-${{ github.run_id }}
restore-keys: ${{ runner.os }}-tsc-
- run: yarn typecheck
- if: failure() && github.ref_name == 'main'
uses: ./.github/actions/report
with:
name: Typecheck
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
deps-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn yarn-deduplicate --strategy=highest --list --fail
- if: failure() && github.ref_name == 'main'
uses: ./.github/actions/report
with:
name: Dependency checks
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/cache-on-main
with:
path: node_modules/.cache
key: ${{ runner.os }}-jest-${{ github.run_id }}
restore-keys: ${{ runner.os }}-jest-
- run: yarn test --coverage --maxWorkers=100%
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
flags: unit-tests
- if: failure() && github.ref_name == 'main'
uses: ./.github/actions/report
with:
name: Unit tests
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
build-e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/cache-on-main
with:
path: node_modules/.cache
key: ${{ runner.os }}-build-e2e-${{ github.run_id }}
restore-keys: ${{ runner.os }}-build-e2e-
- run: yarn build:e2e
env:
NODE_OPTIONS: "--max_old_space_size=4096"
- uses: actions/upload-artifact@v3
with:
name: build-e2e
path: build
if-no-files-found: error
cypress-typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/cache-on-main
with:
path: node_modules/.cache
key: ${{ runner.os }}-cypress-tsc-${{ github.run_id }}
restore-keys: ${{ runner.os }}-cypress-tsc-
- run: yarn typecheck:cypress
- if: failure() && github.ref_name == 'main'
uses: ./.github/actions/report
with:
name: Cypress typecheck
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
# Allows for parallel re-runs of cypress tests without re-building.
cypress-rerun:
runs-on: ubuntu-latest
steps:
- run: exit 0
cypress-test-matrix:
needs: [build-e2e, cypress-rerun]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/cache-on-main
with:
path: /root/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('**/node_modules/cypress/package.json') }}
- run: |
yarn cypress install
yarn cypress info
- uses: actions/download-artifact@v3
with:
name: build-e2e
path: build
- uses: ./.github/actions/cache-on-main
with:
path: cache
key: ${{ runner.os }}-hardhat-${{ hashFiles('hardhat.config.js') }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-hardhat-${{ hashFiles('hardhat.config.js') }}-
- uses: cypress-io/github-action@v4
with:
install: false
record: true
parallel: true
start: yarn serve
wait-on: 'http://localhost:3000'
browser: electron
group: e2e
spec: ${{ github.ref_name == 'releases/staging' && 'cypress/{e2e,staging}/**/*.test.ts' || 'cypress/e2e/**/*.test.ts' }}
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_INFO_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message }}
COMMIT_INFO_AUTHOR: ${{ github.event.sender.login || github.event.head_commit.author.login }}
# Cypress requires an email for filtering by author, but GitHub does not expose one.
# GitHub's public profile email can be deterministically produced from user id/login.
COMMIT_INFO_EMAIL: ${{ github.event.sender.id || github.event.head_commit.author.id }}+${{ github.event.sender.login || github.event.head_commit.author.login }}@users.noreply.github.com
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.sha }}
COMMIT_INFO_TIMESTAMP: ${{ github.event.pull_request.updated_at || github.event.head_commit.timestamp }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
CYPRESS_PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }}
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
flags: e2e-tests
- if: failure() && github.ref_name == 'main'
uses: ./.github/actions/report
with:
name: Cypress tests
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
cloud-typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/cache-on-main
with:
path: node_modules/.cache
key: ${{ runner.os }}-cloud-tsc-${{ github.run_id }}
restore-keys: ${{ runner.os }}-cloud-tsc-
- run: yarn typecheck:cloud
- if: failure() && github.ref_name == 'main'
uses: ./.github/actions/report
with:
name: Cloud typecheck
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
# TODO(WEB-2537): Setup CodeCOV
cloud-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/cache-on-main
with:
path: node_modules/.cache
key: ${{ runner.os }}-cloud-jest-${{ github.run_id }}
restore-keys: ${{ runner.os }}-cloud-jest-
- run: yarn test:cloud --coverage --maxWorkers=100%
- if: failure() && github.ref_name == 'main'
uses: ./.github/actions/report
with:
name: Cloud tests
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
pre:
if: ${{ github.ref_name == 'main' || github.ref_name == 'releases/staging' }}
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6.4.1
with:
script: |
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha,
state: 'pending',
context: 'Test / promotion',
description: 'Running tests...',
target_url: 'https://github.com/Uniswap/interface/actions/runs/' + context.runId
})
post:
if: ${{ github.ref_name == 'main' || github.ref_name == 'releases/staging' }}
needs: [pre, lint, typecheck, deps-tests, unit-tests, cypress-test-matrix]
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6.4.1
with:
script: |
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha,
state: ${{ env.STATUS }} ? 'success' : 'failure',
context: 'Test / promotion',
description: ${{ env.STATUS }} ? 'All tests passed' : 'One or more tests failed and are blocking promotion',
target_url: 'https://github.com/Uniswap/interface/actions/runs/' + context.runId
})
env:
STATUS: |
${{ needs.lint.result == 'success' }} &&
${{ needs.typecheck.result == 'success' }} &&
${{ needs.deps-tests.result == 'success' }} &&
${{ needs.unit-tests.result == 'success' }} &&
${{ needs.cypress-test-matrix.result == 'success' }}

74
.gitignore vendored
View File

@@ -1,54 +1,48 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# generated contract types
/src/types/v3
/src/abis/types
/src/locales/**/*.js
/src/locales/**/*.po
# generated files
/src/**/__generated__
# schema
schema.graphql
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
node_modules
.pnp
.pnp.js
# testing
/coverage
/cache
/functions/coverage
coverage
# builds
/build
/dts
# next.js
.next/
out/
build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
instrumented
.nyc_output
.nyc_output/**/*
/.netlify
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
notes.txt
# local env files
.env
.env.defaults.local
# turbo
.turbo
# .yarn files
.yarn/cache
.yarn/versions
.yarn/install-state.gz
dist/out-tsc/*
# Locale backup files
packages/wallet/src/i18n/locales/*_old.json
# ci
.ci-cache/
# JetBrains
.idea/
package-lock.json
cypress/downloads
cypress/videos
cypress/screenshots
.vercel

4
.husky/pre-commit Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
yarn g:run-fast-checks

3
.lintstagedrc Normal file
View File

@@ -0,0 +1,3 @@
{
"**/*+(.ts?|.tsx)": ["turbo staged:lint:fix staged:format --filter=// --"]
}

3
.npmrc
View File

@@ -1 +1,2 @@
engine-strict = true
# used in tandem with package.json engines section to only use yarn
engine-strict=true

2
.nvmrc
View File

@@ -1 +1 @@
v18.16.0
v18

25
.snyk
View File

@@ -1,25 +0,0 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.25.0
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
SNYK-JS-OPENZEPPELINCONTRACTS-2964946:
- '*':
reason: None Given
expires: 2099-01-01T00:00:00.000Z
created: 2022-12-08T16:25:57.347Z
SNYK-JS-OPENZEPPELINCONTRACTS-2958047:
- '*':
reason: None Given
expires: 2099-01-01T00:00:00.000Z
created: 2022-12-08T16:26:09.720Z
SNYK-JS-OPENZEPPELINCONTRACTS-2958050:
- '*':
reason: None Given
expires: 2099-01-01T00:00:00.000Z
created: 2022-12-08T16:26:17.702Z
SNYK-JS-OPENZEPPELINCONTRACTS-2965580:
- '*':
reason: None Given
expires: 2099-01-01T00:00:00.000Z
created: 2022-12-08T16:26:34.283Z
patch: {}

View File

@@ -1,6 +0,0 @@
{
"recommendations": [
"dbaeumer.vscode-eslint"
],
"unwantedRecommendations": []
}

25
.vscode/settings.json vendored
View File

@@ -1,25 +0,0 @@
{
"npm.packageManager": "yarn",
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.formatOnSaveMode": "file",
"editor.tabCompletion": "on",
"editor.tabSize": 2,
"editor.formatOnSave": false,
"editor.inlineSuggest.enabled": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"files.eol": "\n",
"eslint.enable": true,
"eslint.debug": true,
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
}

View File

@@ -0,0 +1,12 @@
diff --git a/src/components/bottomSheet/BottomSheet.tsx b/src/components/bottomSheet/BottomSheet.tsx
index 3b1264fb69d8a32e06cba4e2a1d592cee921b2aa..29e4e6464dc38567a1c97ddffb1e1ae016afbc3f 100644
--- a/src/components/bottomSheet/BottomSheet.tsx
+++ b/src/components/bottomSheet/BottomSheet.tsx
@@ -636,6 +636,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
const animateToPositionCompleted = useWorkletCallback(
function animateToPositionCompleted(isFinished?: boolean) {
isForcedClosing.value = false;
+ animatedCurrentIndex.value = animatedNextPositionIndex.value;
if (!isFinished) {
return;

View File

@@ -0,0 +1,13 @@
diff --git a/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutView.kt b/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutView.kt
index 6b78bd93e244649ee5d80bf4436bd742994d91fb..457179850746db36f568737e36d31f18968a1e80 100644
--- a/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutView.kt
+++ b/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutView.kt
@@ -26,7 +26,7 @@ class AutoLayoutView(context: Context) : ReactViewGroup(context) {
/** Overriding draw instead of onLayout. RecyclerListView uses absolute positions for each and every item which means that changes in child layouts may not trigger onLayout on this container. The same layout
* can still cause views to overlap. Therefore, it makes sense to override draw to do correction. */
- override fun dispatchDraw(canvas: Canvas?) {
+ override fun dispatchDraw(canvas: Canvas) {
fixLayout()
fixFooter()
super.dispatchDraw(canvas)

View File

@@ -0,0 +1,91 @@
diff --git a/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.kt b/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.kt
index 9980dfabbd5179753ba99f50c6ecfadd732cfdb9..c7b0bc2acd8ab516e9d14ef108a078a64afe8b97 100644
--- a/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.kt
+++ b/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.kt
@@ -7,6 +7,7 @@ import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.Bundle
+import android.provider.Settings
import androidx.biometric.BiometricManager
import androidx.biometric.BiometricPrompt
import androidx.biometric.BiometricPrompt.PromptInfo
@@ -89,7 +90,7 @@ class LocalAuthenticationModule(context: Context) : ExportedModule(context), Act
@ExpoMethod
fun supportedAuthenticationTypesAsync(promise: Promise) {
- val result = biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK)
+ val result = biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_STRONG)
val results: MutableList<Int> = ArrayList()
if (result == BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE) {
promise.resolve(results)
@@ -122,13 +123,13 @@ class LocalAuthenticationModule(context: Context) : ExportedModule(context), Act
@ExpoMethod
fun hasHardwareAsync(promise: Promise) {
- val result = biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK)
+ val result = biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_STRONG)
promise.resolve(result != BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE)
}
@ExpoMethod
fun isEnrolledAsync(promise: Promise) {
- val result = biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK)
+ val result = biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_STRONG)
promise.resolve(result == BiometricManager.BIOMETRIC_SUCCESS)
}
@@ -138,13 +139,31 @@ class LocalAuthenticationModule(context: Context) : ExportedModule(context), Act
if (isDeviceSecure) {
level = SECURITY_LEVEL_SECRET
}
- val result = biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK)
+ val result = biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_STRONG)
if (result == BiometricManager.BIOMETRIC_SUCCESS) {
level = SECURITY_LEVEL_BIOMETRIC
}
promise.resolve(level)
}
+ @ExpoMethod
+ fun enrollForAuthentication(promise: Promise) {
+ if (Build.VERSION.SDK_INT >= 30) {
+ val intent = Intent(Settings.ACTION_BIOMETRIC_ENROLL)
+ intent.putExtra(
+ Settings.EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED,
+ BiometricManager.Authenticators.BIOMETRIC_STRONG
+ )
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+ currentActivity!!.startActivity(intent)
+ promise.resolve(true)
+ } else {
+ val intent = Intent(Settings.ACTION_FINGERPRINT_ENROLL)
+ currentActivity!!.startActivity(intent)
+ promise.resolve(true)
+ }
+ }
+
@ExpoMethod
fun authenticateAsync(options: Map<String?, Any?>, promise: Promise) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
@@ -220,10 +239,16 @@ class LocalAuthenticationModule(context: Context) : ExportedModule(context), Act
promptInfoBuilder.setNegativeButtonText(it)
}
} else {
- promptInfoBuilder.setAllowedAuthenticators(
- BiometricManager.Authenticators.BIOMETRIC_WEAK
- or BiometricManager.Authenticators.DEVICE_CREDENTIAL
- )
+ if (Build.VERSION.SDK_INT >= 30) {
+ promptInfoBuilder.setAllowedAuthenticators(
+ BiometricManager.Authenticators.BIOMETRIC_STRONG
+ or BiometricManager.Authenticators.DEVICE_CREDENTIAL
+ )
+ } else {
+ promptInfoBuilder.setAllowedAuthenticators(
+ BiometricManager.Authenticators.BIOMETRIC_STRONG
+ )
+ }
}
promptInfoBuilder.setConfirmationRequired(requireConfirmation)
val promptInfo = promptInfoBuilder.build()

View File

@@ -0,0 +1,14 @@
diff --git a/basics b/basics
deleted file mode 100644
index 1a79016a006c6efd5e4cee071f134128d0ffd100..0000000000000000000000000000000000000000
--- a/basics
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./cjs/src/basics.js')
diff --git a/basics.js b/basics.js
new file mode 100644
index 0000000000000000000000000000000000000000..1a79016a006c6efd5e4cee071f134128d0ffd100
--- /dev/null
+++ b/basics.js
@@ -0,0 +1 @@
+module.exports = require('./cjs/src/basics.js')

View File

@@ -0,0 +1,19 @@
diff --git a/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.java b/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.java
index 4b5b90b7b478668fdff3fd12d5e028d423ada057..af30dc6f700b3b3cfde5c149bf1f865786df3e27 100644
--- a/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.java
+++ b/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.java
@@ -67,6 +67,14 @@ public class ContextMenuView extends ReactViewGroup implements PopupMenu.OnMenuI
contextMenu.show();
}
}
+
+ @Override
+ public boolean onDoubleTap(MotionEvent e) {
+ if (dropdownMenuMode) {
+ contextMenu.show();
+ }
+ return super.onSingleTapConfirmed(e);
+ }
});
}

View File

@@ -0,0 +1,12 @@
diff --git a/RNFastImage.podspec b/RNFastImage.podspec
index db0fada63fc06191f8620d336d244edde6c3dba3..286fa816e47996fdff9f25261644d612c682ae0b 100644
--- a/RNFastImage.podspec
+++ b/RNFastImage.podspec
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m}"
s.dependency 'React-Core'
- s.dependency 'SDWebImage', '~> 5.11.1'
+ s.dependency 'SDWebImage', '~> 5.15.5'
s.dependency 'SDWebImageWebPCoder', '~> 0.8.4'
end

View File

@@ -0,0 +1,19 @@
diff --git a/jest/setup.js b/jest/setup.js
index 3738bd2c61e516fa431f61fda47f2474f72dba42..2b3266007b3c9412d99e7ceee205ee52e3008077 100644
--- a/jest/setup.js
+++ b/jest/setup.js
@@ -17,12 +17,12 @@ jest.requireActual('@react-native/polyfills/error-guard');
global.__DEV__ = true;
-global.performance = {
+if (!global.performance) global.performance = {
now: jest.fn(Date.now),
};
global.regeneratorRuntime = jest.requireActual('regenerator-runtime/runtime');
-global.window = global;
+if (!global.window) global.window = global;
global.requestAnimationFrame = function (callback) {
return setTimeout(callback, 0);

View File

@@ -0,0 +1,38 @@
diff --git a/src/charts/line/ChartPath.tsx b/src/charts/line/ChartPath.tsx
index 3807c185c9456d2976c305df94574ff7d948b32a..5cf985422cf49120f943c98084b08c16faf452d9 100644
--- a/src/charts/line/ChartPath.tsx
+++ b/src/charts/line/ChartPath.tsx
@@ -18,7 +18,6 @@ const BACKGROUND_COMPONENTS = [
'LineChartHighlight',
'LineChartHorizontalLine',
'LineChartGradient',
- 'LineChartDot',
'LineChartTooltip',
];
const FOREGROUND_COMPONENTS = ['LineChartHighlight', 'LineChartDot'];
@@ -166,10 +165,25 @@ export function LineChartPathWrapper({
<View style={StyleSheet.absoluteFill}>
<AnimatedSVG animatedProps={svgProps} height={height}>
<LineChartPath color={color} width={strokeWidth} {...pathProps} />
+ </AnimatedSVG>
+ </View>
+
+ </LineChartPathContext.Provider>
+ <LineChartPathContext.Provider
+ value={{
+ color,
+ isInactive: false,
+ isTransitionEnabled: pathProps.isTransitionEnabled ?? true,
+ }}
+ >
+ <View style={StyleSheet.absoluteFill}>
+ <AnimatedSVG animatedProps={svgProps} height={height}>
{foregroundChildren}
</AnimatedSVG>
</View>
+
</LineChartPathContext.Provider>
+
</>
);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

783
.yarn/releases/yarn-3.2.3.cjs vendored Executable file

File diff suppressed because one or more lines are too long

39
.yarnrc.yml Normal file
View File

@@ -0,0 +1,39 @@
enableTelemetry: false
changesetBaseRefs:
- main
- origin/main
- upstream/main
changesetIgnorePatterns:
- '**/*.test.{js,jsx,ts,tsx}'
defaultSemverRangePrefix: ''
enableGlobalCache: false
nmMode: hardlinks-local
logFilters:
- code: YN0002
level: discard
- code: YN0060
level: discard
- code: YN0006
level: discard
- code: YN0076
level: discard
- code: YN0013
level: discard
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: '@yarnpkg/plugin-version'
- path: .yarn/plugins/@yarnpkg/plugin-constraints.cjs
spec: '@yarnpkg/plugin-constraints'
yarnPath: .yarn/releases/yarn-3.2.3.cjs

1
CODEOWNERS Normal file
View File

@@ -0,0 +1 @@
* @uniswap/web-admins

View File

@@ -1,80 +1,54 @@
# Uniswap Labs Interface
# Uniswap Labs: Front End Interfaces
[![codecov](https://codecov.io/gh/Uniswap/interface/branch/main/graph/badge.svg?token=YVT2Y86O82)](https://codecov.io/gh/Uniswap/interface)
An open source repository for all Uniswap front end interfaces maintained by Uniswap Labs. Uniswap is a protocol for decentralized exchange of Ethereum tokens.
[![Unit Tests](https://github.com/Uniswap/interface/actions/workflows/unit-tests.yaml/badge.svg)](https://github.com/Uniswap/interface/actions/workflows/unit-tests.yaml)
[![Integration Tests](https://github.com/Uniswap/interface/actions/workflows/integration-tests.yaml/badge.svg)](https://github.com/Uniswap/interface/actions/workflows/integration-tests.yaml)
[![Lint](https://github.com/Uniswap/interface/actions/workflows/lint.yml/badge.svg)](https://github.com/Uniswap/interface/actions/workflows/lint.yml)
[![Release](https://github.com/Uniswap/interface/actions/workflows/release.yaml/badge.svg)](https://github.com/Uniswap/interface/actions/workflows/release.yaml)
[![Crowdin](https://badges.crowdin.net/uniswap-interface/localized.svg)](https://crowdin.com/project/uniswap-interface)
## Interfaces
An open source interface for Uniswap -- a protocol for decentralized exchange of Ethereum tokens.
- Web: [app.uniswap.org](https://app.uniswap.org)
- Wallet: [wallet.uniswap.org](https://wallet.uniswap.org)
## Socials / Contact
- Website: [uniswap.org](https://uniswap.org/)
- Interface: [app.uniswap.org](https://app.uniswap.org)
- Docs: [uniswap.org/docs/](https://docs.uniswap.org/)
- Twitter: [@Uniswap](https://twitter.com/Uniswap)
- Reddit: [/r/Uniswap](https://www.reddit.com/r/Uniswap/)
- Email: [contact@uniswap.org](mailto:contact@uniswap.org)
- Discord: [Uniswap](https://discord.gg/FCfyBSbCU5)
- Whitepapers:
- [V1](https://hackmd.io/C-DvwDSfSxuh-Gd4WKE_ig)
- [V2](https://uniswap.org/whitepaper.pdf)
- [V3](https://uniswap.org/whitepaper-v3.pdf)
## Accessing the Uniswap Interface
## Uniswap Links
To access the Uniswap Interface, use an IPFS gateway link from the
[latest release](https://github.com/Uniswap/uniswap-interface/releases/latest),
or visit [app.uniswap.org](https://app.uniswap.org).
- Website: [uniswap.org](https://uniswap.org/)
- Docs: [uniswap.org/docs/](https://docs.uniswap.org/)
## Unsupported tokens
## Whitepapers
Check out `useUnsupportedTokenList()` in [src/state/lists/hooks.ts](./src/state/lists/hooks.ts) for blocking tokens in your instance of the interface.
- [V3](https://uniswap.org/whitepaper-v3.pdf)
- [V2](https://uniswap.org/whitepaper.pdf)
- [V1](https://hackmd.io/C-DvwDSfSxuh-Gd4WKE_ig)
You can block an entire list of tokens by passing in a tokenlist like [here](./src/constants/lists.ts)
## Apps
## Contributions
For instructions per application or package, see the README published for each application:
For steps on local deployment, development, and code contribution, please see [CONTRIBUTING](./CONTRIBUTING.md).
- [Web](apps/web/README.md)
- [Mobile](apps/mobile/README.md)
#### PR Title
Your PR title must follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary), and should start with one of the following [types](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#type):
## Releases
- build: Changes that affect the build system or external dependencies (example scopes: yarn, eslint, typescript)
- ci: Changes to our CI configuration files and scripts (example scopes: vercel, github, cypress)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests
All interface releases are tagged and published to this repository. To browse them easily, see the [Github releases tab](https://github.com/Uniswap/interface/releases).
Example commit messages:
## Translations
- feat: adds support for gnosis safe wallet
- fix: removes a polling memory leak
- chore: bumps redux version
Translations for our applications are done through [crowdin](https://crowdin.com).
Other things to note:
| App | Coverage |
| ------- | -------- |
| web | [![Crowdin](https://badges.crowdin.net/uniswap-interface/localized.svg)](https://crowdin.com/project/uniswap-interface) |
| mobile | [![Crowdin](https://badges.crowdin.net/uniswap-wallet/localized.svg)](https://crowdin.com/project/uniswap-wallet) |
- Please describe the change using verb statements (ex: Removes X from Y)
- PRs with multiple changes should use a list of verb statements
- Add any relevant unit / integration tests
- Changes will be previewable via vercel. Non-obvious changes should include instructions for how to reproduce them
## 🗂 Directory Structure
## Accessing Uniswap V2
The Uniswap Interface supports swapping, adding liquidity, removing liquidity and migrating liquidity for Uniswap protocol V2.
- Swap on Uniswap V2: <https://app.uniswap.org/#/swap?use=v2>
- View V2 liquidity: <https://app.uniswap.org/#/pools/v2>
- Add V2 liquidity: <https://app.uniswap.org/#/add/v2>
- Migrate V2 liquidity to V3: <https://app.uniswap.org/#/migrate/v2>
## Accessing Uniswap V1
The Uniswap V1 interface for mainnet and testnets is accessible via IPFS gateways
linked from the [v1.0.0 release](https://github.com/Uniswap/uniswap-interface/releases/tag/v1.0.0).
| Folder | Contents |
| ----------- | ------------------------------------------------------------------------------ |
| `apps/` | The home for each standalone application. |
| `config/` | Shared infrastructure packages and configurations. |
| `packages/` | Shared code packages covering UI, shared functionality, and shared utilities. |

24
RELEASE Normal file
View File

@@ -0,0 +1,24 @@
IPFS hash of the deployment:
- CIDv0: `QmRfmKBiCcSDFdGRZuJKqPtyenCsCFasgiwNvTJQMrbjT6`
- CIDv1: `bafybeibrpcihc5cqqzntesoc5dtxyili3uvyrfmxi7fcx4uteto7ucpj6e`
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
You can also access the Uniswap Interface from an IPFS gateway.
**BEWARE**: The Uniswap interface uses [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to remember your settings, such as which tokens you have imported.
**You should always use an IPFS gateway that enforces origin separation**, or our hosted deployment of the latest release at [app.uniswap.org](https://app.uniswap.org).
Your Uniswap settings are never remembered across different URLs.
IPFS gateways:
- https://bafybeibrpcihc5cqqzntesoc5dtxyili3uvyrfmxi7fcx4uteto7ucpj6e.ipfs.dweb.link/
- https://bafybeibrpcihc5cqqzntesoc5dtxyili3uvyrfmxi7fcx4uteto7ucpj6e.ipfs.cf-ipfs.com/
- [ipfs://QmRfmKBiCcSDFdGRZuJKqPtyenCsCFasgiwNvTJQMrbjT6/](ipfs://QmRfmKBiCcSDFdGRZuJKqPtyenCsCFasgiwNvTJQMrbjT6/)
### 5.2.2 (2023-12-15)
### Bug Fixes
* **web:** disambiguate 3P ProviderRpcErrors (#5482) 0f8a086

1
VERSION Normal file
View File

@@ -0,0 +1 @@
web/5.2.2

49
apps/mobile/.detoxrc.json Normal file
View File

@@ -0,0 +1,49 @@
{
"testRunner": "jest",
"runnerConfig": "e2e/config.json",
"skipLegacyWorkersInjection": true,
"apps": {
"ios.debug": {
"type": "ios.app",
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/Uniswap.app",
"build": "RN_SRC_EXT=e2e.js,e2e.ts xcodebuild -workspace ios/Uniswap.xcworkspace -scheme Uniswap -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES -arch x86_64"
},
"ios.release": {
"type": "ios.app",
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/Uniswap.app",
"build": "RN_SRC_EXT=e2e.js,e2e.ts xcodebuild -workspace ios/Uniswap.xcworkspace -scheme Uniswap -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES -arch x86_64"
},
"android": {
"type": "android.apk",
"binaryPath": "SPECIFY_PATH_TO_YOUR_APP_BINARY"
}
},
"devices": {
"simulator": {
"type": "ios.simulator",
"device": {
"type": "iPhone 12 Pro Max"
}
},
"emulator": {
"type": "android.emulator",
"device": {
"avdName": "Pixel_3a_API_30_x86"
}
}
},
"configurations": {
"ios.sim.debug": {
"device": "simulator",
"app": "ios.debug"
},
"ios.sim.release": {
"device": "simulator",
"app": "ios.release"
},
"android": {
"device": "emulator",
"app": "android"
}
}
}

12
apps/mobile/.eslintignore Normal file
View File

@@ -0,0 +1,12 @@
.eslintrc.js
babel.config.js
jest.config.js
metro.config.js
node_modules
generated*.ts
__generated__/
storybook-static
coverage

28
apps/mobile/.eslintrc.js Normal file
View File

@@ -0,0 +1,28 @@
module.exports = {
root: true,
extends: ['custom'],
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
overrides: [
{
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
rules: {},
},
{
files: ['*.ts', '*.tsx'],
rules: {},
},
{
files: ['*.js', '*.jsx'],
rules: {},
},
],
rules: {},
}

116
apps/mobile/.gitignore vendored Normal file
View File

@@ -0,0 +1,116 @@
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local
ios/GoogleService-Info.plist
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
*.jks
keystore.properties
*.aab
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore
# Yarn
.yarn/cache
.yarn/versions
.yarn/install-state.gz
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/.env
fastlane/.env.*
fastlane/builds
# firebase
firebase-debug.log
firestore-debug.log
ui-debug.log
# Bundle artifact
*.jsbundle
*.jsbundle.map
# Detox artifacts
artifacts/
# CocoaPods
/ios/Pods/
# ccache
.ccache
# hardhat network fork
/cache/
# Storybook
build-storybook.log
storybook-static/*
# Private keys
.env.local
# Snyk
.dccache
./lib/
# Jest
coverage/
# Swift GraphQL codegen
# Ignores everything inside the schema folder except the README.md
!ios/WidgetsCore/MobileSchema/
ios/WidgetsCore/MobileSchema/*
!ios/WidgetsCore/MobileSchema/README.md
# Swift env
ios/WidgetsCore/Env.swift
# Sentry
ios/sentry.properties
android/sentry.properties

View File

@@ -0,0 +1,6 @@
ios
android
src/abis/types
generated*.ts
__generated__/
.eslintrc.js

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,12 @@
diff --git a/RNFastImage.podspec b/RNFastImage.podspec
index db0fada63fc06191f8620d336d244edde6c3dba3..286fa816e47996fdff9f25261644d612c682ae0b 100644
--- a/RNFastImage.podspec
+++ b/RNFastImage.podspec
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m}"
s.dependency 'React-Core'
- s.dependency 'SDWebImage', '~> 5.11.1'
+ s.dependency 'SDWebImage', '~> 5.15.5'
s.dependency 'SDWebImageWebPCoder', '~> 0.8.4'
end

1
apps/mobile/CODEOWNERS Normal file
View File

@@ -0,0 +1 @@
* @Uniswap/mobile-release-admins

10
apps/mobile/Gemfile Normal file
View File

@@ -0,0 +1,10 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!
source "https://rubygems.org"
gem 'fastlane'
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

222
apps/mobile/Gemfile.lock Normal file
View File

@@ -0,0 +1,222 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
rexml
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.805.0)
aws-sdk-core (3.180.3)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.71.0)
aws-sdk-core (~> 3, >= 3.177.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.132.1)
aws-sdk-core (~> 3, >= 3.179.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.6)
aws-sigv4 (1.6.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.100.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.7)
fastlane (2.214.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (~> 0.1.1)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-get_version_name (0.2.2)
fastlane-plugin-versioning_android (0.1.1)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.48.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.1)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.19.0)
google-apis-core (>= 0.9.0, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-storage (1.44.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.19.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.7.0)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.5)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.6.3)
jwt (2.7.1)
memoist (0.16.2)
mini_magick (4.12.0)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.3.0)
nanaimo (0.3.0)
naturally (2.2.1)
optparse (0.1.1)
os (1.1.4)
plist (3.7.0)
public_suffix (5.0.3)
rake (13.0.6)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.6)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.17.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.10)
CFPropertyList
naturally
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
webrick (1.8.1)
word_wrap (1.0.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
ruby
DEPENDENCIES
fastlane
fastlane-plugin-get_version_name
fastlane-plugin-versioning_android
BUNDLED WITH
1.17.2

204
apps/mobile/README.md Normal file
View File

@@ -0,0 +1,204 @@
# Uniswap Wallet
[Uniswap Wallet](https://wallet.uniswap.org/) is the simplest, safest, and most powerful self-custodial crypto wallet. It is developed by the Uniswap Labs team, inventors of the Uniswap Protocol.
If you have suggestions on how we can improve the app, or would like to report a bug or a problem, check out the [Uniswap Help Center](https://support.uniswap.org/).
## Setup
### Requirements
This guide assumes that:
- You are using a Mac (you will need a Mac computer in order to run the Xcode iOS Simulator)
- You are using an Apple Silicon Mac (if youre not sure, go to  → About this Mac and check if the chip name starts with "Apple")
Note: if you are indeed using an Apple Silicon Mac, we recommend setting up your environment _without_ using Rosetta. Some instructions on how to do that can be found [here](https://medium.com/@davidjasonharding/developing-a-react-native-app-on-an-m1-mac-without-rosetta-29fcc7314d70).
### Packages and Software
#### Xcode
You should start with downloading Xcode if you don't already have it installed, since the file is so large. You can find it here: [developer.apple.com/xcode](https://developer.apple.com/xcode/)
You must use **XCode 15** to compile the app.
#### Homebrew
Well be using Homebrew to install many of the other required tools through the command line.
1. Open a terminal
2. Copy and paste the command from [brew.sh](https://brew.sh/) into your terminal and run it
#### nvm
`nvm` is the Node Version Manager. While not required, it makes it easy to install Node and switch between different versions. A minimum Node version of 18 is required to use this repository.
Copy the curl command listed under _Install & Update Script_ on [this page](https://github.com/nvm-sh/nvm#install--update-script) and run it in your terminal.
To make sure nvm installed correctly, try running `nvm -v` (you may need to quit and re-open the terminal window). It should return a version number. If it returns something like `zsh: command not found: nvm`, it hasnt been installed correctly.
#### node
Now we want to use nvm to install a specific version of node.
Run the following command in your terminal:
`nvm install 18`
and then when its finished, run:
`nvm use 18`
Quit and re-open the terminal, and then run:
`node -v`
to make sure you get a version number that starts with `v18.`.
#### yarn
We use yarn as our package manager and to run scripts.
Run the following command to install it:
`npm install --global yarn`
(npm comes with node, so it should work if the above step has been completed correctly)
Then run:
`yarn -v`
to see if it installed correctly.
#### Ruby
Use `rbenv` to install a specific version of `ruby`:
`brew install rbenv ruby-build`
Run `rbenv init` and follow the instructions to complete the installation.
After following the instructions, make sure you `source` your `.zshrc` or `.bash_profile`, or start a new terminal session.
Install a version of `ruby`:
`rbenv install 3.2.2`
Set this as your default version:
`rbenv global 3.2.2`
#### CocoaPods
Install cocoapods:
`gem install cocoapods -v 1.13.0`
### Add Xcode Command Line Tools
Open Xcode and go to:
`Preferences → Locations → Command Line Tools`
And select the version that pops up.
## Development
Once all the setup steps above are completed, you're ready to try running the app locally!
### Environment variables
Note: The app will likely have limited functionality when running it locally with the default environment variables.
Use the environment variables defined in the `.env.defaults.local` file to run the app locally.
### Compile contract ABI types
This is done in bootstrap but good to know about. Before the code will compile you need to generate types for the smart contracts the wallet interacts with. Run `yarn g:prepare` at the top level. Re-run this if the ABIs are ever changed.
### Run the app
In the root directory, run `yarn` to install all the necessary npm packages.
Then run `yarn mobile pod` to install all the necessary pods. (You may need to updated source repos with `pod repo update` if this fails.)
Finally, run `yarn mobile ios` to boot up the iOS Simulator and run the app inside it. The JS bundler (metro) should automatically open in a new terminal window. If it does not, start it manually with `yarn start`.
Or you can use one command to run them all one after the other: `yarn && yarn pod && yarn ios`
You can also run the app from Xcode, which is necessary for any Swift related changes. Xcode will automatically start the metro bundler.
Hopefully you now (after a few minutes) see the Uniswap Wallet running in the iOS Simulator!
### Enabling Flipper
We do not check Flipper into source. To prevent `pod install` from adding Flipper, set an environment variable in your `.bash_profile` or `.zshrc` or `.zprofile`:
```bash
# To enable flipper inclusion (optional)
export USE_FLIPPER=1
```
Note: To disable Flipper, the whole line should be commented out, as setting this value to 0 will not disable Flipper.
## Important Libraries and Tools
These are some tools you might want to familiarize yourself with to understand the codebase better and how different aspects of it work.
- [Redux](https://redux.js.org/) and [Redux Toolkit](https://redux-toolkit.js.org/): state management
- [redux-saga](https://redux-saga.js.org/) & [typed-redux-saga](https://github.com/agiledigital/typed-redux-saga): Redux side effect manager -- used for complex/stateful network calls
- [ethers](https://docs.ethers.io/v5/)
- [Tamagui](https://tamagui.dev): UI framework
- [React navigation](https://reactnavigation.org/): routing and navigation with animations and gestures
- [react-i18next](https://react.i18next.com/): i18n
## Migrations
We use `redux-persist` to persist Redux state between user sessions. When the Redux state schema is altered, a migration may be needed to transfer the existing persisted state to the new Redux schema. Failing to define a migration results in the app defaulting to the persisted schema, which will very likely cause `undefined` errors because the code has references to Redux state properties that were dropped in favor the the persisted schema.
### When to define a migration
Anytime a required property is added or any property is renamed or deleted to/from Redux state. Migrations are not necessary when optional properties are added to an existing slice. Make sure to always add new required properties to the `schema.ts` file as well.
### How to migrate
1. Increment the `version` of `persistConfig` defined within `store.ts`
2. Create a migration function within `migrations.ts`. The migration key should be the same as the `version` defined in the previous step
3. Write a test for your migration within `migrations.test.ts`
4. Create a new schema within `schema.ts` and ensure it is being exported by the `getSchema` function at the bottom of the file
## Troubleshooting
### Common issues
- `zsh: command not found: [package name]`
This means whichever package you're trying to run (`[package name]`) wasnt correctly installed, or your Terminal cant figure out how to run it. If you just installed it, try quitting terminal and re-opening it. Otherwise try reinstalling the package.
- `unable to open file (in target "OneSignalNotificationServiceExtension" in project "Uniswap")`.
Resolve this issue by navigating to the `ios/` directory and running `pod update`.
### Common fixes
If something isnt working the way it should or youre getting a weird error when trying to run the app, try the following:
1. Quit the terminal
2. Quit Metro terminal
3. Open Finder and navigate to the `mobile` directory
4. Delete the `node_modules` folder
5. Navigate into the `ios` folder
6. Delete the `Pods` folder
7. Open XCode
8. Go to Product → Clean Build Folder
9. Open your terminal again
10. Navigate to the `mobile` directory in the terminal
11. Run `yarn && yarn pod` again
12. Run `yarn ios`
### Shell profile setup
Your shell profile file is most likely one of: `.bash_profile`, `.zshrc`, or `.zprofile`, and will be located in `/Users/[username]/`. You can reveal hidden files in Finder by pressing `⌘` + `Shift` + `.`.
If issues with your terminal or shell seem to be the cause of some of your problems, here is an example of what that file may look like in order for your terminal to be able to run the app locally:
```zsh
eval "$(/opt/homebrew/bin/brew shellenv)"
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
# To enable flipper inclusion (optional)
export USE_FLIPPER=1
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
```

View File

@@ -0,0 +1,8 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
export default {
app: () => ({
auth: () => ({
signInAnonymously: () => undefined,
}),
}),
}

View File

@@ -0,0 +1 @@
export default {}

View File

@@ -0,0 +1 @@
export default {}

View File

@@ -0,0 +1,13 @@
import React, { PropsWithChildren, ReactNode } from 'react'
import { View, ViewProps } from 'react-native'
// react-native-masked-view for Storybook web
// https://github.com/react-native-masked-view/masked-view/issues/70#issuecomment-1171801526
function MaskedViewWeb({
maskElement,
...props
}: PropsWithChildren<{ maskElement: ReactNode }>): React.CElement<ViewProps, View> {
return React.createElement(View, props, maskElement)
}
export default MaskedViewWeb

View File

@@ -0,0 +1,22 @@
import React, { PropsWithChildren } from 'react'
import { View, ViewProps } from 'react-native'
// Source: https://github.com/Shopify/react-native-skia/issues/548#issuecomment-1157609472
const PlainView = ({
children,
...props
}: PropsWithChildren<unknown>): React.CElement<ViewProps, View> => {
return React.createElement(View, props, children)
}
const noop = (): null => null
export const BlurMask = PlainView
export const Canvas = PlainView
export const Circle = PlainView
export const Group = PlainView
export const LinearGradient = PlainView
export const Mask = PlainView
export const Path = PlainView
export const Rect = PlainView
export const vec = noop

View File

@@ -0,0 +1,11 @@
import React, { PropsWithChildren } from 'react'
import { View, ViewProps } from 'react-native'
const PlainView = ({
children,
...props
}: PropsWithChildren<unknown>): React.CElement<ViewProps, View> => {
return React.createElement(View, props, children)
}
export default PlainView

View File

@@ -0,0 +1,13 @@
import React, { PropsWithChildren } from 'react'
import { Image, ImageProps } from 'react-native'
const PlainImage = ({
children,
...props
}: PropsWithChildren<ImageProps>): React.CElement<ImageProps, Image> => {
return React.createElement(Image, props, children)
}
PlainImage.resizeMode = {}
export default PlainImage

View File

@@ -0,0 +1 @@
export default {}

View File

@@ -0,0 +1,4 @@
KEYSTORE_FILE=op://Android/keystore-properties-$APP_ENV/storeFile
STORE_PASSWORD=op://Android/keystore-properties-$APP_ENV/storePassword
KEYSTORE_ALIAS=op://Android/keystore-properties-$APP_ENV/keyAlias
KEY_PASSWORD=op://Android/keystore-properties-$APP_ENV/keyPassword

View File

@@ -0,0 +1,4 @@
# Known Issues
Android 14 (API level 34) features cannot be used until we upgrade to React Native 0.71.13. That means that the sdk versions cannot be upgraded to 34 until React Native is also upgraded.
https://github.com/facebook/react-native/issues/37769

View File

@@ -0,0 +1,251 @@
import com.android.build.OutputFile
plugins {
id 'com.android.application'
id 'com.facebook.react'
id 'com.google.gms.google-services'
id 'maven-publish'
id 'kotlin-android'
}
def nodeModulesPath = "../../../../node_modules"
def rnRoot = "../.."
def keystorePropertiesFile = rootProject.file("keystore.properties");
def keystoreProperties = new Properties()
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
react {
root = file("$rnRoot/")
reactNativeDir = file("$nodeModulesPath/react-native")
codegenDir = file("$nodeModulesPath/react-native-codegen")
cliFile = file("$nodeModulesPath/react-native/cli.js")
debuggableVariants = ["devDebug", "betaDebug", "prodDebug"]
hermesCommand = "../../node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc" // This is relative to the project root.
}
/**
* Set this to true to create four separate APKs instead of one,
* one for each native architecture. This is useful if you don't
* use App Bundles (https://developer.android.com/guide/app-bundle/)
* and want to have separate APKs to upload to the Play Store.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore (JSC)
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc-intl:+'
/**
* Private function to get the list of Native Architectures you want to build.
* This reads the value from reactNativeArchitectures in your gradle.properties
* file and works together with the --active-arch-only flag of react-native run-android.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}
boolean isCI = System.getenv('CI') != null
boolean sentryPropertiesAvailable = System.getenv('SENTRY_AUTH_TOKEN') != null && System.getenv('SENTRY_PROJECT') != null && System.getenv('SENTRY_ORG') != null
if (isCI && sentryPropertiesAvailable) {
project.ext.sentryCli = [
logLevel: "info",
]
apply from: "../../../../node_modules/@sentry/react-native/sentry.gradle"
apply plugin: "io.sentry.android.gradle"
sentry {
uploadNativeSymbols = true
includeNativeSources = true
autoInstallation {
enabled = false
}
}
}
android {
ndkVersion rootProject.ext.ndkVersion
namespace "com.uniswap"
defaultConfig {
applicationId "com.uniswap.mobile"
compileSdk rootProject.ext.compileSdkVersion
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
multiDexEnabled true
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include (*reactNativeArchitectures())
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
storeFile file(System.getenv("ANDROID_KEYSTORE_FILE") ?: 'keystore.jks')
storePassword System.getenv("ANDROID_STORE_PASSWORD") ?: keystoreProperties.getProperty("STORE_PASSWORD")
keyAlias System.getenv("ANDROID_KEYSTORE_ALIAS") ?: keystoreProperties.getProperty("KEYSTORE_ALIAS")
keyPassword System.getenv("ANDROID_KEY_PASSWORD") ?: keystoreProperties.getProperty("KEY_PASSWORD")
}
}
flavorDimensions += "variant"
productFlavors {
dev {
isDefault(true)
applicationIdSuffix ".dev"
versionName "1.18"
dimension "variant"
}
beta {
applicationIdSuffix ".beta"
versionName "1.18"
dimension "variant"
}
prod {
dimension "variant"
versionName "1.18"
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}
}
}
packagingOptions {
resources.excludes.add("META-INF/*")
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.6"
}
sourceSets {
main {
jniLibs {
srcDir '../../../../node_modules/@uniswap/ethers-rs-mobile/android/jniLibs'
}
}
}
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation "com.facebook.react:react-android"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
// Used to deal with Flipper/OkHttp issues with DevSupportManager
implementation "androidx.multidex:multidex:$multidexVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerialization"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle"
implementation 'com.google.android.play:integrity:1.2.0'
// Guava
implementation "com.google.guava:guava:24.1-jre"
// Guava fix
implementation "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava"
//TODO: Revisit dependencies during security audit
//Drive
implementation('com.google.api-client:google-api-client-android:2.1.0') {
exclude group: 'org.apache.httpcomponents'
exclude module: 'guava-jdk5'
}
implementation('com.google.apis:google-api-services-drive:v3-rev20221023-2.0.0') {
exclude group: 'org.apache.httpcomponents'
exclude module: 'guava-jdk5'
}
implementation 'com.google.android.gms:play-services-auth:20.4.0'
implementation 'com.google.api-client:google-api-client-jackson2:1.31.1'
implementation 'com.google.auth:google-auth-library-oauth2-http:1.11.0'
implementation "androidx.compose.foundation:foundation:$compose"
implementation "androidx.compose.material:material:$compose"
implementation "androidx.compose.ui:ui:$compose"
implementation "androidx.security:security-crypto:1.0.0"
implementation 'com.lambdapioneer.argon2kt:argon2kt:1.3.0'
implementation "com.google.accompanist:accompanist-flowlayout:$flowlayout"
implementation project(':@sentry_react-native')
// Used for device-reported performance class.
implementation("androidx.core:core-performance:$corePerf")
implementation("androidx.core:core-performance-play-services:$corePerf")
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
}
apply from: file("${nodeModulesPath}/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

Binary file not shown.

View File

@@ -0,0 +1,10 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<application
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning"
tools:targetApi="28">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter android:autoVerify="true" android:priority="1">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
<data android:host="uniswap.org" />
<data android:host="app.uniswap.org" />
<data android:host="uniswap.com" />
<data android:host="app.uniswap.com" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources>
<string name="app_name">Uniswap Beta</string>
</resources>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>

View File

@@ -0,0 +1,71 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.uniswap;
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
import com.facebook.flipper.core.FlipperClient;
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
import okhttp3.OkHttpClient;
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
client.addPlugin(new DatabasesFlipperPlugin(context));
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
NetworkingModule.setCustomClientBuilder(
new NetworkingModule.CustomClientBuilder() {
@Override
public void apply(OkHttpClient.Builder builder) {
builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
}
});
client.addPlugin(networkFlipperPlugin);
client.start();
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
// Hence we run if after all native modules have been initialized
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
new ReactInstanceManager.ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
reactContext.runOnNativeModulesQueueThread(
new Runnable() {
@Override
public void run() {
client.addPlugin(new FrescoFlipperPlugin());
}
});
}
});
} else {
client.addPlugin(new FrescoFlipperPlugin());
}
}
}
}

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning"
tools:targetApi="28">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter android:autoVerify="true" android:priority="2">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
<data android:host="uniswap.org" />
<data android:host="app.uniswap.org" />
<data android:host="uniswap.com" />
<data android:host="app.uniswap.com" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Some files were not shown because too many files have changed in this diff Show More