Skip to content

Commit

Permalink
fix: ignore user rejection from metamask (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
just-toby authored 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

1 comment on commit f5ab1c0

@vercel
Copy link

@vercel vercel bot commented on f5ab1c0 Mar 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

widgets – ./

widgets-git-main-uniswap.vercel.app
widgets-seven-tau.vercel.app
widgets-uniswap.vercel.app

Please sign in to comment.