Skip to content

Commit 51545ba

Browse files
ci(release): publish latest release
1 parent febe0e4 commit 51545ba

File tree

7 files changed

+66
-17
lines changed

7 files changed

+66
-17
lines changed

RELEASE

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
IPFS hash of the deployment:
2-
- CIDv0: `QmWXkZCZCVea5C5dkKAgH2jR3a8LWCFmJGedqiEaK21wHj`
3-
- CIDv1: `bafybeidzwv7ldnoexuakxu7nxwvkvh7bcku5kxdixe7jdgal36mcur7doi`
2+
- CIDv0: `QmZ2woTrzL5shcw9Ek6jqsLnHAMh1KGWGPkbeoMw3toRfC`
3+
- CIDv1: `bafybeie645wzgpsz5isxptb3bdyo67rhtc4dfxjekenod6jvf6jxi7yqe4`
44

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

@@ -10,15 +10,10 @@ 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://bafybeidzwv7ldnoexuakxu7nxwvkvh7bcku5kxdixe7jdgal36mcur7doi.ipfs.dweb.link/
14-
- https://bafybeidzwv7ldnoexuakxu7nxwvkvh7bcku5kxdixe7jdgal36mcur7doi.ipfs.cf-ipfs.com/
15-
- [ipfs://QmWXkZCZCVea5C5dkKAgH2jR3a8LWCFmJGedqiEaK21wHj/](ipfs://QmWXkZCZCVea5C5dkKAgH2jR3a8LWCFmJGedqiEaK21wHj/)
13+
- https://bafybeie645wzgpsz5isxptb3bdyo67rhtc4dfxjekenod6jvf6jxi7yqe4.ipfs.dweb.link/
14+
- https://bafybeie645wzgpsz5isxptb3bdyo67rhtc4dfxjekenod6jvf6jxi7yqe4.ipfs.cf-ipfs.com/
15+
- [ipfs://QmZ2woTrzL5shcw9Ek6jqsLnHAMh1KGWGPkbeoMw3toRfC/](ipfs://QmZ2woTrzL5shcw9Ek6jqsLnHAMh1KGWGPkbeoMw3toRfC/)
1616

17-
### 5.51.1 (2024-10-10)
18-
19-
20-
### Bug Fixes
21-
22-
* **web:** Cab/web 5130 remove extension launch modal prod (#12891) 07a5a21
17+
### 5.51.2 (2024-10-10)
2318

2419

VERSION

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

apps/web/.env.production

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ REACT_APP_SENTRY_ENABLED=true
1313
REACT_APP_SENTRY_TRACES_SAMPLE_RATE=0.003
1414
REACT_APP_STATSIG_PROXY_URL="https://interface.gateway.uniswap.org/v1/statsig-proxy"
1515
REACT_APP_IS_UNISWAP_INTERFACE=true
16-
REACT_APP_TRADING_API_KEY=gcZrVL9FxqnqjVytJd2z3oqImkOKRjZ49sF7WXy9

apps/web/src/state/sagas/transactions/swapSaga.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { PopupType, addPopup } from 'state/application/reducer'
1111
import { handleUniswapXSignatureStep } from 'state/sagas/transactions/uniswapx'
1212
import {
1313
HandleOnChainStepParams,
14+
addTransactionBreadcrumb,
1415
getSwapTransactionInfo,
1516
handleApprovalTransactionStep,
1617
handleOnChainStep,
@@ -271,8 +272,11 @@ function* uniswapXSwap(
271272
}
272273

273274
function getDisplayableError(error: Error, step: TransactionStep): TransactionError | undefined {
275+
const userRejected = didUserReject(error)
274276
// If the user rejects a request, or it's a known interruption e.g. trade update, we handle gracefully / do not show error UI
275-
if (didUserReject(error) || error instanceof HandledTransactionInterrupt) {
277+
if (userRejected || error instanceof HandledTransactionInterrupt) {
278+
const loggableMessage = userRejected ? 'user rejected request' : error.message // for user rejections, avoid logging redundant/long message
279+
addTransactionBreadcrumb({ step, status: 'interrupted', data: { message: loggableMessage } })
276280
return undefined
277281
} else if (error instanceof TransactionError) {
278282
return error // If the error was already formatted as a TransactionError, we just propagate

apps/web/src/state/sagas/transactions/uniswapx.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { formatSwapSignedAnalyticsEventProperties } from 'lib/utils/analytics'
22
import { PopupType, addPopup } from 'state/application/reducer'
3-
import { HandleSignatureStepParams, getSwapTransactionInfo, handleSignatureStep } from 'state/sagas/transactions/utils'
3+
import {
4+
HandleSignatureStepParams,
5+
addTransactionBreadcrumb,
6+
getSwapTransactionInfo,
7+
handleSignatureStep,
8+
} from 'state/sagas/transactions/utils'
49
import { addSignature } from 'state/signatures/reducer'
510
import { SignatureType, UnfilledUniswapXOrderDetails } from 'state/signatures/types'
611
import { call, put } from 'typed-redux-saga'
@@ -49,6 +54,8 @@ export function* handleUniswapXSignatureStep(params: HandleUniswapXSignatureStep
4954
throw new HandledTransactionInterrupt('User signed after deadline')
5055
}
5156

57+
addTransactionBreadcrumb({ step, data: { routing, ...signatureDetails.swapInfo }, status: 'in progress' })
58+
5259
try {
5360
yield* call(submitOrder, { signature, quote, routing })
5461
} catch (error) {

apps/web/src/state/sagas/transactions/utils.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import { isUniswapX } from 'uniswap/src/features/transactions/swap/utils/routing
3636
import { interruptTransactionFlow } from 'uniswap/src/utils/saga'
3737
import { isSameAddress } from 'utilities/src/addresses'
3838
import { percentFromFloat } from 'utilities/src/format/percent'
39+
import { Sentry } from 'utilities/src/logger/Sentry'
3940
import noop from 'utilities/src/react/noop'
4041
import { currencyId } from 'utils/currencyId'
4142
import { signTypedData } from 'utils/signing'
@@ -51,6 +52,15 @@ export function* handleSignatureStep({ setCurrentStep, step, ignoreInterrupt, ac
5152
// Add a watcher to check if the transaction flow is interrupted during this step
5253
const { throwIfInterrupted } = yield* watchForInterruption(ignoreInterrupt)
5354

55+
addTransactionBreadcrumb({
56+
step,
57+
data: {
58+
domain: JSON.stringify(step.domain),
59+
values: JSON.stringify(step.values),
60+
types: JSON.stringify(step.types),
61+
},
62+
})
63+
5464
// Trigger UI prompting user to accept
5565
setCurrentStep({ step, accepted: false })
5666

@@ -59,6 +69,8 @@ export function* handleSignatureStep({ setCurrentStep, step, ignoreInterrupt, ac
5969
// If the transaction flow was interrupted, throw an error after the step has completed
6070
yield* call(throwIfInterrupted)
6171

72+
addTransactionBreadcrumb({ step, data: { signature }, status: 'complete' })
73+
6274
return signature
6375
}
6476

@@ -81,12 +93,16 @@ export function* handleOnChainStep<T extends OnChainTransactionStep>(params: Han
8193
const { chainId } = step.txRequest
8294
const signer = yield* call(getSigner, account.address)
8395

96+
addTransactionBreadcrumb({ step, data: { ...info } })
97+
8498
// Avoid sending prompting a transaction if the user already submitted an equivalent tx, e.g. by closing and reopening a transaction flow
8599
const duplicativeTx = yield* findDuplicativeTx(info, account, chainId, allowDuplicativeTx)
86100
if (duplicativeTx) {
87101
if (duplicativeTx.status === TransactionStatus.Confirmed) {
102+
addTransactionBreadcrumb({ step, data: { duplicativeTx: true, hash: duplicativeTx.hash }, status: 'complete' })
88103
return duplicativeTx.hash
89104
} else {
105+
addTransactionBreadcrumb({ step, data: { duplicativeTx: true, hash: duplicativeTx.hash }, status: 'in progress' })
90106
setCurrentStep({ step, accepted: true })
91107
return yield* handleOnChainConfirmation(params, duplicativeTx.hash)
92108
}
@@ -139,6 +155,9 @@ function* handleOnChainConfirmation(params: HandleOnChainStepParams, hash: strin
139155
if (interrupt) {
140156
throw new HandledTransactionInterrupt('Transaction flow was interrupted')
141157
}
158+
159+
addTransactionBreadcrumb({ step, data: { txHash: hash }, status: 'complete' })
160+
142161
return hash
143162
}
144163

@@ -267,3 +286,22 @@ export function getSwapTransactionInfo(trade: ClassicTrade | UniswapXTrade): Swa
267286
}),
268287
}
269288
}
289+
290+
export function addTransactionBreadcrumb({
291+
step,
292+
data = {},
293+
status = 'initiated',
294+
}: {
295+
step: TransactionStep
296+
data?: {
297+
[key: string]: string | number | boolean | undefined
298+
}
299+
status?: 'initiated' | 'complete' | 'in progress' | 'interrupted'
300+
}) {
301+
Sentry.addBreadCrumb({
302+
level: 'info',
303+
category: 'transaction',
304+
message: `${step.type} ${status}`,
305+
data,
306+
})
307+
}

packages/uniswap/src/features/transactions/errors.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ export class TransactionStepFailedError extends TransactionError {
2121
step: TransactionStep
2222
isBackendRejection: boolean
2323
originalError?: Error
24-
stringified?: string
24+
25+
// string fields for Sentry
26+
originalErrorStringified?: string
27+
originalErrorString?: string // originalErrorStringified error may get cut off by sentry size limits; this acts as minimal backup
28+
stepStringified?: string
2529

2630
constructor({
2731
message,
@@ -41,7 +45,9 @@ export class TransactionStepFailedError extends TransactionError {
4145
this.originalError = originalError
4246

4347
try {
44-
this.stringified = JSON.stringify(this, null, 2) // provides more insight to sentry logs
48+
this.originalErrorString = originalError?.toString()
49+
this.originalErrorStringified = JSON.stringify(originalError, null, 2)
50+
this.stepStringified = JSON.stringify(step, null, 2)
4551
} catch {}
4652
}
4753
}

0 commit comments

Comments
 (0)