Skip to content

Commit

Permalink
Update Vesting.sol
Browse files Browse the repository at this point in the history
make a variable in ViewVestingAmount function
  • Loading branch information
jinal2349 authored Mar 25, 2023
1 parent 5c8fe7e commit e9d2297
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Vesting/Vesting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ contract Vesting {
}


function ViewVestingAmount()public view returns (uint){
function ViewVestingAmount( address user )public view returns (uint){
uint tempVer = 0;
for(uint i=1;i<=VestingTime[msg.sender];i++)
for(uint i=1;i<=VestingTime[user];i++)
{
require(deployTimestamp+oneyear<=block.timestamp,"Unable to Withdraw");
if(block.timestamp>=deployTimestamp+(oneyear*i))
{
if(withdrawdetails[msg.sender][i].time==0)
if(withdrawdetails[user][i].time==0)
{
tempVer+=lockingWallet[msg.sender]/VestingTime[msg.sender];
tempVer+=lockingWallet[user]/VestingTime[user];
}
}
else
Expand Down

0 comments on commit e9d2297

Please sign in to comment.