Skip to content

Commit

Permalink
Quick refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Artjom Galaktionov committed Oct 25, 2023
1 parent c3db10e commit 1f214f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contracts/finance/Vesting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,13 @@ abstract contract VestingWallet is Initializable {
}

function totalAllocation() public view virtual returns (uint256) {
return address(this).balance + totalReleased();
return totalAllocation(ETH);

Check warning on line 121 in contracts/finance/Vesting.sol

View check run for this annotation

Codecov / codecov/patch

contracts/finance/Vesting.sol#L120-L121

Added lines #L120 - L121 were not covered by tests
}

function totalAllocation(address token_) public view virtual returns (uint256) {
return IERC20(token_).balanceOf(address(this)) + totalReleased(token_);
return

Check warning on line 125 in contracts/finance/Vesting.sol

View check run for this annotation

Codecov / codecov/patch

contracts/finance/Vesting.sol#L124-L125

Added lines #L124 - L125 were not covered by tests
(token_ == ETH ? address(this).balance : IERC20(token_).balanceOf(address(this))) +
totalReleased(token_);
}

function totalReleased() public view virtual returns (uint256) {
Expand Down

0 comments on commit 1f214f1

Please sign in to comment.