Skip to content

Commit

Permalink
carbon vortex - minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanzhelyazkov committed Oct 7, 2024
1 parent 51d57d3 commit 5d18cad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contracts/vortex/CarbonVortex.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5d18cad

Please sign in to comment.