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
bbf36d12
Commit
bbf36d12
authored
Mar 22, 2024
by
Uniswap Labs Service Account
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci(release): publish latest release
parent
f9f5c087
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
12 additions
and
46 deletions
+12
-46
RELEASE
RELEASE
+7
-8
VERSION
VERSION
+1
-1
fees.test.ts
apps/web/cypress/e2e/swap/fees.test.ts
+2
-5
FeatureFlagModal.tsx
.../web/src/components/FeatureFlagModal/FeatureFlagModal.tsx
+1
-7
SwapDetails.test.tsx
apps/web/src/components/swap/SwapDetails.test.tsx
+0
-2
SwapDetailsDropdown.test.tsx
apps/web/src/components/swap/SwapDetailsDropdown.test.tsx
+0
-2
SwapLineItem.test.tsx
apps/web/src/components/swap/SwapLineItem.test.tsx
+0
-2
SwapLineItem.tsx
apps/web/src/components/swap/SwapLineItem.tsx
+0
-3
useFees.ts
apps/web/src/featureFlags/flags/useFees.ts
+0
-9
index.tsx
apps/web/src/featureFlags/index.tsx
+0
-1
useRoutingAPIArguments.ts
apps/web/src/lib/hooks/routing/useRoutingAPIArguments.ts
+1
-3
useRoutingAPITrade.test.ts
apps/web/src/state/routing/useRoutingAPITrade.test.ts
+0
-3
No files found.
RELEASE
View file @
bbf36d12
IPFS hash of the deployment:
IPFS hash of the deployment:
- CIDv0: `Qm
TNTfBMNoxKUXR71oFMrGiUQsDm3JtpkyVaxjCnRQuUbu
`
- CIDv0: `Qm
XzhJmLYm2o4XE8etZaPyjF8oeenpqB31D5WrfVc4Amcy
`
- CIDv1: `bafybei
ckyem7qf4vd2ujvpahu2jeb2snj5sccgfnafuejd4ejpjuzrm7aq
`
- CIDv1: `bafybei
eppayk37xqd2if3vmfoqy2t2ey4am4juzy4pgq4eudjyhmnswczy
`
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
...
@@ -10,16 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
...
@@ -10,16 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
Your Uniswap settings are never remembered across different URLs.
Your Uniswap settings are never remembered across different URLs.
IPFS gateways:
IPFS gateways:
- https://bafybei
ckyem7qf4vd2ujvpahu2jeb2snj5sccgfnafuejd4ejpjuzrm7aq
.ipfs.dweb.link/
- https://bafybei
eppayk37xqd2if3vmfoqy2t2ey4am4juzy4pgq4eudjyhmnswczy
.ipfs.dweb.link/
- https://bafybei
ckyem7qf4vd2ujvpahu2jeb2snj5sccgfnafuejd4ejpjuzrm7aq
.ipfs.cf-ipfs.com/
- https://bafybei
eppayk37xqd2if3vmfoqy2t2ey4am4juzy4pgq4eudjyhmnswczy
.ipfs.cf-ipfs.com/
- [ipfs://Qm
TNTfBMNoxKUXR71oFMrGiUQsDm3JtpkyVaxjCnRQuUbu/](ipfs://QmTNTfBMNoxKUXR71oFMrGiUQsDm3JtpkyVaxjCnRQuUbu
/)
- [ipfs://Qm
XzhJmLYm2o4XE8etZaPyjF8oeenpqB31D5WrfVc4Amcy/](ipfs://QmXzhJmLYm2o4XE8etZaPyjF8oeenpqB31D5WrfVc4Amcy
/)
### 5.19.
1 (2024-03-20
)
### 5.19.
2 (2024-03-22
)
### Bug Fixes
### Bug Fixes
* **web:** dont crash PDP when one of the v2/v3 queries fails 10937ea
* **web:** clean feesEnabled feature flag from codebase (#6967) (#7054) f6d99da
* **web:** dont crash PDP when one of the v2/v3 queries fails (#7011) ff38514
VERSION
View file @
bbf36d12
web/5.19.1
web/5.19.2
\ No newline at end of file
\ No newline at end of file
apps/web/cypress/e2e/swap/fees.test.ts
View file @
bbf36d12
import
{
CurrencyAmount
}
from
'
@uniswap/sdk-core
'
import
{
CurrencyAmount
}
from
'
@uniswap/sdk-core
'
import
{
FeatureFlag
}
from
'
featureFlags
'
import
{
USDC_MAINNET
}
from
'
../../../src/constants/tokens
'
import
{
USDC_MAINNET
}
from
'
../../../src/constants/tokens
'
import
{
getBalance
,
getTestSelector
}
from
'
../../utils
'
import
{
getBalance
,
getTestSelector
}
from
'
../../utils
'
...
@@ -7,7 +6,7 @@ import { getBalance, getTestSelector } from '../../utils'
...
@@ -7,7 +6,7 @@ import { getBalance, getTestSelector } from '../../utils'
describe
(
'
Swap with fees
'
,
()
=>
{
describe
(
'
Swap with fees
'
,
()
=>
{
describe
(
'
Classic swaps
'
,
()
=>
{
describe
(
'
Classic swaps
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
cy
.
visit
(
'
/swap
'
,
{
featureFlags
:
[{
name
:
FeatureFlag
.
feesEnabled
,
value
:
true
}]
}
)
cy
.
visit
(
'
/swap
'
)
// Store trade quote into alias
// Store trade quote into alias
cy
.
intercept
({
url
:
'
https://interface.gateway.uniswap.org/v2/quote
'
},
(
req
)
=>
{
cy
.
intercept
({
url
:
'
https://interface.gateway.uniswap.org/v2/quote
'
},
(
req
)
=>
{
...
@@ -119,9 +118,7 @@ describe('Swap with fees', () => {
...
@@ -119,9 +118,7 @@ describe('Swap with fees', () => {
describe
(
'
UniswapX swaps
'
,
()
=>
{
describe
(
'
UniswapX swaps
'
,
()
=>
{
it
(
'
displays UniswapX fee in UI
'
,
()
=>
{
it
(
'
displays UniswapX fee in UI
'
,
()
=>
{
cy
.
visit
(
'
/swap
'
,
{
cy
.
visit
(
'
/swap
'
)
featureFlags
:
[{
name
:
FeatureFlag
.
feesEnabled
,
value
:
true
}],
})
// Intercept the trade quote
// Intercept the trade quote
cy
.
intercept
({
url
:
'
https://interface.gateway.uniswap.org/v2/quote
'
},
(
req
)
=>
{
cy
.
intercept
({
url
:
'
https://interface.gateway.uniswap.org/v2/quote
'
},
(
req
)
=>
{
...
...
apps/web/src/components/FeatureFlagModal/FeatureFlagModal.tsx
View file @
bbf36d12
...
@@ -23,7 +23,6 @@ import { useSendEnabledFlag } from 'featureFlags/flags/send'
...
@@ -23,7 +23,6 @@ import { useSendEnabledFlag } from 'featureFlags/flags/send'
import
{
TraceJsonRpcVariant
,
useTraceJsonRpcFlag
}
from
'
featureFlags/flags/traceJsonRpc
'
import
{
TraceJsonRpcVariant
,
useTraceJsonRpcFlag
}
from
'
featureFlags/flags/traceJsonRpc
'
import
{
useUniconV2Flag
}
from
'
featureFlags/flags/uniconV2
'
import
{
useUniconV2Flag
}
from
'
featureFlags/flags/uniconV2
'
import
{
useUniswapXSyntheticQuoteFlag
}
from
'
featureFlags/flags/uniswapXUseSyntheticQuote
'
import
{
useUniswapXSyntheticQuoteFlag
}
from
'
featureFlags/flags/uniswapXUseSyntheticQuote
'
import
{
useFeesEnabledFlag
}
from
'
featureFlags/flags/useFees
'
import
{
useV2EverywhereFlag
}
from
'
featureFlags/flags/v2Everywhere
'
import
{
useV2EverywhereFlag
}
from
'
featureFlags/flags/v2Everywhere
'
import
{
useUpdateAtom
}
from
'
jotai/utils
'
import
{
useUpdateAtom
}
from
'
jotai/utils
'
import
{
Children
,
PropsWithChildren
,
ReactElement
,
ReactNode
,
useCallback
,
useState
}
from
'
react
'
import
{
Children
,
PropsWithChildren
,
ReactElement
,
ReactNode
,
useCallback
,
useState
}
from
'
react
'
...
@@ -299,12 +298,7 @@ export default function FeatureFlagModal() {
...
@@ -299,12 +298,7 @@ export default function FeatureFlagModal() {
featureFlag=
{
FeatureFlag
.
eip6963Enabled
}
featureFlag=
{
FeatureFlag
.
eip6963Enabled
}
label=
"Enable EIP-6963: Multi Injected Provider Discovery"
label=
"Enable EIP-6963: Multi Injected Provider Discovery"
/>
/>
<
FeatureFlagOption
variant=
{
BaseVariant
}
value=
{
useFeesEnabledFlag
()
}
featureFlag=
{
FeatureFlag
.
feesEnabled
}
label=
"Enable Swap Fees"
/>
<
FeatureFlagOption
<
FeatureFlagOption
variant=
{
BaseVariant
}
variant=
{
BaseVariant
}
value=
{
useLimitsEnabledFlag
()
}
value=
{
useLimitsEnabledFlag
()
}
...
...
apps/web/src/components/swap/SwapDetails.test.tsx
View file @
bbf36d12
...
@@ -8,8 +8,6 @@ import { render, screen, within } from 'test-utils/render'
...
@@ -8,8 +8,6 @@ import { render, screen, within } from 'test-utils/render'
import
{
SwapDetails
}
from
'
./SwapDetails
'
import
{
SwapDetails
}
from
'
./SwapDetails
'
jest
.
mock
(
'
../../featureFlags/flags/useFees
'
,
()
=>
({
useFeesEnabled
:
()
=>
true
}))
describe
(
'
SwapDetails.tsx
'
,
()
=>
{
describe
(
'
SwapDetails.tsx
'
,
()
=>
{
it
(
'
matches base snapshot, test trade exact input
'
,
()
=>
{
it
(
'
matches base snapshot, test trade exact input
'
,
()
=>
{
const
{
asFragment
}
=
render
(
const
{
asFragment
}
=
render
(
...
...
apps/web/src/components/swap/SwapDetailsDropdown.test.tsx
View file @
bbf36d12
...
@@ -11,8 +11,6 @@ import { act, render, screen } from 'test-utils/render'
...
@@ -11,8 +11,6 @@ import { act, render, screen } from 'test-utils/render'
import
SwapDetailsDropdown
from
'
./SwapDetailsDropdown
'
import
SwapDetailsDropdown
from
'
./SwapDetailsDropdown
'
jest
.
mock
(
'
../../featureFlags/flags/useFees
'
,
()
=>
({
useFeesEnabled
:
()
=>
true
}))
describe
(
'
SwapDetailsDropdown.tsx
'
,
()
=>
{
describe
(
'
SwapDetailsDropdown.tsx
'
,
()
=>
{
it
(
'
renders a trade
'
,
()
=>
{
it
(
'
renders a trade
'
,
()
=>
{
const
{
asFragment
}
=
render
(
const
{
asFragment
}
=
render
(
...
...
apps/web/src/components/swap/SwapLineItem.test.tsx
View file @
bbf36d12
...
@@ -12,8 +12,6 @@ import {
...
@@ -12,8 +12,6 @@ import {
}
from
'
test-utils/constants
'
}
from
'
test-utils/constants
'
import
{
render
,
screen
}
from
'
test-utils/render
'
import
{
render
,
screen
}
from
'
test-utils/render
'
jest
.
mock
(
'
../../featureFlags/flags/useFees
'
,
()
=>
({
useFeesEnabled
:
()
=>
true
}))
// Forces tooltips to render in snapshots
// Forces tooltips to render in snapshots
jest
.
mock
(
'
react-dom
'
,
()
=>
{
jest
.
mock
(
'
react-dom
'
,
()
=>
{
const
original
=
jest
.
requireActual
(
'
react-dom
'
)
const
original
=
jest
.
requireActual
(
'
react-dom
'
)
...
...
apps/web/src/components/swap/SwapLineItem.tsx
View file @
bbf36d12
...
@@ -6,7 +6,6 @@ import RouterLabel from 'components/RouterLabel'
...
@@ -6,7 +6,6 @@ import RouterLabel from 'components/RouterLabel'
import
Row
from
'
components/Row
'
import
Row
from
'
components/Row
'
import
{
TooltipSize
}
from
'
components/Tooltip
'
import
{
TooltipSize
}
from
'
components/Tooltip
'
import
{
SUPPORTED_GAS_ESTIMATE_CHAIN_IDS
}
from
'
constants/chains
'
import
{
SUPPORTED_GAS_ESTIMATE_CHAIN_IDS
}
from
'
constants/chains
'
import
{
useFeesEnabled
}
from
'
featureFlags/flags/useFees
'
import
{
useUSDPrice
}
from
'
hooks/useUSDPrice
'
import
{
useUSDPrice
}
from
'
hooks/useUSDPrice
'
import
React
,
{
useEffect
,
useState
}
from
'
react
'
import
React
,
{
useEffect
,
useState
}
from
'
react
'
import
{
animated
,
SpringValue
}
from
'
react-spring
'
import
{
animated
,
SpringValue
}
from
'
react-spring
'
...
@@ -124,7 +123,6 @@ function useLineItem(props: SwapLineItemProps): LineItemData | undefined {
...
@@ -124,7 +123,6 @@ function useLineItem(props: SwapLineItemProps): LineItemData | undefined {
const
{
trade
,
syncing
,
allowedSlippage
,
type
}
=
props
const
{
trade
,
syncing
,
allowedSlippage
,
type
}
=
props
const
{
formatPercent
}
=
useFormatter
()
const
{
formatPercent
}
=
useFormatter
()
const
isAutoSlippage
=
useUserSlippageTolerance
()[
0
]
===
SlippageTolerance
.
Auto
const
isAutoSlippage
=
useUserSlippageTolerance
()[
0
]
===
SlippageTolerance
.
Auto
const
feesEnabled
=
useFeesEnabled
()
const
isUniswapX
=
isUniswapXTrade
(
trade
)
const
isUniswapX
=
isUniswapXTrade
(
trade
)
const
isPreview
=
isPreviewTrade
(
trade
)
const
isPreview
=
isPreviewTrade
(
trade
)
...
@@ -173,7 +171,6 @@ function useLineItem(props: SwapLineItemProps): LineItemData | undefined {
...
@@ -173,7 +171,6 @@ function useLineItem(props: SwapLineItemProps): LineItemData | undefined {
),
),
}
}
case
SwapLineItemType
.
SWAP_FEE
:
{
case
SwapLineItemType
.
SWAP_FEE
:
{
if
(
!
feesEnabled
)
return
if
(
isPreview
)
return
{
Label
:
()
=>
<
Trans
>
Fee
</
Trans
>,
Value
:
()
=>
<
Loading
/>
}
if
(
isPreview
)
return
{
Label
:
()
=>
<
Trans
>
Fee
</
Trans
>,
Value
:
()
=>
<
Loading
/>
}
return
{
return
{
Label
:
()
=>
(
Label
:
()
=>
(
...
...
apps/web/src/featureFlags/flags/useFees.ts
deleted
100644 → 0
View file @
f9f5c087
import
{
BaseVariant
,
FeatureFlag
,
useBaseFlag
}
from
'
../index
'
export
function
useFeesEnabledFlag
():
BaseVariant
{
return
useBaseFlag
(
FeatureFlag
.
feesEnabled
)
}
export
function
useFeesEnabled
():
boolean
{
return
useFeesEnabledFlag
()
===
BaseVariant
.
Enabled
}
apps/web/src/featureFlags/index.tsx
View file @
bbf36d12
...
@@ -15,7 +15,6 @@ export enum FeatureFlag {
...
@@ -15,7 +15,6 @@ export enum FeatureFlag {
multichainUX
=
'
multichain_ux
'
,
multichainUX
=
'
multichain_ux
'
,
currencyConversion
=
'
currency_conversion
'
,
currencyConversion
=
'
currency_conversion
'
,
quickRouteMainnet
=
'
enable_quick_route_mainnet
'
,
quickRouteMainnet
=
'
enable_quick_route_mainnet
'
,
feesEnabled
=
'
fees_enabled
'
,
limitsEnabled
=
'
limits_enabled
'
,
limitsEnabled
=
'
limits_enabled
'
,
eip6963Enabled
=
'
eip6963_enabled
'
,
eip6963Enabled
=
'
eip6963_enabled
'
,
gatewayDNSUpdate
=
'
gateway_dns_update
'
,
gatewayDNSUpdate
=
'
gateway_dns_update
'
,
...
...
apps/web/src/lib/hooks/routing/useRoutingAPIArguments.ts
View file @
bbf36d12
...
@@ -2,7 +2,6 @@ import { SkipToken, skipToken } from '@reduxjs/toolkit/query/react'
...
@@ -2,7 +2,6 @@ import { SkipToken, skipToken } from '@reduxjs/toolkit/query/react'
import
{
Currency
,
CurrencyAmount
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
useGatewayDNSUpdateEnabled
}
from
'
featureFlags/flags/gatewayDNSUpdate
'
import
{
useGatewayDNSUpdateEnabled
}
from
'
featureFlags/flags/gatewayDNSUpdate
'
import
{
useUniswapXSyntheticQuoteEnabled
}
from
'
featureFlags/flags/uniswapXUseSyntheticQuote
'
import
{
useUniswapXSyntheticQuoteEnabled
}
from
'
featureFlags/flags/uniswapXUseSyntheticQuote
'
import
{
useFeesEnabled
}
from
'
featureFlags/flags/useFees
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
GetQuoteArgs
,
INTERNAL_ROUTER_PREFERENCE_PRICE
,
RouterPreference
}
from
'
state/routing/types
'
import
{
GetQuoteArgs
,
INTERNAL_ROUTER_PREFERENCE_PRICE
,
RouterPreference
}
from
'
state/routing/types
'
import
{
currencyAddressForSwapQuote
}
from
'
state/routing/utils
'
import
{
currencyAddressForSwapQuote
}
from
'
state/routing/utils
'
...
@@ -29,9 +28,8 @@ export function useRoutingAPIArguments({
...
@@ -29,9 +28,8 @@ export function useRoutingAPIArguments({
}):
GetQuoteArgs
|
SkipToken
{
}):
GetQuoteArgs
|
SkipToken
{
const
uniswapXForceSyntheticQuotes
=
useUniswapXSyntheticQuoteEnabled
()
const
uniswapXForceSyntheticQuotes
=
useUniswapXSyntheticQuoteEnabled
()
const
gatewayDNSUpdateEnabled
=
useGatewayDNSUpdateEnabled
()
const
gatewayDNSUpdateEnabled
=
useGatewayDNSUpdateEnabled
()
const
feesEnabled
=
useFeesEnabled
()
// Don't enable fee logic if this is a quote for pricing
// Don't enable fee logic if this is a quote for pricing
const
sendPortionEnabled
=
routerPreference
===
INTERNAL_ROUTER_PREFERENCE_PRICE
?
false
:
feesEnabled
const
sendPortionEnabled
=
routerPreference
!==
INTERNAL_ROUTER_PREFERENCE_PRICE
return
useMemo
(
return
useMemo
(
()
=>
()
=>
...
...
apps/web/src/state/routing/useRoutingAPITrade.test.ts
View file @
bbf36d12
...
@@ -4,7 +4,6 @@ import { CurrencyAmount, TradeType } from '@uniswap/sdk-core'
...
@@ -4,7 +4,6 @@ import { CurrencyAmount, TradeType } from '@uniswap/sdk-core'
import
{
AVERAGE_L1_BLOCK_TIME
}
from
'
constants/chainInfo
'
import
{
AVERAGE_L1_BLOCK_TIME
}
from
'
constants/chainInfo
'
import
{
USDC_MAINNET
}
from
'
constants/tokens
'
import
{
USDC_MAINNET
}
from
'
constants/tokens
'
import
{
useUniswapXSyntheticQuoteEnabled
}
from
'
featureFlags/flags/uniswapXUseSyntheticQuote
'
import
{
useUniswapXSyntheticQuoteEnabled
}
from
'
featureFlags/flags/uniswapXUseSyntheticQuote
'
import
{
useFeesEnabled
}
from
'
featureFlags/flags/useFees
'
import
useIsWindowVisible
from
'
hooks/useIsWindowVisible
'
import
useIsWindowVisible
from
'
hooks/useIsWindowVisible
'
import
ms
from
'
ms
'
import
ms
from
'
ms
'
import
{
GetQuoteArgs
,
INTERNAL_ROUTER_PREFERENCE_PRICE
,
RouterPreference
}
from
'
state/routing/types
'
import
{
GetQuoteArgs
,
INTERNAL_ROUTER_PREFERENCE_PRICE
,
RouterPreference
}
from
'
state/routing/types
'
...
@@ -28,13 +27,11 @@ jest.mock('./slice', () => {
...
@@ -28,13 +27,11 @@ jest.mock('./slice', () => {
})
})
jest
.
mock
(
'
state/user/hooks
'
)
jest
.
mock
(
'
state/user/hooks
'
)
jest
.
mock
(
'
featureFlags/flags/uniswapXUseSyntheticQuote
'
)
jest
.
mock
(
'
featureFlags/flags/uniswapXUseSyntheticQuote
'
)
jest
.
mock
(
'
featureFlags/flags/useFees
'
)
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mocked
(
useIsWindowVisible
).
mockReturnValue
(
true
)
mocked
(
useIsWindowVisible
).
mockReturnValue
(
true
)
mocked
(
useRouterPreference
).
mockReturnValue
([
RouterPreference
.
API
,
()
=>
undefined
])
mocked
(
useRouterPreference
).
mockReturnValue
([
RouterPreference
.
API
,
()
=>
undefined
])
mocked
(
useUniswapXSyntheticQuoteEnabled
).
mockReturnValue
(
false
)
mocked
(
useUniswapXSyntheticQuoteEnabled
).
mockReturnValue
(
false
)
mocked
(
useFeesEnabled
).
mockReturnValue
(
true
)
// @ts-ignore we dont use the response from this hook in useRoutingAPITrade so fine to mock as undefined
// @ts-ignore we dont use the response from this hook in useRoutingAPITrade so fine to mock as undefined
mocked
(
useGetQuoteQuery
).
mockReturnValue
(
undefined
)
mocked
(
useGetQuoteQuery
).
mockReturnValue
(
undefined
)
mocked
(
useGetQuoteQueryState
).
mockReturnValue
({
mocked
(
useGetQuoteQueryState
).
mockReturnValue
({
...
...
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