From ac5fa13f92b5c3cd5f6fe029f27bf409d9bb05f6 Mon Sep 17 00:00:00 2001 From: Sara Reynolds <30504811+snreynolds@users.noreply.github.com> Date: Wed, 9 Nov 2022 19:31:28 -0500 Subject: [PATCH] use saved val (#121) --- src/AllowanceTransfer.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AllowanceTransfer.sol b/src/AllowanceTransfer.sol index 803ea8b7..5b4a6e3c 100644 --- a/src/AllowanceTransfer.sol +++ b/src/AllowanceTransfer.sol @@ -84,7 +84,7 @@ contract AllowanceTransfer is IAllowanceTransfer, EIP712 { revert InsufficientAllowance(); } else { unchecked { - allowed.amount -= amount; + allowed.amount = uint160(maxAmount) - amount; } } }