Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
0f4ca592
Unverified
Commit
0f4ca592
authored
Nov 16, 2023
by
eddie
Committed by
GitHub
Nov 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: remove /increase route (#7603)
* fix: remove /increase route * fix: rename confusing components
parent
90497dc0
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
35 deletions
+11
-35
app-sitemap.xml
public/app-sitemap.xml
+0
-6
PoolDetailsStatsButtons.test.tsx
...onents/Pools/PoolDetails/PoolDetailsStatsButtons.test.tsx
+1
-1
PoolDetailsStatsButtons.tsx
src/components/Pools/PoolDetails/PoolDetailsStatsButtons.tsx
+1
-1
useIsPoolsPage.ts
src/hooks/useIsPoolsPage.ts
+1
-2
redirects.tsx
src/pages/AddLiquidity/redirects.tsx
+1
-1
redirects.tsx
src/pages/AddLiquidityV2/redirects.tsx
+1
-1
PositionPage.tsx
src/pages/Pool/PositionPage.tsx
+1
-1
RouteDefinitions.tsx
src/pages/RouteDefinitions.tsx
+4
-11
routes.test.ts.snap
src/pages/__snapshots__/routes.test.ts.snap
+1
-11
No files found.
public/app-sitemap.xml
View file @
0f4ca592
...
@@ -72,12 +72,6 @@
...
@@ -72,12 +72,6 @@
<changefreq>
weekly
</changefreq>
<changefreq>
weekly
</changefreq>
<priority>
0.6
</priority>
<priority>
0.6
</priority>
</url>
</url>
<url>
<loc>
https://app.uniswap.org/increase
</loc>
<lastmod>
2023-10-11T19:57:27.976Z
</lastmod>
<changefreq>
weekly
</changefreq>
<priority>
0.6
</priority>
</url>
<url>
<url>
<loc>
https://app.uniswap.org/migrate/v2
</loc>
<loc>
https://app.uniswap.org/migrate/v2
</loc>
<lastmod>
2023-10-11T19:57:27.976Z
</lastmod>
<lastmod>
2023-10-11T19:57:27.976Z
</lastmod>
...
...
src/components/Pools/PoolDetails/PoolDetailsStatsButtons.test.tsx
View file @
0f4ca592
...
@@ -88,7 +88,7 @@ describe('PoolDetailsStatsButton', () => {
...
@@ -88,7 +88,7 @@ describe('PoolDetailsStatsButton', () => {
await
act
(()
=>
userEvent
.
click
(
screen
.
getByTestId
(
'
pool-details-add-liquidity-button
'
)))
await
act
(()
=>
userEvent
.
click
(
screen
.
getByTestId
(
'
pool-details-add-liquidity-button
'
)))
expect
(
global
.
window
.
location
.
href
).
toContain
(
expect
(
global
.
window
.
location
.
href
).
toContain
(
'
/
increase
/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/500
'
'
/
add
/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/500
'
)
)
})
})
})
})
src/components/Pools/PoolDetails/PoolDetailsStatsButtons.tsx
View file @
0f4ca592
...
@@ -68,7 +68,7 @@ export function PoolDetailsStatsButtons({ chainId, token0, token1, feeTier, load
...
@@ -68,7 +68,7 @@ export function PoolDetailsStatsButtons({ chainId, token0, token1, feeTier, load
navigate
(
navigate
(
toSwap
toSwap
?
`/swap?inputCurrency=
${
currencyId
(
currency0
)}
&outputCurrency=
${
currencyId
(
currency1
)}
`
?
`/swap?inputCurrency=
${
currencyId
(
currency0
)}
&outputCurrency=
${
currencyId
(
currency1
)}
`
:
`/
increase
/
${
currencyId
(
currency0
)}
/
${
currencyId
(
currency1
)}
/
${
feeTier
}${
tokenId
?
`/
${
tokenId
}
`
:
''
}
`
:
`/
add
/
${
currencyId
(
currency0
)}
/
${
currencyId
(
currency1
)}
/
${
feeTier
}${
tokenId
?
`/
${
tokenId
}
`
:
''
}
`
)
)
}
}
}
}
...
...
src/hooks/useIsPoolsPage.ts
View file @
0f4ca592
...
@@ -6,7 +6,6 @@ export function useIsPoolsPage() {
...
@@ -6,7 +6,6 @@ export function useIsPoolsPage() {
pathname
.
startsWith
(
'
/pools
'
)
||
pathname
.
startsWith
(
'
/pools
'
)
||
pathname
.
startsWith
(
'
/pool
'
)
||
pathname
.
startsWith
(
'
/pool
'
)
||
pathname
.
startsWith
(
'
/add
'
)
||
pathname
.
startsWith
(
'
/add
'
)
||
pathname
.
startsWith
(
'
/remove
'
)
||
pathname
.
startsWith
(
'
/remove
'
)
pathname
.
startsWith
(
'
/increase
'
)
)
)
}
}
src/pages/AddLiquidity/redirects.tsx
View file @
0f4ca592
...
@@ -4,7 +4,7 @@ import { Navigate, useParams } from 'react-router-dom'
...
@@ -4,7 +4,7 @@ import { Navigate, useParams } from 'react-router-dom'
import
{
WRAPPED_NATIVE_CURRENCY
}
from
'
../../constants/tokens
'
import
{
WRAPPED_NATIVE_CURRENCY
}
from
'
../../constants/tokens
'
import
AddLiquidity
from
'
./index
'
import
AddLiquidity
from
'
./index
'
export
default
function
RedirectDuplicateTokenId
s
()
{
export
default
function
AddLiquidityWithTokenRedirect
s
()
{
const
{
currencyIdA
,
currencyIdB
}
=
useParams
<
{
currencyIdA
:
string
;
currencyIdB
:
string
;
feeAmount
?:
string
}
>
()
const
{
currencyIdA
,
currencyIdB
}
=
useParams
<
{
currencyIdA
:
string
;
currencyIdB
:
string
;
feeAmount
?:
string
}
>
()
const
{
chainId
}
=
useWeb3React
()
const
{
chainId
}
=
useWeb3React
()
...
...
src/pages/AddLiquidityV2/redirects.tsx
View file @
0f4ca592
...
@@ -2,7 +2,7 @@ import { Navigate, useParams } from 'react-router-dom'
...
@@ -2,7 +2,7 @@ import { Navigate, useParams } from 'react-router-dom'
import
AddLiquidityV2
from
'
./index
'
import
AddLiquidityV2
from
'
./index
'
export
default
function
RedirectDuplicateTokenIdsV2
()
{
export
default
function
AddLiquidityV2WithTokenRedirects
()
{
const
{
currencyIdA
,
currencyIdB
}
=
useParams
<
{
currencyIdA
:
string
;
currencyIdB
:
string
}
>
()
const
{
currencyIdA
,
currencyIdB
}
=
useParams
<
{
currencyIdA
:
string
;
currencyIdB
:
string
}
>
()
if
(
currencyIdA
&&
currencyIdB
&&
currencyIdA
.
toLowerCase
()
===
currencyIdB
.
toLowerCase
())
{
if
(
currencyIdA
&&
currencyIdB
&&
currencyIdA
.
toLowerCase
()
===
currencyIdB
.
toLowerCase
())
{
...
...
src/pages/Pool/PositionPage.tsx
View file @
0f4ca592
...
@@ -706,7 +706,7 @@ function PositionPageContent() {
...
@@ -706,7 +706,7 @@ function PositionPageContent() {
{
currency0
&&
currency1
&&
feeAmount
&&
tokenId
?
(
{
currency0
&&
currency1
&&
feeAmount
&&
tokenId
?
(
<
ButtonGray
<
ButtonGray
as=
{
Link
}
as=
{
Link
}
to=
{
`/
increase
/${currencyId(currency0)}/${currencyId(currency1)}/${feeAmount}/${tokenId}`
}
to=
{
`/
add
/${currencyId(currency0)}/${currencyId(currency1)}/${feeAmount}/${tokenId}`
}
padding=
"6px 8px"
padding=
"6px 8px"
width=
"fit-content"
width=
"fit-content"
$borderRadius=
"12px"
$borderRadius=
"12px"
...
...
src/pages/RouteDefinitions.tsx
View file @
0f4ca592
...
@@ -15,10 +15,9 @@ const NftExplore = lazy(() => import('nft/pages/explore'))
...
@@ -15,10 +15,9 @@ const NftExplore = lazy(() => import('nft/pages/explore'))
const
Collection
=
lazy
(()
=>
import
(
'
nft/pages/collection
'
))
const
Collection
=
lazy
(()
=>
import
(
'
nft/pages/collection
'
))
const
Profile
=
lazy
(()
=>
import
(
'
nft/pages/profile
'
))
const
Profile
=
lazy
(()
=>
import
(
'
nft/pages/profile
'
))
const
Asset
=
lazy
(()
=>
import
(
'
nft/pages/asset/Asset
'
))
const
Asset
=
lazy
(()
=>
import
(
'
nft/pages/asset/Asset
'
))
const
AddLiquidity
=
lazy
(()
=>
import
(
'
pages/AddLiquidity
'
))
const
Explore
=
lazy
(()
=>
import
(
'
pages/Explore
'
))
const
Explore
=
lazy
(()
=>
import
(
'
pages/Explore
'
))
const
RedirectDuplicateTokenId
s
=
lazy
(()
=>
import
(
'
pages/AddLiquidity/redirects
'
))
const
AddLiquidityWithTokenRedirect
s
=
lazy
(()
=>
import
(
'
pages/AddLiquidity/redirects
'
))
const
RedirectDuplicateTokenIdsV2
=
lazy
(()
=>
import
(
'
pages/AddLiquidityV2/redirects
'
))
const
AddLiquidityV2WithTokenRedirects
=
lazy
(()
=>
import
(
'
pages/AddLiquidityV2/redirects
'
))
const
RedirectExplore
=
lazy
(()
=>
import
(
'
pages/Explore/redirects
'
))
const
RedirectExplore
=
lazy
(()
=>
import
(
'
pages/Explore/redirects
'
))
const
MigrateV2
=
lazy
(()
=>
import
(
'
pages/MigrateV2
'
))
const
MigrateV2
=
lazy
(()
=>
import
(
'
pages/MigrateV2
'
))
const
MigrateV2Pair
=
lazy
(()
=>
import
(
'
pages/MigrateV2/MigrateV2Pair
'
))
const
MigrateV2Pair
=
lazy
(()
=>
import
(
'
pages/MigrateV2/MigrateV2Pair
'
))
...
@@ -174,23 +173,17 @@ export const routes: RouteDefinition[] = [
...
@@ -174,23 +173,17 @@ export const routes: RouteDefinition[] = [
createRouteDefinition
({
createRouteDefinition
({
path
:
'
/add/v2
'
,
path
:
'
/add/v2
'
,
nestedPaths
:
[
'
:currencyIdA
'
,
'
:currencyIdA/:currencyIdB
'
],
nestedPaths
:
[
'
:currencyIdA
'
,
'
:currencyIdA/:currencyIdB
'
],
getElement
:
()
=>
<
RedirectDuplicateTokenIdsV2
/>,
getElement
:
()
=>
<
AddLiquidityV2WithTokenRedirects
/>,
}),
}),
createRouteDefinition
({
createRouteDefinition
({
path
:
'
/add
'
,
path
:
'
/add
'
,
nestedPaths
:
[
'
:currencyIdA
'
,
'
:currencyIdA/:currencyIdB
'
,
'
:currencyIdA/:currencyIdB/:feeAmount
'
],
getElement
:
()
=>
<
RedirectDuplicateTokenIds
/>,
}),
createRouteDefinition
({
path
:
'
/increase
'
,
nestedPaths
:
[
nestedPaths
:
[
'
:currencyIdA
'
,
'
:currencyIdA
'
,
'
:currencyIdA/:currencyIdB
'
,
'
:currencyIdA/:currencyIdB
'
,
'
:currencyIdA/:currencyIdB/:feeAmount
'
,
'
:currencyIdA/:currencyIdB/:feeAmount
'
,
'
:currencyIdA/:currencyIdB/:feeAmount/:tokenId
'
,
'
:currencyIdA/:currencyIdB/:feeAmount/:tokenId
'
,
],
],
getElement
:
()
=>
<
AddLiquidity
/>,
getElement
:
()
=>
<
AddLiquidity
WithTokenRedirects
/>,
}),
}),
createRouteDefinition
({
path
:
'
/remove/v2/:currencyIdA/:currencyIdB
'
,
getElement
:
()
=>
<
RemoveLiquidity
/>
}),
createRouteDefinition
({
path
:
'
/remove/v2/:currencyIdA/:currencyIdB
'
,
getElement
:
()
=>
<
RemoveLiquidity
/>
}),
createRouteDefinition
({
path
:
'
/remove/:tokenId
'
,
getElement
:
()
=>
<
RemoveLiquidityV3
/>
}),
createRouteDefinition
({
path
:
'
/remove/:tokenId
'
,
getElement
:
()
=>
<
RemoveLiquidityV3
/>
}),
...
...
src/pages/__snapshots__/routes.test.ts.snap
View file @
0f4ca592
...
@@ -136,16 +136,6 @@ Array [
...
@@ -136,16 +136,6 @@ Array [
],
],
"path": "/add/v2",
"path": "/add/v2",
},
},
Object {
"enabled": [Function],
"getElement": [Function],
"nestedPaths": Array [
":currencyIdA",
":currencyIdA/:currencyIdB",
":currencyIdA/:currencyIdB/:feeAmount",
],
"path": "/add",
},
Object {
Object {
"enabled": [Function],
"enabled": [Function],
"getElement": [Function],
"getElement": [Function],
...
@@ -155,7 +145,7 @@ Array [
...
@@ -155,7 +145,7 @@ Array [
":currencyIdA/:currencyIdB/:feeAmount",
":currencyIdA/:currencyIdB/:feeAmount",
":currencyIdA/:currencyIdB/:feeAmount/:tokenId",
":currencyIdA/:currencyIdB/:feeAmount/:tokenId",
],
],
"path": "/
increase
",
"path": "/
add
",
},
},
Object {
Object {
"enabled": [Function],
"enabled": [Function],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment