Skip to content

Commit

Permalink
fix: ignore user rejection from metamask (Uniswap#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
just-toby committed Mar 16, 2023
1 parent 14b32b4 commit f5ab1c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hooks/useUniversalRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function didUserReject(error: any): boolean {
const reason = getReason(error)
if (
error?.code === ErrorCode.USER_REJECTED_REQUEST ||
error?.code === 'ACTION_REJECTED' ||
(reason?.match(/request/i) && reason?.match(/reject/i)) || // For Rainbow
reason?.match(/declined/i) || // For Frame
reason?.match(/cancelled by user/i) || // For SafePal
Expand Down

0 comments on commit f5ab1c0

Please sign in to comment.