Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contracts/finance/VestingWallet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ contract VestingWallet is Context, Ownable {
* an asset given its total historical allocation.
*/
function _vestingSchedule(uint256 totalAllocation, uint64 timestamp) internal view virtual returns (uint256) {
if (timestamp < start()) {
if (timestamp < _start) {
return 0;
} else if (timestamp >= end()) {
} else if (timestamp >= _start + _duration) {
return totalAllocation;
} else {
return (totalAllocation * (timestamp - start())) / duration();
return (totalAllocation * (timestamp - _start)) / _duration;
}
}
}
Loading