Skip to content

Commit

Permalink
fix: check if error exists (#1759)
Browse files Browse the repository at this point in the history
  • Loading branch information
spsjvc authored Jul 16, 2024
1 parent 65782bd commit 378e160
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function TransactionsTableRowAction({
}

errorToast(
`Can't claim ${type === 'deposits' ? 'withdrawal' : 'deposit'}: ${
`Can't claim ${type === 'deposits' ? 'deposit' : 'withdrawal'}: ${
error?.message ?? error
}`
)
Expand Down
4 changes: 2 additions & 2 deletions packages/arb-token-bridge-ui/src/util/isUserRejectedError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ function isUserRejectedError(error: any) {
return (
error?.code === 4001 ||
error?.code === 'ACTION_REJECTED' ||
error instanceof UserRejectedRequestError ||
error.message.match(/User Cancelled/)
error?.message.match(/User Cancelled/) ||
error instanceof UserRejectedRequestError
)
}
export { isUserRejectedError }

0 comments on commit 378e160

Please sign in to comment.