Compare commits

...

3 Commits

Author SHA1 Message Date
Charles Bachmeier
ecd208176b fix: handle both UNIWALLET and UNISWAP_WALLET in LocalStorage (#6767)
fix uniwallet bug

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2023-06-14 14:21:07 -07:00
eddie
ac93d42113 fix: remove sentry logging for swap failures (#6766) 2023-06-14 12:00:30 -07:00
UL Service Account
fca93af230 ci: add global CODEOWNERS 2023-06-09 19:00:49 +00:00
3 changed files with 7 additions and 8 deletions

1
CODEOWNERS Normal file
View File

@@ -0,0 +1 @@
@uniswap/web-admins

View File

@@ -1,5 +1,4 @@
import { Trans } from '@lingui/macro'
import * as Sentry from '@sentry/react'
import { sendAnalyticsEvent, Trace, TraceEvent, useTrace } from '@uniswap/analytics'
import {
BrowserEvent,
@@ -439,12 +438,6 @@ export function Swap({
})
})
.catch((error) => {
if (!didUserReject(error)) {
Sentry.withScope((scope) => {
scope.setExtra('confirmedTrade', tradeToConfirm)
Sentry.captureException(error)
})
}
setSwapState((currentState) => ({
...currentState,
swapError: error,
@@ -459,7 +452,6 @@ export function Swap({
account,
trade?.inputAmount?.currency?.symbol,
trade?.outputAmount?.currency?.symbol,
tradeToConfirm,
])
// errors

View File

@@ -131,6 +131,12 @@ const userSlice = createSlice({
// for all existing users with a previous version of the state in their localStorage.
// In order to avoid this, we need to set a default value for each new property manually during hydration.
builder.addCase(updateVersion, (state) => {
// If `selectedWallet` is ConnectionType.UNI_WALLET (deprecated) switch it to ConnectionType.UNISWAP_WALLET
// @ts-ignore
if (state.selectedWallet === 'UNIWALLET') {
state.selectedWallet = ConnectionType.UNISWAP_WALLET
}
// If `userSlippageTolerance` is not present or its value is invalid, reset to default
if (
typeof state.userSlippageTolerance !== 'number' ||