Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
rrecuero committed Dec 4, 2024
1 parent 90bfaa5 commit 8860441
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/paymasters/SponsorPaymaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,14 @@ contract SponsorPaymaster is Initializable, BasePaymaster, UUPSUpgradeable, Reen
uint256 ethMaxCost = (maxCost + COST_OF_POST * gasPriceUserOp);
if (ethMaxCost > userOpMaxCost) revert GasTooHighForUserOp();

address targetContract = _decodeCallData(userOp.callData);
address sponsor = appRegistry.getApp(targetContract);
address sponsor = appRegistry.getApp(_decodeCallData(userOp.callData));
if (unlockBlock[sponsor] != 0) revert DepositNotLocked();
if (balances[sponsor] < ethMaxCost) {
// Apps need to pay
if (sponsor != targetContract) {
if (sponsor != userOp.sender) {
revert DepositTooLow();
}
// Wallets get automatically funded by kinto core app
// Wallets get automfunded by kinto core app
sponsor = appRegistry.getApp(address(walletFactory));

Check warning on line 355 in src/paymasters/SponsorPaymaster.sol

View check run for this annotation

Codecov / codecov/patch

src/paymasters/SponsorPaymaster.sol#L355

Added line #L355 was not covered by tests
}
return (abi.encode(sponsor, userOp.sender, userOp.maxFeePerGas, userOp.maxPriorityFeePerGas), 0);
Expand Down

0 comments on commit 8860441

Please sign in to comment.