Commit 6528fd13 authored by eddie's avatar eddie Committed by GitHub

feat: log swap failures to amplitude (#6789)

parent eb802266
......@@ -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
......
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