ci(release): publish latest release

parent df1b743b
IPFS hash of the deployment: IPFS hash of the deployment:
- CIDv0: `QmbPRyz7JxeDFrkmKzQnSi5h8Vn5iP81skJA5SoXkfJb6G` - CIDv0: `QmSSKD7h4Q9E4bEtFW5zqeBJQ419v7BGHUushs7Myz2WQQ`
- CIDv1: `bafybeigb3zegvo3fwadtcskq6ty2fbznvkqu7jkxt56dequcbqenjo5kme` - CIDv1: `bafybeib44ixryspegordbiauzjcek6nvu4kqbdgucj6dgvwiv4jad6owde`
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,15 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway. ...@@ -10,15 +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://bafybeigb3zegvo3fwadtcskq6ty2fbznvkqu7jkxt56dequcbqenjo5kme.ipfs.dweb.link/ - https://bafybeib44ixryspegordbiauzjcek6nvu4kqbdgucj6dgvwiv4jad6owde.ipfs.dweb.link/
- https://bafybeigb3zegvo3fwadtcskq6ty2fbznvkqu7jkxt56dequcbqenjo5kme.ipfs.cf-ipfs.com/ - https://bafybeib44ixryspegordbiauzjcek6nvu4kqbdgucj6dgvwiv4jad6owde.ipfs.cf-ipfs.com/
- [ipfs://QmbPRyz7JxeDFrkmKzQnSi5h8Vn5iP81skJA5SoXkfJb6G/](ipfs://QmbPRyz7JxeDFrkmKzQnSi5h8Vn5iP81skJA5SoXkfJb6G/) - [ipfs://QmSSKD7h4Q9E4bEtFW5zqeBJQ419v7BGHUushs7Myz2WQQ/](ipfs://QmSSKD7h4Q9E4bEtFW5zqeBJQ419v7BGHUushs7Myz2WQQ/)
### 5.50.1 (2024-10-07) ### 5.50.2 (2024-10-09)
### Bug Fixes ### Bug Fixes
* **web:** invalidate local activity cache for updates to transaction or signature state - prod (#12732) 74b24f2 * **web:** log step and original error on web (#12826) 5d4bd4f
web/5.50.1 web/5.50.2
\ No newline at end of file \ No newline at end of file
...@@ -54,8 +54,10 @@ import { ...@@ -54,8 +54,10 @@ import {
import { isClassic } from 'uniswap/src/features/transactions/swap/utils/routing' import { isClassic } from 'uniswap/src/features/transactions/swap/utils/routing'
import { getClassicQuoteFromResponse } from 'uniswap/src/features/transactions/swap/utils/tradingApi' import { getClassicQuoteFromResponse } from 'uniswap/src/features/transactions/swap/utils/tradingApi'
import { createSaga } from 'uniswap/src/utils/saga' import { createSaga } from 'uniswap/src/utils/saga'
import { errorToString } from 'utilities/src/errors'
import { percentFromFloat } from 'utilities/src/format/percent' import { percentFromFloat } from 'utilities/src/format/percent'
import { logger } from 'utilities/src/logger/logger' import { logger } from 'utilities/src/logger/logger'
import { LoggerErrorContext } from 'utilities/src/logger/types'
import { didUserReject } from 'utils/swapErrorToUserReadableMessage' import { didUserReject } from 'utils/swapErrorToUserReadableMessage'
interface HandleSwapStepParams extends Omit<HandleOnChainStepParams, 'step' | 'info'> { interface HandleSwapStepParams extends Omit<HandleOnChainStepParams, 'step' | 'info'> {
...@@ -206,9 +208,7 @@ function* classicSwap( ...@@ -206,9 +208,7 @@ function* classicSwap(
} }
} catch (error) { } catch (error) {
const displayableError = getDisplayableError(error, step) const displayableError = getDisplayableError(error, step)
if (displayableError) { logSwapError(displayableError, { tags: { file: 'swapSaga', function: 'classicSwap' } })
logger.error(displayableError, { tags: { file: 'swapSaga', function: 'classicSwap' } })
}
onFailure(displayableError) onFailure(displayableError)
return return
} }
...@@ -256,9 +256,7 @@ function* uniswapXSwap( ...@@ -256,9 +256,7 @@ function* uniswapXSwap(
} }
} catch (error) { } catch (error) {
const displayableError = getDisplayableError(error, step) const displayableError = getDisplayableError(error, step)
if (displayableError) { logSwapError(displayableError, { tags: { file: 'swapSaga', function: 'uniswapXSwap' } })
logger.error(displayableError, { tags: { file: 'swapSaga', function: 'uniswapXSwap' } })
}
onFailure(displayableError) onFailure(displayableError)
return return
} }
...@@ -267,6 +265,21 @@ function* uniswapXSwap( ...@@ -267,6 +265,21 @@ function* uniswapXSwap(
yield* call(onSuccess) yield* call(onSuccess)
} }
function logSwapError(error: TransactionError | undefined, captureContext: LoggerErrorContext) {
if (error instanceof TransactionStepFailedError) {
logger.error(
{
...error,
step: JSON.stringify(error.step),
originalError: errorToString(error.originalError),
},
captureContext,
)
} else if (error) {
logger.error(error, captureContext)
}
}
function getDisplayableError(error: Error, step: TransactionStep): TransactionError | undefined { function getDisplayableError(error: Error, step: TransactionStep): TransactionError | undefined {
// If the user rejects a request, or it's a known interruption e.g. trade update, we handle gracefully / do not show error UI // If the user rejects a request, or it's a known interruption e.g. trade update, we handle gracefully / do not show error UI
if (didUserReject(error) || error instanceof HandledTransactionInterrupt) { if (didUserReject(error) || error instanceof HandledTransactionInterrupt) {
......
...@@ -327,19 +327,10 @@ export function validateTrade({ ...@@ -327,19 +327,10 @@ export function validateTrade({
const inputsMatch = areAddressesEqual(currencyIn.wrapped.address, trade?.inputAmount.currency.wrapped.address) const inputsMatch = areAddressesEqual(currencyIn.wrapped.address, trade?.inputAmount.currency.wrapped.address)
const outputsMatch = areAddressesEqual(currencyOut.wrapped.address, trade.outputAmount.currency.wrapped.address) const outputsMatch = areAddressesEqual(currencyOut.wrapped.address, trade.outputAmount.currency.wrapped.address)
// TODO(MOB-3028): check if this logic needs any adjustments once we add UniswapX support.
// Verify the amount specified in the quote response matches the exact amount from input state
const exactAmountFromQuote = isClassicQuote(trade.quote?.quote)
? exactCurrencyField === CurrencyField.INPUT
? trade.quote.quote.input?.amount
: trade.quote.quote.output?.amount
: undefined
const tokenAddressesMatch = inputsMatch && outputsMatch const tokenAddressesMatch = inputsMatch && outputsMatch
const exactAmountsMatch = exactAmount?.toExact() !== exactAmountFromQuote // TODO(WEB-5132): Add validation checking that exact amount from response matches exact amount from user input
if (!tokenAddressesMatch) {
if (!(tokenAddressesMatch && exactAmountsMatch)) { logger.error(new Error(`Mismatched address in swap trade`), {
logger.error(new Error(`Mismatched ${!tokenAddressesMatch ? 'address' : 'exact amount'} in swap trade`), {
tags: { file: 'tradingApi/utils', function: 'validateTrade' }, tags: { file: 'tradingApi/utils', function: 'validateTrade' },
extra: { extra: {
formState: { formState: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment