* 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
* 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
* 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
* fix: rename WrappedTokenInfo class
* delete old wrappedTokenInfo file
* rename to TokenFromList
* move back to state/lists
* appease linter
* fix nftlistrow
* 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
* 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
* 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>
* 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>
* fix: use discontinued project for low volume test
* use token I created
* update comment
* no info available
* remove socials
* update comment
* checksummed address
* 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>
* 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
* 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
* 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>
* fix: should show slippage/deadline on LP flow settings
* write unit tests & update
---------
Co-authored-by: Kristie Huang <kristie.huang@uniswap.org>
* 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
* 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
* 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
* feat: block link previews for blocked collections
* update collection test
* single invalid
* move blocklist to its own const file
* rename file to blocklist
* 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>
* 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
* 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>
* 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
* 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
* 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
* 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
* 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>
* 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.
* 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
* 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
* 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
* 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>
* 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
* 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
* 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>
* 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>
* 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>
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.
@@ -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. */
An open source repository for all Uniswap front end interfaces maintained by Uniswap Labs. Uniswap is a protocol for decentralized exchange of Ethereum tokens.
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 | [](https://crowdin.com/project/uniswap-interface) |
| mobile | [](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>
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.
[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 you’re 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
We’ll 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 hasn’t 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 it’s 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)
exportUSE_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
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]`) wasn’t correctly installed, or your Terminal can’t 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 isn’t working the way it should or you’re 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)"
exportNVM_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
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.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.