Skip to content

Commit

Permalink
fix: add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeday committed Jan 20, 2025
2 parents 49306b9 + 21e9a11 commit 07bf4ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/getErrorMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const extractHumaneMessage = (error: unknown) => {
if (error instanceof SendCallsError) {
return error.message;
}

return null;
};

Expand Down Expand Up @@ -114,6 +115,9 @@ export const extractCodeFromError = (
normalizedMessage.includes('signed declined')
)
return 'ACTION_REJECTED';

if (normalizedMessage.includes('not enough ether for gas'))
return 'INSUFFICIENT_FUNDS';
}

if ('name' in error && typeof error.name == 'string') {
Expand Down

0 comments on commit 07bf4ee

Please sign in to comment.