uniswap-interface-uncensored/src/pages/App.tsx

135 lines
4.9 KiB
TypeScript
Raw Normal View History

import React from 'react'
2020-09-24 19:18:57 +03:00
import { Route, Switch } from 'react-router-dom'
import styled from 'styled-components/macro'
import GoogleAnalyticsReporter from '../components/analytics/GoogleAnalyticsReporter'
2020-09-24 19:18:57 +03:00
import AddressClaimModal from '../components/claim/AddressClaimModal'
import Header from '../components/Header'
2020-09-24 19:18:57 +03:00
import Polling from '../components/Header/Polling'
import Popups from '../components/Popups'
import Web3ReactManager from '../components/Web3ReactManager'
import ErrorBoundary from '../components/ErrorBoundary'
2020-09-24 19:18:57 +03:00
import { ApplicationModal } from '../state/application/actions'
import { useModalOpen, useToggleModal } from '../state/application/hooks'
import DarkModeQueryParamReader from '../theme/DarkModeQueryParamReader'
Add page MVP UI + v3 pool hooks and state (#35) * WIP start usePool and useDerivedMint hooks * naming updates * Use real tick and pool math * rate updates * WIP start usePool and useDerivedMint hooks * naming updates * Use real tick and pool math * rate updates * fix warnings * fix incorrect import * clean up state, fix preview * same token check * amoutn parse update * update hard coded chain id * fix price creation in util * update 1 amount in price calculation * update comments * update tick spacing input * fix label on counter * update rate label on range select * update labels * fixing pool hook * clean pool hook * preserve working rate switching * reset values on rate switch * clean up derived hook - setup for testnet * format slippage amounts and support ETH * fix import error * fix package.json dependencies * silence warnings * silence more warnings * bump multicodec and multihashes * update migrator constants * update txn to use sdk calldata * fix txn formatting, update summary * Squashed commit of the following: commit b81ff7ca9e57bb8c3823be4c54827e5955fb3d15 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 12 23:46:09 2021 -0400 fix txn formatting, update summary commit b9f91b0746c546602d336c8fd6f614ec9b4f3f19 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 12 19:29:12 2021 -0400 update txn to use sdk calldata commit 20acf704c67cfd4f597494c8cb9c672c6270ae02 Merge: 4431914 2462901 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:33:39 2021 -0400 Merge branch 'minting' of https://github.com/Uniswap/v3-interface into minting commit 44319146372e1c373b025741ae896fa2476e5765 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:32:35 2021 -0400 update migrator constants commit 35e0618de06ba316d3a3f327075625760414ab83 Merge: 8927882 c3f65e3 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:13:36 2021 -0400 Merge branch 'main' of https://github.com/Uniswap/v3-interface into minting commit 24629019e80c368c337a2679a51d4acb1097171c Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 15:56:25 2021 -0400 bump multicodec and multihashes commit 9b5dd1876a64acbf6694d208b608bb0b429e317f Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:59:09 2021 -0400 silence more warnings commit 140ddc1b54c7fbdd7ead2fa64bcc302f201d69f5 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:57:58 2021 -0400 silence warnings commit 5a2726ebdd4ffaacfb3d8ec7903a944042c1bd9d Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:35:01 2021 -0400 fix package.json dependencies commit 7c4d0a40931338de9a6197652b82fdab773483e3 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:21:46 2021 -0400 fix import error commit e49ef19cbef7fbdf1737787a439e7cb78ba295b4 Merge: 8927882 c3f65e3 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:08:34 2021 -0400 Merge branch 'main' into minting commit 89278825bd798a87d6010a74f8fc1d2b34a8ece1 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 8 15:18:40 2021 -0400 format slippage amounts and support ETH commit 9a90b19e9a759cbc0c3e903a983660730c8833ad Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 19:43:43 2021 -0400 clean up derived hook - setup for testnet commit dc034bc78a147f95f47b077d28a7d6e3165cedd7 Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 00:48:24 2021 -0400 reset values on rate switch commit bb5ccb2c853f7b2c27ec8d2f34f42a1b06f845b9 Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 00:38:39 2021 -0400 preserve working rate switching commit 5312d0ae7015150da48ba304de8c7a02b7d8925c Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 13:52:46 2021 -0400 clean pool hook commit 5222de14834e76c37755225be17214a6e798d872 Merge: b2ba466 24521f0 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 12:20:34 2021 -0400 Merge branch 'main' of https://github.com/Uniswap/v3-interface into minting commit b2ba46684a7b0bd8a8362f5990f4a208bfeff2dd Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 12:19:20 2021 -0400 fixing pool hook commit b10742af99a725e04c1b756aa20f99e995f8cfeb Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 16:53:52 2021 -0400 update labels commit 05abd395949245596c95090a9d5d77c7c272dbd3 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:34:17 2021 -0400 update rate label on range select commit f098d01b6f4dc1dcb99e0fa314dde93647a19bb6 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:26:30 2021 -0400 fix label on counter commit 16ffe61e8ee2b677adf5d468efa9d7aa8d7e092e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:06:50 2021 -0400 update tick spacing input commit 0fa2c8a15821dd32ec978750991a962ecb8f7344 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:53:18 2021 -0400 update comments commit 1fccf57a1ef081ef6ba9790dc20e0ed604ac2b09 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:52:37 2021 -0400 update 1 amount in price calculation commit b0e5d22bf8c57b3eacd75f077f68aaca4a9f975a Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:46:41 2021 -0400 fix price creation in util commit 1ce246e85372e4f120f983ca18a1eb3d16e8647e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:55:14 2021 -0400 update hard coded chain id commit 2360b2d0a3233b604956e89de4bd7b09c0506875 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:09:21 2021 -0400 amoutn parse update commit 6a99a7b71fe446fe77cb2741adce4c067862ca4a Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:05:41 2021 -0400 same token check commit 83a1fd5a9ff02c6a49532cb54a57770b52fc052e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 12:31:21 2021 -0400 clean up state, fix preview commit 8592383b8386d7adbbaeaa2c6f9c36bb121d1c65 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:47:56 2021 -0400 fix incorrect import commit ce526fd545e52142f847dbf3caec1ca37bb0650b Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:36:10 2021 -0400 fix warnings commit 572770fd3e000ce31cd3a6c5c5c91eac92cc8c5c Merge: a9e5b6c 2677491 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:16:30 2021 -0400 Merge branch 'minting' of https://github.com/Uniswap/v3-interface into minting commit a9e5b6c5e5983e279a640886783f97c33b713125 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:12:43 2021 -0400 rate updates commit b88cab6c06176eefe5cf71f7cc3e3664d9f514ab Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 16:15:08 2021 -0400 Use real tick and pool math commit ed933cfd17141174c03b0bcac5f41cf75ff9b258 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:42:05 2021 -0400 naming updates commit 50c0a0ece5c6c66a603508529c5e7a28f45db632 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:36:08 2021 -0400 WIP start usePool and useDerivedMint hooks commit 2677491e2128e1318a0dd4307e63069e0f8e1dfe Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:12:43 2021 -0400 rate updates commit c2f59d6c61068a2bf4d34d102d5d28c9863ce982 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 16:15:08 2021 -0400 Use real tick and pool math commit 7d53e5c7e979be19fc5c63eb52307f302328c4eb Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:42:05 2021 -0400 naming updates commit 9022650d391682f97e71d336021c2db2e5ea5455 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:36:08 2021 -0400 WIP start usePool and useDerivedMint hooks * remove 1337 references * clean up multicall * clean up redirects/router * cleanup * improve useAllV3Ticks * fix multicall * typo * Fix code style issues with ESLint * preserve sticky * reset to non fixed scroll * fix inputs at 1 * update tests * fix routes * sticky sidebar Co-authored-by: Noah Zinsmeister <noahwz@gmail.com> Co-authored-by: Lint Action <lint-action@samuelmeuli.com> Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2021-04-14 17:12:35 +03:00
import { RedirectDuplicateTokenIds } from './AddLiquidity/redirects'
import Earn from './Earn'
import Manage from './Earn/Manage'
import MigrateV2 from './MigrateV2'
import MigrateV2Pair from './MigrateV2/MigrateV2Pair'
import Pool from './Pool'
import PoolV2 from './Pool/v2'
import PoolFinder from './PoolFinder'
import RemoveLiquidity from './RemoveLiquidity'
import RemoveLiquidityV3 from './RemoveLiquidity/V3'
import Swap from './Swap'
2020-09-24 19:18:57 +03:00
import { OpenClaimAddressModalAndRedirectToSwap, RedirectPathToSwapOnly, RedirectToSwap } from './Swap/redirects'
import Vote from './Vote'
import VotePage from './Vote/VotePage'
Add page MVP UI + v3 pool hooks and state (#35) * WIP start usePool and useDerivedMint hooks * naming updates * Use real tick and pool math * rate updates * WIP start usePool and useDerivedMint hooks * naming updates * Use real tick and pool math * rate updates * fix warnings * fix incorrect import * clean up state, fix preview * same token check * amoutn parse update * update hard coded chain id * fix price creation in util * update 1 amount in price calculation * update comments * update tick spacing input * fix label on counter * update rate label on range select * update labels * fixing pool hook * clean pool hook * preserve working rate switching * reset values on rate switch * clean up derived hook - setup for testnet * format slippage amounts and support ETH * fix import error * fix package.json dependencies * silence warnings * silence more warnings * bump multicodec and multihashes * update migrator constants * update txn to use sdk calldata * fix txn formatting, update summary * Squashed commit of the following: commit b81ff7ca9e57bb8c3823be4c54827e5955fb3d15 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 12 23:46:09 2021 -0400 fix txn formatting, update summary commit b9f91b0746c546602d336c8fd6f614ec9b4f3f19 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 12 19:29:12 2021 -0400 update txn to use sdk calldata commit 20acf704c67cfd4f597494c8cb9c672c6270ae02 Merge: 4431914 2462901 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:33:39 2021 -0400 Merge branch 'minting' of https://github.com/Uniswap/v3-interface into minting commit 44319146372e1c373b025741ae896fa2476e5765 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:32:35 2021 -0400 update migrator constants commit 35e0618de06ba316d3a3f327075625760414ab83 Merge: 8927882 c3f65e3 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:13:36 2021 -0400 Merge branch 'main' of https://github.com/Uniswap/v3-interface into minting commit 24629019e80c368c337a2679a51d4acb1097171c Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 15:56:25 2021 -0400 bump multicodec and multihashes commit 9b5dd1876a64acbf6694d208b608bb0b429e317f Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:59:09 2021 -0400 silence more warnings commit 140ddc1b54c7fbdd7ead2fa64bcc302f201d69f5 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:57:58 2021 -0400 silence warnings commit 5a2726ebdd4ffaacfb3d8ec7903a944042c1bd9d Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:35:01 2021 -0400 fix package.json dependencies commit 7c4d0a40931338de9a6197652b82fdab773483e3 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:21:46 2021 -0400 fix import error commit e49ef19cbef7fbdf1737787a439e7cb78ba295b4 Merge: 8927882 c3f65e3 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:08:34 2021 -0400 Merge branch 'main' into minting commit 89278825bd798a87d6010a74f8fc1d2b34a8ece1 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 8 15:18:40 2021 -0400 format slippage amounts and support ETH commit 9a90b19e9a759cbc0c3e903a983660730c8833ad Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 19:43:43 2021 -0400 clean up derived hook - setup for testnet commit dc034bc78a147f95f47b077d28a7d6e3165cedd7 Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 00:48:24 2021 -0400 reset values on rate switch commit bb5ccb2c853f7b2c27ec8d2f34f42a1b06f845b9 Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 00:38:39 2021 -0400 preserve working rate switching commit 5312d0ae7015150da48ba304de8c7a02b7d8925c Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 13:52:46 2021 -0400 clean pool hook commit 5222de14834e76c37755225be17214a6e798d872 Merge: b2ba466 24521f0 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 12:20:34 2021 -0400 Merge branch 'main' of https://github.com/Uniswap/v3-interface into minting commit b2ba46684a7b0bd8a8362f5990f4a208bfeff2dd Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 12:19:20 2021 -0400 fixing pool hook commit b10742af99a725e04c1b756aa20f99e995f8cfeb Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 16:53:52 2021 -0400 update labels commit 05abd395949245596c95090a9d5d77c7c272dbd3 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:34:17 2021 -0400 update rate label on range select commit f098d01b6f4dc1dcb99e0fa314dde93647a19bb6 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:26:30 2021 -0400 fix label on counter commit 16ffe61e8ee2b677adf5d468efa9d7aa8d7e092e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:06:50 2021 -0400 update tick spacing input commit 0fa2c8a15821dd32ec978750991a962ecb8f7344 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:53:18 2021 -0400 update comments commit 1fccf57a1ef081ef6ba9790dc20e0ed604ac2b09 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:52:37 2021 -0400 update 1 amount in price calculation commit b0e5d22bf8c57b3eacd75f077f68aaca4a9f975a Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:46:41 2021 -0400 fix price creation in util commit 1ce246e85372e4f120f983ca18a1eb3d16e8647e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:55:14 2021 -0400 update hard coded chain id commit 2360b2d0a3233b604956e89de4bd7b09c0506875 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:09:21 2021 -0400 amoutn parse update commit 6a99a7b71fe446fe77cb2741adce4c067862ca4a Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:05:41 2021 -0400 same token check commit 83a1fd5a9ff02c6a49532cb54a57770b52fc052e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 12:31:21 2021 -0400 clean up state, fix preview commit 8592383b8386d7adbbaeaa2c6f9c36bb121d1c65 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:47:56 2021 -0400 fix incorrect import commit ce526fd545e52142f847dbf3caec1ca37bb0650b Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:36:10 2021 -0400 fix warnings commit 572770fd3e000ce31cd3a6c5c5c91eac92cc8c5c Merge: a9e5b6c 2677491 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:16:30 2021 -0400 Merge branch 'minting' of https://github.com/Uniswap/v3-interface into minting commit a9e5b6c5e5983e279a640886783f97c33b713125 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:12:43 2021 -0400 rate updates commit b88cab6c06176eefe5cf71f7cc3e3664d9f514ab Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 16:15:08 2021 -0400 Use real tick and pool math commit ed933cfd17141174c03b0bcac5f41cf75ff9b258 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:42:05 2021 -0400 naming updates commit 50c0a0ece5c6c66a603508529c5e7a28f45db632 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:36:08 2021 -0400 WIP start usePool and useDerivedMint hooks commit 2677491e2128e1318a0dd4307e63069e0f8e1dfe Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:12:43 2021 -0400 rate updates commit c2f59d6c61068a2bf4d34d102d5d28c9863ce982 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 16:15:08 2021 -0400 Use real tick and pool math commit 7d53e5c7e979be19fc5c63eb52307f302328c4eb Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:42:05 2021 -0400 naming updates commit 9022650d391682f97e71d336021c2db2e5ea5455 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:36:08 2021 -0400 WIP start usePool and useDerivedMint hooks * remove 1337 references * clean up multicall * clean up redirects/router * cleanup * improve useAllV3Ticks * fix multicall * typo * Fix code style issues with ESLint * preserve sticky * reset to non fixed scroll * fix inputs at 1 * update tests * fix routes * sticky sidebar Co-authored-by: Noah Zinsmeister <noahwz@gmail.com> Co-authored-by: Lint Action <lint-action@samuelmeuli.com> Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2021-04-14 17:12:35 +03:00
import { RedirectDuplicateTokenIdsV2 } from './AddLiquidityV2/redirects'
import { PositionPage } from './Pool/PositionPage'
import AddLiquidity from './AddLiquidity'
import ApeModeQueryParamReader from 'hooks/useApeModeQueryParamReader'
import CreateProposal from './CreateProposal'
2019-08-07 21:58:29 +03:00
const AppWrapper = styled.div`
display: flex;
flex-flow: column;
align-items: flex-start;
`
const BodyWrapper = styled.div`
2019-08-07 21:58:29 +03:00
display: flex;
flex-direction: column;
width: 100%;
padding: 120px 16px 0px 16px;
2019-08-07 21:58:29 +03:00
align-items: center;
flex: 1;
2021-04-23 20:03:06 +03:00
z-index: 1;
2020-09-24 19:18:57 +03:00
${({ theme }) => theme.mediaWidth.upToSmall`
padding: 6rem 16px 16px 16px;
`};
`
const HeaderWrapper = styled.div`
${({ theme }) => theme.flexRowNoWrap}
width: 100%;
justify-content: space-between;
position: fixed;
top: 0;
z-index: 2;
`
const Marginer = styled.div`
margin-top: 5rem;
`
2020-09-24 19:18:57 +03:00
function TopLevelModals() {
const open = useModalOpen(ApplicationModal.ADDRESS_CLAIM)
const toggle = useToggleModal(ApplicationModal.ADDRESS_CLAIM)
return <AddressClaimModal isOpen={open} onDismiss={toggle} />
}
export default function App() {
return (
<ErrorBoundary>
<Route component={GoogleAnalyticsReporter} />
<Route component={DarkModeQueryParamReader} />
<Route component={ApeModeQueryParamReader} />
<AppWrapper>
<HeaderWrapper>
<Header />
</HeaderWrapper>
<BodyWrapper>
<Popups />
<Polling />
<TopLevelModals />
<Web3ReactManager>
<Switch>
<Route exact strict path="/vote" component={Vote} />
<Route exact strict path="/vote/:governorIndex/:id" component={VotePage} />
<Route exact strict path="/claim" component={OpenClaimAddressModalAndRedirectToSwap} />
<Route exact strict path="/uni" component={Earn} />
<Route exact strict path="/uni/:currencyIdA/:currencyIdB" component={Manage} />
<Route exact strict path="/send" component={RedirectPathToSwapOnly} />
<Route exact strict path="/swap/:outputCurrency" component={RedirectToSwap} />
<Route exact strict path="/swap" component={Swap} />
<Route exact strict path="/pool/v2/find" component={PoolFinder} />
<Route exact strict path="/pool/v2" component={PoolV2} />
<Route exact strict path="/pool" component={Pool} />
<Route exact strict path="/pool/:tokenId" component={PositionPage} />
Add page MVP UI + v3 pool hooks and state (#35) * WIP start usePool and useDerivedMint hooks * naming updates * Use real tick and pool math * rate updates * WIP start usePool and useDerivedMint hooks * naming updates * Use real tick and pool math * rate updates * fix warnings * fix incorrect import * clean up state, fix preview * same token check * amoutn parse update * update hard coded chain id * fix price creation in util * update 1 amount in price calculation * update comments * update tick spacing input * fix label on counter * update rate label on range select * update labels * fixing pool hook * clean pool hook * preserve working rate switching * reset values on rate switch * clean up derived hook - setup for testnet * format slippage amounts and support ETH * fix import error * fix package.json dependencies * silence warnings * silence more warnings * bump multicodec and multihashes * update migrator constants * update txn to use sdk calldata * fix txn formatting, update summary * Squashed commit of the following: commit b81ff7ca9e57bb8c3823be4c54827e5955fb3d15 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 12 23:46:09 2021 -0400 fix txn formatting, update summary commit b9f91b0746c546602d336c8fd6f614ec9b4f3f19 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 12 19:29:12 2021 -0400 update txn to use sdk calldata commit 20acf704c67cfd4f597494c8cb9c672c6270ae02 Merge: 4431914 2462901 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:33:39 2021 -0400 Merge branch 'minting' of https://github.com/Uniswap/v3-interface into minting commit 44319146372e1c373b025741ae896fa2476e5765 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:32:35 2021 -0400 update migrator constants commit 35e0618de06ba316d3a3f327075625760414ab83 Merge: 8927882 c3f65e3 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:13:36 2021 -0400 Merge branch 'main' of https://github.com/Uniswap/v3-interface into minting commit 24629019e80c368c337a2679a51d4acb1097171c Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 15:56:25 2021 -0400 bump multicodec and multihashes commit 9b5dd1876a64acbf6694d208b608bb0b429e317f Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:59:09 2021 -0400 silence more warnings commit 140ddc1b54c7fbdd7ead2fa64bcc302f201d69f5 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:57:58 2021 -0400 silence warnings commit 5a2726ebdd4ffaacfb3d8ec7903a944042c1bd9d Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:35:01 2021 -0400 fix package.json dependencies commit 7c4d0a40931338de9a6197652b82fdab773483e3 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:21:46 2021 -0400 fix import error commit e49ef19cbef7fbdf1737787a439e7cb78ba295b4 Merge: 8927882 c3f65e3 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:08:34 2021 -0400 Merge branch 'main' into minting commit 89278825bd798a87d6010a74f8fc1d2b34a8ece1 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 8 15:18:40 2021 -0400 format slippage amounts and support ETH commit 9a90b19e9a759cbc0c3e903a983660730c8833ad Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 19:43:43 2021 -0400 clean up derived hook - setup for testnet commit dc034bc78a147f95f47b077d28a7d6e3165cedd7 Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 00:48:24 2021 -0400 reset values on rate switch commit bb5ccb2c853f7b2c27ec8d2f34f42a1b06f845b9 Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 00:38:39 2021 -0400 preserve working rate switching commit 5312d0ae7015150da48ba304de8c7a02b7d8925c Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 13:52:46 2021 -0400 clean pool hook commit 5222de14834e76c37755225be17214a6e798d872 Merge: b2ba466 24521f0 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 12:20:34 2021 -0400 Merge branch 'main' of https://github.com/Uniswap/v3-interface into minting commit b2ba46684a7b0bd8a8362f5990f4a208bfeff2dd Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 12:19:20 2021 -0400 fixing pool hook commit b10742af99a725e04c1b756aa20f99e995f8cfeb Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 16:53:52 2021 -0400 update labels commit 05abd395949245596c95090a9d5d77c7c272dbd3 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:34:17 2021 -0400 update rate label on range select commit f098d01b6f4dc1dcb99e0fa314dde93647a19bb6 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:26:30 2021 -0400 fix label on counter commit 16ffe61e8ee2b677adf5d468efa9d7aa8d7e092e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:06:50 2021 -0400 update tick spacing input commit 0fa2c8a15821dd32ec978750991a962ecb8f7344 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:53:18 2021 -0400 update comments commit 1fccf57a1ef081ef6ba9790dc20e0ed604ac2b09 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:52:37 2021 -0400 update 1 amount in price calculation commit b0e5d22bf8c57b3eacd75f077f68aaca4a9f975a Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:46:41 2021 -0400 fix price creation in util commit 1ce246e85372e4f120f983ca18a1eb3d16e8647e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:55:14 2021 -0400 update hard coded chain id commit 2360b2d0a3233b604956e89de4bd7b09c0506875 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:09:21 2021 -0400 amoutn parse update commit 6a99a7b71fe446fe77cb2741adce4c067862ca4a Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:05:41 2021 -0400 same token check commit 83a1fd5a9ff02c6a49532cb54a57770b52fc052e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 12:31:21 2021 -0400 clean up state, fix preview commit 8592383b8386d7adbbaeaa2c6f9c36bb121d1c65 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:47:56 2021 -0400 fix incorrect import commit ce526fd545e52142f847dbf3caec1ca37bb0650b Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:36:10 2021 -0400 fix warnings commit 572770fd3e000ce31cd3a6c5c5c91eac92cc8c5c Merge: a9e5b6c 2677491 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:16:30 2021 -0400 Merge branch 'minting' of https://github.com/Uniswap/v3-interface into minting commit a9e5b6c5e5983e279a640886783f97c33b713125 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:12:43 2021 -0400 rate updates commit b88cab6c06176eefe5cf71f7cc3e3664d9f514ab Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 16:15:08 2021 -0400 Use real tick and pool math commit ed933cfd17141174c03b0bcac5f41cf75ff9b258 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:42:05 2021 -0400 naming updates commit 50c0a0ece5c6c66a603508529c5e7a28f45db632 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:36:08 2021 -0400 WIP start usePool and useDerivedMint hooks commit 2677491e2128e1318a0dd4307e63069e0f8e1dfe Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:12:43 2021 -0400 rate updates commit c2f59d6c61068a2bf4d34d102d5d28c9863ce982 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 16:15:08 2021 -0400 Use real tick and pool math commit 7d53e5c7e979be19fc5c63eb52307f302328c4eb Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:42:05 2021 -0400 naming updates commit 9022650d391682f97e71d336021c2db2e5ea5455 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:36:08 2021 -0400 WIP start usePool and useDerivedMint hooks * remove 1337 references * clean up multicall * clean up redirects/router * cleanup * improve useAllV3Ticks * fix multicall * typo * Fix code style issues with ESLint * preserve sticky * reset to non fixed scroll * fix inputs at 1 * update tests * fix routes * sticky sidebar Co-authored-by: Noah Zinsmeister <noahwz@gmail.com> Co-authored-by: Lint Action <lint-action@samuelmeuli.com> Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2021-04-14 17:12:35 +03:00
<Route exact strict path="/add/v2/:currencyIdA?/:currencyIdB?" component={RedirectDuplicateTokenIdsV2} />
<Route
exact
strict
path="/add/:currencyIdA?/:currencyIdB?/:feeAmount?"
component={RedirectDuplicateTokenIds}
/>
Add page MVP UI + v3 pool hooks and state (#35) * WIP start usePool and useDerivedMint hooks * naming updates * Use real tick and pool math * rate updates * WIP start usePool and useDerivedMint hooks * naming updates * Use real tick and pool math * rate updates * fix warnings * fix incorrect import * clean up state, fix preview * same token check * amoutn parse update * update hard coded chain id * fix price creation in util * update 1 amount in price calculation * update comments * update tick spacing input * fix label on counter * update rate label on range select * update labels * fixing pool hook * clean pool hook * preserve working rate switching * reset values on rate switch * clean up derived hook - setup for testnet * format slippage amounts and support ETH * fix import error * fix package.json dependencies * silence warnings * silence more warnings * bump multicodec and multihashes * update migrator constants * update txn to use sdk calldata * fix txn formatting, update summary * Squashed commit of the following: commit b81ff7ca9e57bb8c3823be4c54827e5955fb3d15 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 12 23:46:09 2021 -0400 fix txn formatting, update summary commit b9f91b0746c546602d336c8fd6f614ec9b4f3f19 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 12 19:29:12 2021 -0400 update txn to use sdk calldata commit 20acf704c67cfd4f597494c8cb9c672c6270ae02 Merge: 4431914 2462901 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:33:39 2021 -0400 Merge branch 'minting' of https://github.com/Uniswap/v3-interface into minting commit 44319146372e1c373b025741ae896fa2476e5765 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:32:35 2021 -0400 update migrator constants commit 35e0618de06ba316d3a3f327075625760414ab83 Merge: 8927882 c3f65e3 Author: ianlapham <ianlapham@gmail.com> Date: Sun Apr 11 20:13:36 2021 -0400 Merge branch 'main' of https://github.com/Uniswap/v3-interface into minting commit 24629019e80c368c337a2679a51d4acb1097171c Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 15:56:25 2021 -0400 bump multicodec and multihashes commit 9b5dd1876a64acbf6694d208b608bb0b429e317f Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:59:09 2021 -0400 silence more warnings commit 140ddc1b54c7fbdd7ead2fa64bcc302f201d69f5 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:57:58 2021 -0400 silence warnings commit 5a2726ebdd4ffaacfb3d8ec7903a944042c1bd9d Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:35:01 2021 -0400 fix package.json dependencies commit 7c4d0a40931338de9a6197652b82fdab773483e3 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:21:46 2021 -0400 fix import error commit e49ef19cbef7fbdf1737787a439e7cb78ba295b4 Merge: 8927882 c3f65e3 Author: Noah Zinsmeister <noahwz@gmail.com> Date: Fri Apr 9 14:08:34 2021 -0400 Merge branch 'main' into minting commit 89278825bd798a87d6010a74f8fc1d2b34a8ece1 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 8 15:18:40 2021 -0400 format slippage amounts and support ETH commit 9a90b19e9a759cbc0c3e903a983660730c8833ad Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 19:43:43 2021 -0400 clean up derived hook - setup for testnet commit dc034bc78a147f95f47b077d28a7d6e3165cedd7 Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 00:48:24 2021 -0400 reset values on rate switch commit bb5ccb2c853f7b2c27ec8d2f34f42a1b06f845b9 Author: ianlapham <ianlapham@gmail.com> Date: Wed Apr 7 00:38:39 2021 -0400 preserve working rate switching commit 5312d0ae7015150da48ba304de8c7a02b7d8925c Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 13:52:46 2021 -0400 clean pool hook commit 5222de14834e76c37755225be17214a6e798d872 Merge: b2ba466 24521f0 Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 12:20:34 2021 -0400 Merge branch 'main' of https://github.com/Uniswap/v3-interface into minting commit b2ba46684a7b0bd8a8362f5990f4a208bfeff2dd Author: ianlapham <ianlapham@gmail.com> Date: Mon Apr 5 12:19:20 2021 -0400 fixing pool hook commit b10742af99a725e04c1b756aa20f99e995f8cfeb Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 16:53:52 2021 -0400 update labels commit 05abd395949245596c95090a9d5d77c7c272dbd3 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:34:17 2021 -0400 update rate label on range select commit f098d01b6f4dc1dcb99e0fa314dde93647a19bb6 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:26:30 2021 -0400 fix label on counter commit 16ffe61e8ee2b677adf5d468efa9d7aa8d7e092e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 15:06:50 2021 -0400 update tick spacing input commit 0fa2c8a15821dd32ec978750991a962ecb8f7344 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:53:18 2021 -0400 update comments commit 1fccf57a1ef081ef6ba9790dc20e0ed604ac2b09 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:52:37 2021 -0400 update 1 amount in price calculation commit b0e5d22bf8c57b3eacd75f077f68aaca4a9f975a Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 14:46:41 2021 -0400 fix price creation in util commit 1ce246e85372e4f120f983ca18a1eb3d16e8647e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:55:14 2021 -0400 update hard coded chain id commit 2360b2d0a3233b604956e89de4bd7b09c0506875 Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:09:21 2021 -0400 amoutn parse update commit 6a99a7b71fe446fe77cb2741adce4c067862ca4a Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 13:05:41 2021 -0400 same token check commit 83a1fd5a9ff02c6a49532cb54a57770b52fc052e Author: ianlapham <ianlapham@gmail.com> Date: Thu Apr 1 12:31:21 2021 -0400 clean up state, fix preview commit 8592383b8386d7adbbaeaa2c6f9c36bb121d1c65 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:47:56 2021 -0400 fix incorrect import commit ce526fd545e52142f847dbf3caec1ca37bb0650b Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:36:10 2021 -0400 fix warnings commit 572770fd3e000ce31cd3a6c5c5c91eac92cc8c5c Merge: a9e5b6c 2677491 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:16:30 2021 -0400 Merge branch 'minting' of https://github.com/Uniswap/v3-interface into minting commit a9e5b6c5e5983e279a640886783f97c33b713125 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:12:43 2021 -0400 rate updates commit b88cab6c06176eefe5cf71f7cc3e3664d9f514ab Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 16:15:08 2021 -0400 Use real tick and pool math commit ed933cfd17141174c03b0bcac5f41cf75ff9b258 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:42:05 2021 -0400 naming updates commit 50c0a0ece5c6c66a603508529c5e7a28f45db632 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:36:08 2021 -0400 WIP start usePool and useDerivedMint hooks commit 2677491e2128e1318a0dd4307e63069e0f8e1dfe Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 22:12:43 2021 -0400 rate updates commit c2f59d6c61068a2bf4d34d102d5d28c9863ce982 Author: ianlapham <ianlapham@gmail.com> Date: Wed Mar 31 16:15:08 2021 -0400 Use real tick and pool math commit 7d53e5c7e979be19fc5c63eb52307f302328c4eb Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:42:05 2021 -0400 naming updates commit 9022650d391682f97e71d336021c2db2e5ea5455 Author: ianlapham <ianlapham@gmail.com> Date: Sun Mar 28 22:36:08 2021 -0400 WIP start usePool and useDerivedMint hooks * remove 1337 references * clean up multicall * clean up redirects/router * cleanup * improve useAllV3Ticks * fix multicall * typo * Fix code style issues with ESLint * preserve sticky * reset to non fixed scroll * fix inputs at 1 * update tests * fix routes * sticky sidebar Co-authored-by: Noah Zinsmeister <noahwz@gmail.com> Co-authored-by: Lint Action <lint-action@samuelmeuli.com> Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2021-04-14 17:12:35 +03:00
<Route
exact
strict
path="/increase/:currencyIdA?/:currencyIdB?/:feeAmount?/:tokenId?"
component={AddLiquidity}
/>
<Route exact strict path="/remove/v2/:currencyIdA/:currencyIdB" component={RemoveLiquidity} />
<Route exact strict path="/remove/:tokenId" component={RemoveLiquidityV3} />
<Route exact strict path="/migrate/v2" component={MigrateV2} />
<Route exact strict path="/migrate/v2/:address" component={MigrateV2Pair} />
<Route exact strict path="/create-proposal" component={CreateProposal} />
<Route component={RedirectPathToSwapOnly} />
</Switch>
</Web3ReactManager>
<Marginer />
</BodyWrapper>
</AppWrapper>
</ErrorBoundary>
)
2018-10-07 00:24:17 +03:00
}