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
5064ba2f
Commit
5064ba2f
authored
Apr 25, 2025
by
Uniswap Labs Service Account
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci(release): publish latest release
parent
65288f49
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
34 deletions
+59
-34
RELEASE
RELEASE
+6
-6
VERSION
VERSION
+1
-1
index.tsx
apps/web/src/components/Charts/LiquidityChart/index.tsx
+41
-17
index.tsx
...b/src/components/Pools/PoolDetails/ChartSection/index.tsx
+11
-10
No files found.
RELEASE
View file @
5064ba2f
IPFS hash of the deployment:
- CIDv0: `Qm
cDLYNCmBY8GZivEGAw4fwyeT24YpT1FqttKTkcRFfivc
`
- CIDv1: `bafybei
goeqbd3sgqs3ry32353einpmrcuy5p45hutcmjp4qummebbwhw7e
`
- CIDv0: `Qm
SR5NDYo4zoKKUQJ6fbr7QBw8VzMSYTPLCKWFrnEy3siH
`
- CIDv1: `bafybei
b4sdzwnyzjkgip3tbxxpwp76goocrdu77z5cnshiitjqcpnv2pci
`
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
...
...
@@ -10,14 +10,14 @@ You can also access the Uniswap Interface from an IPFS gateway.
Your Uniswap settings are never remembered across different URLs.
IPFS gateways:
- https://bafybei
goeqbd3sgqs3ry32353einpmrcuy5p45hutcmjp4qummebbwhw7e
.ipfs.dweb.link/
- [ipfs://Qm
cDLYNCmBY8GZivEGAw4fwyeT24YpT1FqttKTkcRFfivc/](ipfs://QmcDLYNCmBY8GZivEGAw4fwyeT24YpT1FqttKTkcRFfivc
/)
- https://bafybei
b4sdzwnyzjkgip3tbxxpwp76goocrdu77z5cnshiitjqcpnv2pci
.ipfs.dweb.link/
- [ipfs://Qm
SR5NDYo4zoKKUQJ6fbr7QBw8VzMSYTPLCKWFrnEy3siH/](ipfs://QmSR5NDYo4zoKKUQJ6fbr7QBw8VzMSYTPLCKWFrnEy3siH
/)
### 5.80.
2
(2025-04-25)
### 5.80.
3
(2025-04-25)
### Bug Fixes
* **web:**
reenable logging in statsig config (#18894) ae7ebce
* **web:**
prod hotfix v4 eth pair liq chart fix (#18899) bab7ea8
VERSION
View file @
5064ba2f
web/5.80.2
\ No newline at end of file
web/5.80.3
\ No newline at end of file
apps/web/src/components/Charts/LiquidityChart/index.tsx
View file @
5064ba2f
import
{
BigNumber
}
from
'
@ethersproject/bignumber
'
import
{
ProtocolVersion
}
from
'
@uniswap/client-pools/dist/pools/v1/types_pb
'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
Currency
Amount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
FeeAmount
,
Pool
as
PoolV3
,
TICK_SPACINGS
,
TickMath
as
TickMathV3
,
tickToPrice
}
from
'
@uniswap/v3-sdk
'
import
{
Pool
as
PoolV4
}
from
'
@uniswap/v4-sdk
'
import
{
Pool
as
PoolV4
,
tickToPrice
as
tickToPriceV4
}
from
'
@uniswap/v4-sdk
'
import
{
ChartHoverData
,
ChartModel
,
ChartModelParams
}
from
'
components/Charts/ChartModel
'
import
{
LiquidityBarSeries
}
from
'
components/Charts/LiquidityChart/liquidity-bar-series
'
import
{
...
...
@@ -123,6 +123,7 @@ function maxAmount(token: Token) {
}
/** Calculates tokens locked in the active tick range based on the current tick */
// TODO(WEB-7564): determine how to support v4
async
function
calculateActiveRangeTokensLocked
(
token0
:
Token
,
token1
:
Token
,
...
...
@@ -224,9 +225,10 @@ export async function calculateTokensLockedV3(
}
}
// TODO(WEB-7564): determine if tick math needs to be converted to support v4
export
async
function
calculateTokensLockedV4
(
token0
:
Token
,
token1
:
Token
,
token0
:
Currency
,
token1
:
Currency
,
feeTier
:
FeeAmount
,
tickSpacing
:
number
,
hooks
:
string
,
...
...
@@ -278,8 +280,8 @@ export async function calculateTokensLockedV4(
}
export
function
useLiquidityBarData
({
token
A
,
token
B
,
currency
A
,
currency
B
,
feeTier
,
isReversed
,
chainId
,
...
...
@@ -288,8 +290,8 @@ export function useLiquidityBarData({
hooks
,
poolId
,
}:
{
tokenA
:
Token
tokenB
:
Token
currencyA
:
Currency
currencyB
:
Currency
feeTier
:
FeeAmount
isReversed
:
boolean
chainId
:
UniverseChainId
...
...
@@ -299,9 +301,15 @@ export function useLiquidityBarData({
poolId
?:
string
})
{
const
{
formatNumber
,
formatPrice
}
=
useFormatter
()
// Determine the correct tokens to use based on the protocol version
// V3 requires tokens, V4 can handle native or tokens
const
tokenAWrapped
=
currencyA
.
wrapped
const
tokenBWrapped
=
currencyB
.
wrapped
const
activePoolData
=
usePoolActiveLiquidity
({
currencyA
:
tokenA
,
currencyB
:
tokenB
,
currencyA
,
currencyB
,
feeAmount
:
feeTier
,
version
,
poolId
,
...
...
@@ -341,15 +349,18 @@ export function useLiquidityBarData({
activeRangeIndex
=
index
activeRangePercentage
=
(
activePoolData
.
currentTick
-
t
.
tick
)
/
TICK_SPACINGS
[
feeTier
]
price0
=
tickToPrice
(
tokenA
,
tokenB
,
t
.
tick
)
price0
=
version
===
ProtocolVersion
.
V3
?
tickToPrice
(
tokenAWrapped
,
tokenBWrapped
,
t
.
tick
)
:
tickToPriceV4
(
currencyA
,
currencyB
,
t
.
tick
)
price1
=
price0
.
invert
()
}
const
{
amount0Locked
,
amount1Locked
}
=
await
(
version
===
ProtocolVersion
.
V3
?
calculateTokensLockedV3
(
tokenA
,
tokenB
,
feeTier
,
t
)
?
calculateTokensLockedV3
(
tokenA
Wrapped
,
tokenBWrapped
,
feeTier
,
t
)
:
calculateTokensLockedV4
(
token
A
,
token
B
,
currency
A
,
currency
B
,
feeTier
,
tickSpacing
??
TICK_SPACINGS
[
feeTier
],
hooks
??
ZERO_ADDRESS
,
...
...
@@ -379,8 +390,8 @@ export function useLiquidityBarData({
// For active range, adjust amounts locked to adjust for where current tick/price is within the range
if
(
activeRangeIndex
!==
undefined
&&
activeRangeData
)
{
const
activeTickTvl
=
await
calculateActiveRangeTokensLocked
(
tokenA
,
tokenB
,
tokenA
Wrapped
,
tokenB
Wrapped
,
feeTier
,
ticksProcessed
[
activeRangeIndex
],
activePoolData
,
...
...
@@ -398,7 +409,20 @@ export function useLiquidityBarData({
}
formatData
()
},
[
activePoolData
,
tokenA
,
tokenB
,
formatNumber
,
formatPrice
,
isReversed
,
feeTier
,
version
,
tickSpacing
,
hooks
])
},
[
activePoolData
,
currencyA
,
currencyB
,
tokenAWrapped
,
tokenBWrapped
,
formatNumber
,
formatPrice
,
isReversed
,
feeTier
,
version
,
tickSpacing
,
hooks
,
])
return
{
tickData
,
activeTick
:
activePoolData
.
activeTick
,
loading
:
activePoolData
.
isLoading
||
!
tickData
}
}
apps/web/src/components/Pools/PoolDetails/ChartSection/index.tsx
View file @
5064ba2f
import
{
ProtocolVersion
as
RestProtocolVersion
}
from
'
@uniswap/client-pools/dist/pools/v1/types_pb
'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
Currency
Amount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
FeeAmount
}
from
'
@uniswap/v3-sdk
'
import
{
ChartHeader
}
from
'
components/Charts/ChartHeader
'
import
{
Chart
,
refitChartContentAtom
}
from
'
components/Charts/ChartModel
'
...
...
@@ -188,8 +188,9 @@ export default function ChartSection(props: ChartSectionProps) {
}
// TODO(WEB-3740): Integrate BE tick query, remove special casing for liquidity chart
// Pass currencyA/B to LiquidityChart to avoid wrapping native tokens for v4 pools
if
(
activeQuery
.
chartType
===
ChartType
.
LIQUIDITY
)
{
return
<
LiquidityChart
{
...
selectedChartProps
}
/>
return
<
LiquidityChart
{
...
selectedChartProps
}
currencyA=
{
currencyA
}
currencyB=
{
currencyB
}
/>
}
if
(
activeQuery
.
dataQuality
===
DataQuality
.
INVALID
||
!
currencyA
||
!
currencyB
)
{
const
errorText
=
loading
?
undefined
:
<
Trans
i18nKey=
"chart.error.pools"
/>
...
...
@@ -376,8 +377,8 @@ function LiquidityTooltipDisplay({
}
function
LiquidityChart
({
token
A
,
token
B
,
currency
A
,
currency
B
,
feeTier
,
isReversed
,
chainId
,
...
...
@@ -386,8 +387,8 @@ function LiquidityChart({
hooks
,
poolId
,
}:
{
tokenA
:
Token
tokenB
:
Token
currencyA
:
Currency
currencyB
:
Currency
feeTier
:
FeeAmount
isReversed
:
boolean
chainId
:
UniverseChainId
...
...
@@ -397,12 +398,12 @@ function LiquidityChart({
poolId
?:
string
})
{
const
{
t
}
=
useTranslation
()
const
tokenADescriptor
=
tokenA
.
symbol
??
token
A
.
name
??
t
(
'
common.tokenA
'
)
const
tokenBDescriptor
=
tokenB
.
symbol
??
token
B
.
name
??
t
(
'
common.tokenB
'
)
const
tokenADescriptor
=
currencyA
.
symbol
??
currency
A
.
name
??
t
(
'
common.tokenA
'
)
const
tokenBDescriptor
=
currencyB
.
symbol
??
currency
B
.
name
??
t
(
'
common.tokenB
'
)
const
{
tickData
,
activeTick
,
loading
}
=
useLiquidityBarData
({
token
A
,
token
B
,
currency
A
,
currency
B
,
feeTier
,
isReversed
,
chainId
,
...
...
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