Skip to content

Commit 5064ba2

Browse files
ci(release): publish latest release
1 parent 65288f4 commit 5064ba2

4 files changed

Lines changed: 59 additions & 34 deletions

File tree

RELEASE

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
IPFS hash of the deployment:
2-
- CIDv0: `QmcDLYNCmBY8GZivEGAw4fwyeT24YpT1FqttKTkcRFfivc`
3-
- CIDv1: `bafybeigoeqbd3sgqs3ry32353einpmrcuy5p45hutcmjp4qummebbwhw7e`
2+
- CIDv0: `QmSR5NDYo4zoKKUQJ6fbr7QBw8VzMSYTPLCKWFrnEy3siH`
3+
- CIDv1: `bafybeib4sdzwnyzjkgip3tbxxpwp76goocrdu77z5cnshiitjqcpnv2pci`
44

55
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
66

@@ -10,14 +10,14 @@ You can also access the Uniswap Interface from an IPFS gateway.
1010
Your Uniswap settings are never remembered across different URLs.
1111

1212
IPFS gateways:
13-
- https://bafybeigoeqbd3sgqs3ry32353einpmrcuy5p45hutcmjp4qummebbwhw7e.ipfs.dweb.link/
14-
- [ipfs://QmcDLYNCmBY8GZivEGAw4fwyeT24YpT1FqttKTkcRFfivc/](ipfs://QmcDLYNCmBY8GZivEGAw4fwyeT24YpT1FqttKTkcRFfivc/)
13+
- https://bafybeib4sdzwnyzjkgip3tbxxpwp76goocrdu77z5cnshiitjqcpnv2pci.ipfs.dweb.link/
14+
- [ipfs://QmSR5NDYo4zoKKUQJ6fbr7QBw8VzMSYTPLCKWFrnEy3siH/](ipfs://QmSR5NDYo4zoKKUQJ6fbr7QBw8VzMSYTPLCKWFrnEy3siH/)
1515

16-
### 5.80.2 (2025-04-25)
16+
### 5.80.3 (2025-04-25)
1717

1818

1919
### Bug Fixes
2020

21-
* **web:** reenable logging in statsig config (#18894) ae7ebce
21+
* **web:** prod hotfix v4 eth pair liq chart fix (#18899) bab7ea8
2222

2323

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web/5.80.2
1+
web/5.80.3

apps/web/src/components/Charts/LiquidityChart/index.tsx

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { BigNumber } from '@ethersproject/bignumber'
22
import { ProtocolVersion } from '@uniswap/client-pools/dist/pools/v1/types_pb'
3-
import { CurrencyAmount, Token } from '@uniswap/sdk-core'
3+
import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core'
44
import { FeeAmount, Pool as PoolV3, TICK_SPACINGS, TickMath as TickMathV3, tickToPrice } from '@uniswap/v3-sdk'
5-
import { Pool as PoolV4 } from '@uniswap/v4-sdk'
5+
import { Pool as PoolV4, tickToPrice as tickToPriceV4 } from '@uniswap/v4-sdk'
66
import { ChartHoverData, ChartModel, ChartModelParams } from 'components/Charts/ChartModel'
77
import { LiquidityBarSeries } from 'components/Charts/LiquidityChart/liquidity-bar-series'
88
import {
@@ -123,6 +123,7 @@ function maxAmount(token: Token) {
123123
}
124124

125125
/** Calculates tokens locked in the active tick range based on the current tick */
126+
// TODO(WEB-7564): determine how to support v4
126127
async function calculateActiveRangeTokensLocked(
127128
token0: Token,
128129
token1: Token,
@@ -224,9 +225,10 @@ export async function calculateTokensLockedV3(
224225
}
225226
}
226227

228+
// TODO(WEB-7564): determine if tick math needs to be converted to support v4
227229
export async function calculateTokensLockedV4(
228-
token0: Token,
229-
token1: Token,
230+
token0: Currency,
231+
token1: Currency,
230232
feeTier: FeeAmount,
231233
tickSpacing: number,
232234
hooks: string,
@@ -278,8 +280,8 @@ export async function calculateTokensLockedV4(
278280
}
279281

280282
export function useLiquidityBarData({
281-
tokenA,
282-
tokenB,
283+
currencyA,
284+
currencyB,
283285
feeTier,
284286
isReversed,
285287
chainId,
@@ -288,8 +290,8 @@ export function useLiquidityBarData({
288290
hooks,
289291
poolId,
290292
}: {
291-
tokenA: Token
292-
tokenB: Token
293+
currencyA: Currency
294+
currencyB: Currency
293295
feeTier: FeeAmount
294296
isReversed: boolean
295297
chainId: UniverseChainId
@@ -299,9 +301,15 @@ export function useLiquidityBarData({
299301
poolId?: string
300302
}) {
301303
const { formatNumber, formatPrice } = useFormatter()
304+
305+
// Determine the correct tokens to use based on the protocol version
306+
// V3 requires tokens, V4 can handle native or tokens
307+
const tokenAWrapped = currencyA.wrapped
308+
const tokenBWrapped = currencyB.wrapped
309+
302310
const activePoolData = usePoolActiveLiquidity({
303-
currencyA: tokenA,
304-
currencyB: tokenB,
311+
currencyA,
312+
currencyB,
305313
feeAmount: feeTier,
306314
version,
307315
poolId,
@@ -341,15 +349,18 @@ export function useLiquidityBarData({
341349
activeRangeIndex = index
342350
activeRangePercentage = (activePoolData.currentTick - t.tick) / TICK_SPACINGS[feeTier]
343351

344-
price0 = tickToPrice(tokenA, tokenB, t.tick)
352+
price0 =
353+
version === ProtocolVersion.V3
354+
? tickToPrice(tokenAWrapped, tokenBWrapped, t.tick)
355+
: tickToPriceV4(currencyA, currencyB, t.tick)
345356
price1 = price0.invert()
346357
}
347358

348359
const { amount0Locked, amount1Locked } = await (version === ProtocolVersion.V3
349-
? calculateTokensLockedV3(tokenA, tokenB, feeTier, t)
360+
? calculateTokensLockedV3(tokenAWrapped, tokenBWrapped, feeTier, t)
350361
: calculateTokensLockedV4(
351-
tokenA,
352-
tokenB,
362+
currencyA,
363+
currencyB,
353364
feeTier,
354365
tickSpacing ?? TICK_SPACINGS[feeTier],
355366
hooks ?? ZERO_ADDRESS,
@@ -379,8 +390,8 @@ export function useLiquidityBarData({
379390
// For active range, adjust amounts locked to adjust for where current tick/price is within the range
380391
if (activeRangeIndex !== undefined && activeRangeData) {
381392
const activeTickTvl = await calculateActiveRangeTokensLocked(
382-
tokenA,
383-
tokenB,
393+
tokenAWrapped,
394+
tokenBWrapped,
384395
feeTier,
385396
ticksProcessed[activeRangeIndex],
386397
activePoolData,
@@ -398,7 +409,20 @@ export function useLiquidityBarData({
398409
}
399410

400411
formatData()
401-
}, [activePoolData, tokenA, tokenB, formatNumber, formatPrice, isReversed, feeTier, version, tickSpacing, hooks])
412+
}, [
413+
activePoolData,
414+
currencyA,
415+
currencyB,
416+
tokenAWrapped,
417+
tokenBWrapped,
418+
formatNumber,
419+
formatPrice,
420+
isReversed,
421+
feeTier,
422+
version,
423+
tickSpacing,
424+
hooks,
425+
])
402426

403427
return { tickData, activeTick: activePoolData.activeTick, loading: activePoolData.isLoading || !tickData }
404428
}

apps/web/src/components/Pools/PoolDetails/ChartSection/index.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ProtocolVersion as RestProtocolVersion } from '@uniswap/client-pools/dist/pools/v1/types_pb'
2-
import { CurrencyAmount, Token } from '@uniswap/sdk-core'
2+
import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core'
33
import { FeeAmount } from '@uniswap/v3-sdk'
44
import { ChartHeader } from 'components/Charts/ChartHeader'
55
import { Chart, refitChartContentAtom } from 'components/Charts/ChartModel'
@@ -188,8 +188,9 @@ export default function ChartSection(props: ChartSectionProps) {
188188
}
189189

190190
// TODO(WEB-3740): Integrate BE tick query, remove special casing for liquidity chart
191+
// Pass currencyA/B to LiquidityChart to avoid wrapping native tokens for v4 pools
191192
if (activeQuery.chartType === ChartType.LIQUIDITY) {
192-
return <LiquidityChart {...selectedChartProps} />
193+
return <LiquidityChart {...selectedChartProps} currencyA={currencyA} currencyB={currencyB} />
193194
}
194195
if (activeQuery.dataQuality === DataQuality.INVALID || !currencyA || !currencyB) {
195196
const errorText = loading ? undefined : <Trans i18nKey="chart.error.pools" />
@@ -376,8 +377,8 @@ function LiquidityTooltipDisplay({
376377
}
377378

378379
function LiquidityChart({
379-
tokenA,
380-
tokenB,
380+
currencyA,
381+
currencyB,
381382
feeTier,
382383
isReversed,
383384
chainId,
@@ -386,8 +387,8 @@ function LiquidityChart({
386387
hooks,
387388
poolId,
388389
}: {
389-
tokenA: Token
390-
tokenB: Token
390+
currencyA: Currency
391+
currencyB: Currency
391392
feeTier: FeeAmount
392393
isReversed: boolean
393394
chainId: UniverseChainId
@@ -397,12 +398,12 @@ function LiquidityChart({
397398
poolId?: string
398399
}) {
399400
const { t } = useTranslation()
400-
const tokenADescriptor = tokenA.symbol ?? tokenA.name ?? t('common.tokenA')
401-
const tokenBDescriptor = tokenB.symbol ?? tokenB.name ?? t('common.tokenB')
401+
const tokenADescriptor = currencyA.symbol ?? currencyA.name ?? t('common.tokenA')
402+
const tokenBDescriptor = currencyB.symbol ?? currencyB.name ?? t('common.tokenB')
402403

403404
const { tickData, activeTick, loading } = useLiquidityBarData({
404-
tokenA,
405-
tokenB,
405+
currencyA,
406+
currencyB,
406407
feeTier,
407408
isReversed,
408409
chainId,

0 commit comments

Comments
 (0)