Skip to content

Commit

Permalink
chore: cap gas when force transfering funds back to user account
Browse files Browse the repository at this point in the history
  • Loading branch information
xenoliss committed Mar 12, 2024
1 parent 2f28bb2 commit 567630f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MagicSpend.sol
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ contract MagicSpend is Ownable, IPaymaster {
// Send the all remaining funds to the user accout.
delete withdrawableFunds[account];
if (withdrawable > 0) {
SafeTransferLib.forceSafeTransferETH(account, withdrawable, gasleft());
SafeTransferLib.forceSafeTransferETH(account, withdrawable, SafeTransferLib.GAS_STIPEND_NO_STORAGE_WRITES);
}
}

Expand Down

0 comments on commit 567630f

Please sign in to comment.