diff --git a/RELEASE b/RELEASE index 0600a895203..4d2d2a3ce0e 100644 --- a/RELEASE +++ b/RELEASE @@ -1,6 +1,6 @@ IPFS hash of the deployment: -- CIDv0: `QmNtGELVTA6qcn1ftK8VnJE1wz8yZdDQC89cs6dK6hHs1i` -- CIDv1: `bafybeiaidevumwytkxmfm5otaerhlvgpiawod6owbx5wayykk5ghg5vj2e` +- CIDv0: `QmSFSxn2NQ8LP2HZckSX6WkmwGz9SQudXWqsQ9ShJKRZSb` +- CIDv1: `bafybeib2dgh2xulteyu7s2lwepf2oyuwf63k3cpxeb5ogcnemn3cdsmpjq` The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org). @@ -10,15 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway. Your Uniswap settings are never remembered across different URLs. IPFS gateways: -- https://bafybeiaidevumwytkxmfm5otaerhlvgpiawod6owbx5wayykk5ghg5vj2e.ipfs.dweb.link/ -- https://bafybeiaidevumwytkxmfm5otaerhlvgpiawod6owbx5wayykk5ghg5vj2e.ipfs.cf-ipfs.com/ -- [ipfs://QmNtGELVTA6qcn1ftK8VnJE1wz8yZdDQC89cs6dK6hHs1i/](ipfs://QmNtGELVTA6qcn1ftK8VnJE1wz8yZdDQC89cs6dK6hHs1i/) +- https://bafybeib2dgh2xulteyu7s2lwepf2oyuwf63k3cpxeb5ogcnemn3cdsmpjq.ipfs.dweb.link/ +- https://bafybeib2dgh2xulteyu7s2lwepf2oyuwf63k3cpxeb5ogcnemn3cdsmpjq.ipfs.cf-ipfs.com/ +- [ipfs://QmSFSxn2NQ8LP2HZckSX6WkmwGz9SQudXWqsQ9ShJKRZSb/](ipfs://QmSFSxn2NQ8LP2HZckSX6WkmwGz9SQudXWqsQ9ShJKRZSb/) -### 5.65.1 (2025-01-15) +### 5.65.2 (2025-01-16) ### Bug Fixes -* **web:** explore table should use chainId in ranking (#15144) 3834990 +* **web:** cherry-picks lping to reduce trading API errors (#15225) 1db3f5d diff --git a/VERSION b/VERSION index 0e3509790d0..6187399d535 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -web/5.65.1 \ No newline at end of file +web/5.65.2 \ No newline at end of file diff --git a/apps/web/src/components/IncreaseLiquidity/IncreaseLiquidityTxContext.tsx b/apps/web/src/components/IncreaseLiquidity/IncreaseLiquidityTxContext.tsx index 26180422e81..0e3b7a32d9f 100644 --- a/apps/web/src/components/IncreaseLiquidity/IncreaseLiquidityTxContext.tsx +++ b/apps/web/src/components/IncreaseLiquidity/IncreaseLiquidityTxContext.tsx @@ -5,6 +5,7 @@ import { useIncreaseLiquidityContext } from 'components/IncreaseLiquidity/Increa import { useModalLiquidityInitialState } from 'components/Liquidity/hooks' import { getProtocolItems } from 'components/Liquidity/utils' import { ZERO_ADDRESS } from 'constants/misc' +import { getCurrencyAddressForTradingApi, getCurrencyWithWrap } from 'pages/Pool/Positions/create/utils' import { PropsWithChildren, createContext, useContext, useMemo } from 'react' import { useCheckLpApprovalQuery } from 'uniswap/src/data/apiClients/tradingApi/useCheckLpApprovalQuery' import { useIncreaseLpPositionCalldataQuery } from 'uniswap/src/data/apiClients/tradingApi/useIncreaseLpPositionCalldataQuery' @@ -51,12 +52,12 @@ export function IncreaseLiquidityTxContextProvider({ children }: PropsWithChildr walletAddress: account.address, chainId: positionInfo.currency0Amount.currency.chainId, protocol: getProtocolItems(positionInfo.version), - token0: positionInfo.currency0Amount.currency.isNative - ? ZERO_ADDRESS - : positionInfo.currency0Amount.currency.address, - token1: positionInfo.currency1Amount.currency.isNative - ? ZERO_ADDRESS - : positionInfo.currency1Amount.currency.address, + token0: getCurrencyAddressForTradingApi( + getCurrencyWithWrap(positionInfo.currency0Amount.currency, positionInfo.version), + ), + token1: getCurrencyAddressForTradingApi( + getCurrencyWithWrap(positionInfo.currency1Amount.currency, positionInfo.version), + ), amount0: currencyAmounts?.TOKEN0?.quotient.toString(), amount1: currencyAmounts?.TOKEN1?.quotient.toString(), } diff --git a/apps/web/src/pages/Pool/Positions/create/utils.tsx b/apps/web/src/pages/Pool/Positions/create/utils.tsx index d2f63396ade..bbc7d054d88 100644 --- a/apps/web/src/pages/Pool/Positions/create/utils.tsx +++ b/apps/web/src/pages/Pool/Positions/create/utils.tsx @@ -566,11 +566,11 @@ export function getV3PriceRangeInfo({ const { protocolVersion, currencies } = derivedPositionInfo const pool = derivedPositionInfo.pool - const sortedTokens = getSortedCurrenciesTuple( - getCurrencyWithWrap(currencies[0], protocolVersion), - getCurrencyWithWrap(currencies[1], protocolVersion), - ) + const tokenA = getCurrencyWithWrap(currencies[0], protocolVersion) + const tokenB = getCurrencyWithWrap(currencies[1], protocolVersion) + const sortedTokens = getSortedCurrenciesTuple(tokenA, tokenB) const [sortedToken0, sortedToken1] = sortedTokens + const [baseCurrency, quoteCurrency] = getInvertedTuple(currencies, state.priceInverted) const [baseToken, quoteToken] = [ getCurrencyWithWrap(baseCurrency, protocolVersion), @@ -656,21 +656,22 @@ export function getV3PriceRangeInfo({ !invalidRange && price && prices[0] && prices[1] && (price.lessThan(prices[0]) || price.greaterThan(prices[1])), ) + // This is in terms of the sorted tokens const deposit0Disabled = Boolean(upperTick && poolForPosition && poolForPosition.tickCurrent >= upperTick) const deposit1Disabled = Boolean(lowerTick && poolForPosition && poolForPosition.tickCurrent <= lowerTick) const depositADisabled = invalidRange || Boolean( - (deposit0Disabled && poolForPosition && baseToken && poolForPosition.token0.equals(baseToken)) || - (deposit1Disabled && poolForPosition && baseToken && poolForPosition.token1.equals(baseToken)), + (deposit0Disabled && poolForPosition && tokenA && poolForPosition.token0.equals(tokenA)) || + (deposit1Disabled && poolForPosition && tokenA && poolForPosition.token1.equals(tokenA)), ) const depositBDisabled = invalidRange || Boolean( - (deposit0Disabled && poolForPosition && quoteToken && poolForPosition.token0.equals(quoteToken)) || - (deposit1Disabled && poolForPosition && quoteToken && poolForPosition.token1.equals(quoteToken)), + (deposit0Disabled && poolForPosition && tokenB && poolForPosition.token0.equals(tokenB)) || + (deposit1Disabled && poolForPosition && tokenB && poolForPosition.token1.equals(tokenB)), ) return { @@ -883,8 +884,8 @@ export function generateAddLiquidityApprovalParams({ walletAddress: account.address, chainId: currencyAmounts.TOKEN0.currency.chainId, protocol: apiProtocolItems, - token0: getCurrencyAddressForTradingApi(currencies[0]), - token1: getCurrencyAddressForTradingApi(currencies[1]), + token0: getCurrencyAddressForTradingApi(getCurrencyWithWrap(currencies[0], positionState.protocolVersion)), + token1: getCurrencyAddressForTradingApi(getCurrencyWithWrap(currencies[1], positionState.protocolVersion)), amount0: currencyAmounts?.TOKEN0?.quotient.toString(), amount1: currencyAmounts?.TOKEN1?.quotient.toString(), } satisfies CheckApprovalLPRequest