diff --git a/.forge-snapshots/poolManager bytecode size.snap b/.forge-snapshots/poolManager bytecode size.snap index 1a016411b..f5fb5f3e2 100644 --- a/.forge-snapshots/poolManager bytecode size.snap +++ b/.forge-snapshots/poolManager bytecode size.snap @@ -1 +1 @@ -26357 +26366 diff --git a/.forge-snapshots/swap burn 6909 for input.snap b/.forge-snapshots/swap burn 6909 for input.snap index 63568f6d9..d01d55ba4 100644 --- a/.forge-snapshots/swap burn 6909 for input.snap +++ b/.forge-snapshots/swap burn 6909 for input.snap @@ -1 +1 @@ -129161 \ No newline at end of file +129176 \ No newline at end of file diff --git a/src/PoolManager.sol b/src/PoolManager.sol index 5ea1c49fa..2338fe23a 100644 --- a/src/PoolManager.sol +++ b/src/PoolManager.sol @@ -349,10 +349,11 @@ contract PoolManager is IPoolManager, Fees, NoDelegateCall, Claims { function burn(Currency currency, address from, uint256 amount) external override noDelegateCall onlyByLocker { _accountDelta(currency, -(amount.toInt128())); uint256 id = currency.toId(); - if (from != msg.sender && !isOperator[from][msg.sender]) { - uint256 senderAllowance = allowance[from][msg.sender][id]; + address sender = msg.sender; + if (from != sender && !isOperator[from][sender]) { + uint256 senderAllowance = allowance[from][sender][id]; if (senderAllowance != type(uint256).max) { - allowance[from][msg.sender][id] = senderAllowance - amount; + allowance[from][sender][id] = senderAllowance - amount; } } _burn(from, id, amount);