feat: log swap failures to amplitude (#6789)

This commit is contained in:
eddie 2023-06-16 11:20:09 -07:00 committed by GitHub
parent eb802266e1
commit 6528fd136e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -441,6 +441,11 @@ export function Swap({
})
})
.catch((error) => {
if (!didUserReject(error)) {
sendAnalyticsEvent(SwapEventName.SWAP_ERROR, {
confirmedTrade: tradeToConfirm,
})
}
setSwapState((currentState) => ({
...currentState,
swapError: error,
@ -455,6 +460,7 @@ export function Swap({
account,
trade?.inputAmount?.currency?.symbol,
trade?.outputAmount?.currency?.symbol,
tradeToConfirm,
])
// errors