From 567630f006513264d9beef59202d75f2e5bc3c99 Mon Sep 17 00:00:00 2001 From: Baptiste Oueriagli Date: Tue, 12 Mar 2024 08:46:50 +0000 Subject: [PATCH] chore: cap gas when force transfering funds back to user account --- src/MagicSpend.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MagicSpend.sol b/src/MagicSpend.sol index 924545f..adc4663 100644 --- a/src/MagicSpend.sol +++ b/src/MagicSpend.sol @@ -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); } }