Skip to content

Commit

Permalink
fix msg for walletconnet
Browse files Browse the repository at this point in the history
  • Loading branch information
XueMoMo committed Oct 17, 2024
1 parent 91ec0d5 commit 809d8a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const getErrorMsg = (error: any, def = 'Network Error'): string => {
else if (typeof error?.msg == 'string') msg = error?.msg
else if (typeof error?.message == 'string') msg = error?.message
// replace
if (msg.includes('User denied') || msg.includes('user rejected transaction'))
if (msg.includes('User denied') || msg.includes('user rejected transaction') || msg.includes('User rejected'))
return 'You declined the action in your wallet.'
if (msg.includes('transaction failed')) return 'Transaction failed'
return msg
Expand Down

0 comments on commit 809d8a1

Please sign in to comment.