Commit 00f323d1 by Francisco Giordano Committed by Martín Triay

add shortcut for vestedAmount after vesting end

parent 80e591f4
...@@ -70,6 +70,8 @@ contract TokenVesting is Ownable { ...@@ -70,6 +70,8 @@ contract TokenVesting is Ownable {
function vestedAmount(ERC20Basic token) constant returns (uint256) { function vestedAmount(ERC20Basic token) constant returns (uint256) {
if (now < cliff) { if (now < cliff) {
return 0; return 0;
} else if (now >= end) {
return token.balanceOf(this);
} else { } else {
uint256 currentBalance = token.balanceOf(this); uint256 currentBalance = token.balanceOf(this);
uint256 totalBalance = currentBalance.add(released[token]); uint256 totalBalance = currentBalance.add(released[token]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment