ci(release): publish latest release

parent 690d2970
IPFS hash of the deployment: IPFS hash of the deployment:
- CIDv0: `QmfTNnuaGjKgsrCc3CrXy8JZCw1gDPaWCzmXwt7GvDRXNK` - CIDv0: `QmRfmKBiCcSDFdGRZuJKqPtyenCsCFasgiwNvTJQMrbjT6`
- CIDv1: `bafybeih6j67orz7joqshoxrbzvxmqlipzfdlpuw7d252kjjqbpsjcpmnnq` - CIDv1: `bafybeibrpcihc5cqqzntesoc5dtxyili3uvyrfmxi7fcx4uteto7ucpj6e`
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,10 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway. ...@@ -10,10 +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://bafybeih6j67orz7joqshoxrbzvxmqlipzfdlpuw7d252kjjqbpsjcpmnnq.ipfs.dweb.link/ - https://bafybeibrpcihc5cqqzntesoc5dtxyili3uvyrfmxi7fcx4uteto7ucpj6e.ipfs.dweb.link/
- https://bafybeih6j67orz7joqshoxrbzvxmqlipzfdlpuw7d252kjjqbpsjcpmnnq.ipfs.cf-ipfs.com/ - https://bafybeibrpcihc5cqqzntesoc5dtxyili3uvyrfmxi7fcx4uteto7ucpj6e.ipfs.cf-ipfs.com/
- [ipfs://QmfTNnuaGjKgsrCc3CrXy8JZCw1gDPaWCzmXwt7GvDRXNK/](ipfs://QmfTNnuaGjKgsrCc3CrXy8JZCw1gDPaWCzmXwt7GvDRXNK/) - [ipfs://QmRfmKBiCcSDFdGRZuJKqPtyenCsCFasgiwNvTJQMrbjT6/](ipfs://QmRfmKBiCcSDFdGRZuJKqPtyenCsCFasgiwNvTJQMrbjT6/)
### 5.2.1 (2023-12-13) ### 5.2.2 (2023-12-15)
### Bug Fixes
* **web:** disambiguate 3P ProviderRpcErrors (#5482) 0f8a086
web/5.2.1 web/5.2.2
\ No newline at end of file \ No newline at end of file
...@@ -187,4 +187,17 @@ describe('beforeSend', () => { ...@@ -187,4 +187,17 @@ describe('beforeSend', () => {
expect(beforeSend(ERROR, { originalException })).toBeNull() expect(beforeSend(ERROR, { originalException })).toBeNull()
}) })
}) })
describe('ProviderRpcErrors', () => {
it('augments the event with an exception from the ProviderRpcError', () => {
const exception = { mechanism: { handled: false, synthetic: true } }
const event = { exception: { values: [exception] } } as ErrorEvent
const originalException = { code: -32603, message: 'Internal JSON-RPC error', data: '[Object]' }
beforeSend(event, { originalException })
expect(event.exception?.values).toEqual([
exception,
{ type: 'ProviderRpcError', value: `${originalException.code}: ${originalException.message}` },
])
})
})
}) })
import { ClientOptions, ErrorEvent, EventHint } from '@sentry/types' import { ClientOptions, ErrorEvent, EventHint } from '@sentry/types'
import { ProviderRpcError } from '@web3-react/types'
import { didUserReject } from 'utils/swapErrorToUserReadableMessage' import { didUserReject } from 'utils/swapErrorToUserReadableMessage'
// `responseStatus` is only currently supported on certain browsers. // `responseStatus` is only currently supported on certain browsers.
...@@ -18,12 +19,25 @@ export const beforeSend: Required<ClientOptions>['beforeSend'] = (event: ErrorEv ...@@ -18,12 +19,25 @@ export const beforeSend: Required<ClientOptions>['beforeSend'] = (event: ErrorEv
return null return null
} }
const exception = event.exception?.values?.[0]
if (exception?.mechanism && exception.mechanism.synthetic && !exception.mechanism.handled) {
// ProviderRpcErrors occur frequently through 3P providers, so it's good to disambiguate them.
// This allows us to see which errors are actually frequent, vs which ones are extension-specific.
if (isProviderRpcError(hint.originalException)) {
event.exception?.values?.push({
type: 'ProviderRpcError',
value: `${hint.originalException.code}: ${hint.originalException.message}`,
})
}
}
updateRequestUrl(event) updateRequestUrl(event)
return event return event
} }
type ErrorLike = Partial<Error> & Required<Pick<Error, 'message'>> type ErrorLike = Partial<Error> & Required<Pick<Error, 'message'>>
function isErrorLike(error: unknown): error is ErrorLike { function isErrorLike(error: unknown): error is ErrorLike {
return error instanceof Object && 'message' in error && typeof (error as Partial<ErrorLike>)?.message === 'string' return error instanceof Object && 'message' in error && typeof (error as Partial<ErrorLike>)?.message === 'string'
} }
...@@ -106,3 +120,13 @@ function shouldRejectError(error: EventHint['originalException']) { ...@@ -106,3 +120,13 @@ function shouldRejectError(error: EventHint['originalException']) {
return false return false
} }
function isProviderRpcError(error: unknown): error is ProviderRpcError {
return (
error instanceof Object &&
'code' in error &&
typeof (error as Partial<ProviderRpcError>)?.code === 'number' &&
'message' in error &&
typeof (error as Partial<ProviderRpcError>)?.message === 'string'
)
}
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