Skip to content

Commit

Permalink
insufficient funds error message
Browse files Browse the repository at this point in the history
  • Loading branch information
arcoraven committed Dec 6, 2024
1 parent 78eb918 commit c3beea7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/utils/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ export const isReplacementGasFeeTooLow = (error: unknown) => {
export const isInsufficientFundsError = (error: unknown) => {
const message = _parseMessage(error);
if (message) {
return (
message.includes("insufficient funds for gas * price + value") ||
message.includes("insufficient funds for intrinsic transaction cost")
);
return message.includes("insufficient funds");
}
return isEthersErrorCode(error, ethers.errors.INSUFFICIENT_FUNDS);
};

0 comments on commit c3beea7

Please sign in to comment.