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