Browse Source

add shortcut for vestedAmount after vesting end

Francisco Giordano 8 years ago
parent
commit
00f323d132
1 changed files with 2 additions and 0 deletions
  1. 2 0
      contracts/token/TokenVesting.sol

+ 2 - 0
contracts/token/TokenVesting.sol

@@ -70,6 +70,8 @@ contract TokenVesting is Ownable {
   function vestedAmount(ERC20Basic token) constant returns (uint256) {
     if (now < cliff) {
       return 0;
+    } else if (now >= end) {
+      return token.balanceOf(this);
     } else {
       uint256 currentBalance = token.balanceOf(this);
       uint256 totalBalance = currentBalance.add(released[token]);