From 5d18cad01058bd0f88ed99c924e9334ed6350ee9 Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Mon, 7 Oct 2024 18:37:31 +0300 Subject: [PATCH] carbon vortex - minor fix --- contracts/vortex/CarbonVortex.sol | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/contracts/vortex/CarbonVortex.sol b/contracts/vortex/CarbonVortex.sol index c061a3a..379216a 100644 --- a/contracts/vortex/CarbonVortex.sol +++ b/contracts/vortex/CarbonVortex.sol @@ -1033,16 +1033,14 @@ contract CarbonVortex is ICarbonVortex, Upgradeable, ReentrancyGuardUpgradeable, } function _transferProceeds(Token token, uint256 amount) private { + // increment totalCollected amount + _totalCollected += amount; // if transfer address is 0, proceeds stay in the vortex if (_transferAddress == address(0)) { - // increment totalCollected amount - _totalCollected += amount; return; } // safe due to nonReentrant modifier (forwards all available gas in case of ETH) token.unsafeTransfer(_transferAddress, amount); - // increment totalCollected amount - _totalCollected += amount; } function uncheckedInc(uint256 i) private pure returns (uint256 j) {