Skip to content

Commit

Permalink
fix translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut committed Feb 21, 2025
1 parent ae61d5a commit 1332f19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/hooks/useSigningCallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const useSigningCallback = ({ onSubmitting, onSuccess, onFinalized, onErr
error: (e: Error) => {
console.error(e)
const error = translateError(e)
addToast({ title: error.message ?? error.toString(), type: 'error' })
addToast({ title: error, type: 'error' })
onError && onError()
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/utils/translateError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const translateError = (error: any) => {
return 'Not enough funds to pay for the tx'
}

return error.toString()
return error.message || error.toString()
}

export const translateErrorInfo = (errorInfo: string) => {
Expand Down

0 comments on commit 1332f19

Please sign in to comment.