Skip to content

Commit

Permalink
feat:refactor error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
livingrockrises committed Dec 29, 2023
1 parent 037c9e1 commit ec2563f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/sponsorship/SponsorshipPaymaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ contract SponsorshipPaymaster is
) public override nonReentrant {
if (withdrawAddress == address(0)) revert CanNotWithdrawToZeroAddress();
uint256 currentBalance = paymasterIdBalances[msg.sender];
require(amount <= currentBalance, "Sponsorship Paymaster: Insufficient withdrawable funds");
require(amount <= currentBalance, "Sponsorship Paymaster: Insufficient funds to withdraw from gas tank");
paymasterIdBalances[msg.sender] = currentBalance - amount;
entryPoint.withdrawTo(withdrawAddress, amount);
emit GasWithdrawn(msg.sender, withdrawAddress, amount);
Expand Down Expand Up @@ -314,7 +314,7 @@ contract SponsorshipPaymaster is
);
uint256 sigLength = signature.length;
// we only "require" it here so that the revert reason on invalid signature will be of "VerifyingPaymaster", and not "ECDSA"
require(sigLength == 65, "Sponsorship Paymaster:invalid signature length");
require(sigLength == 65, "Sponsorship Paymaster:invalid paymaster signature length");
//don't revert on signature failure: return SIG_VALIDATION_FAILED
if (
verifyingSigner != hash.toEthSignedMessageHash().recover(signature)
Expand Down

0 comments on commit ec2563f

Please sign in to comment.