Skip to content

Commit

Permalink
fix Incorrect fee amount charged
Browse files Browse the repository at this point in the history
  • Loading branch information
davidinsuomi committed Jun 5, 2024
1 parent 49d33af commit 210c26a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/paymaster/ERC20Paymaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ contract ERC20Paymaster is BasePaymaster {
(actualGasCost + costOfPost) * supportedToken[token].priceMarkup * cachedPrice / (1e18 * PRICE_DENOMINATOR);
if (sponsorWalletCreation) {
// if sponsor during wallet creatation, charge the acutal amount
IERC20Metadata(token).safeTransferFrom(sender, address(this), tokenRequiredPreFund);
IERC20Metadata(token).safeTransferFrom(sender, address(this), tokenRequiredFund);
} else if (sponsorWalletCreation == false && tokenRequiredPreFund > tokenRequiredFund) {
// refund unsed precharge token
IERC20Metadata(token).safeTransfer(sender, tokenRequiredPreFund - tokenRequiredFund);
Expand Down

0 comments on commit 210c26a

Please sign in to comment.