From 34bfd550233cee940fd5bf18e3aa7649fe79640f Mon Sep 17 00:00:00 2001 From: Alice Henshaw Date: Sun, 4 Aug 2024 23:23:55 +0100 Subject: [PATCH] PR comment --- .forge-snapshots/V4Router_Bytecode.snap | 2 +- src/V4Router.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.forge-snapshots/V4Router_Bytecode.snap b/.forge-snapshots/V4Router_Bytecode.snap index 4aa49e18..cef38079 100644 --- a/.forge-snapshots/V4Router_Bytecode.snap +++ b/.forge-snapshots/V4Router_Bytecode.snap @@ -1 +1 @@ -8441 \ No newline at end of file +8438 \ No newline at end of file diff --git a/src/V4Router.sol b/src/V4Router.sol index 74a9b728..8f32d51d 100644 --- a/src/V4Router.sol +++ b/src/V4Router.sol @@ -62,7 +62,7 @@ abstract contract V4Router is IV4Router, BaseActionsRouter, DeltaResolver { (Currency currency, uint256 minAmount) = params.decodeCurrencyAndUint256(); uint256 amount = _getFullCredit(currency); if (amount < minAmount) revert V4TooLittleReceived(); - _take(currency, msgSender(), _getFullCredit(currency)); + _take(currency, msgSender(), amount); } else if (action == Actions.SETTLE) { (Currency currency, uint256 amount, bool payerIsUser) = params.decodeCurrencyUint256AndBool(); _settle(currency, _mapPayer(payerIsUser), _mapSettleAmount(amount, currency));