Skip to content

Commit

Permalink
tweaks to vesting.
Browse files Browse the repository at this point in the history
Signed-off-by: antonnell <[email protected]>
  • Loading branch information
antonnell committed Dec 10, 2021
1 parent 49e2c34 commit cf63564
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 13 deletions.
4 changes: 2 additions & 2 deletions components/ffCurveGauge/ffCurveGauge.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export default function ffCurveGauge({ asset }) {
disabled={ depositLoading || !depositApprovalNotRequired }
onClick={ onDeposit }
>
<Typography className={ classes.actionButtonText }>{ depositLoading ? `Depositing` : `Deposit` }</Typography>
<Typography className={ classes.actionButtonText }>{ depositLoading ? `Staking` : `Stake` }</Typography>
{ depositLoading && <CircularProgress size={10} className={ classes.loadingCircle } /> }
</Button>
</div>
Expand All @@ -377,7 +377,7 @@ export default function ffCurveGauge({ asset }) {
disabled={ depositLoading }
onClick={ onWithdraw }
>
<Typography className={ classes.actionButtonText }>{ depositLoading ? `Withdrawing` : `Withdraw` }</Typography>
<Typography className={ classes.actionButtonText }>{ depositLoading ? `Unstaking` : `Unstake` }</Typography>
{ depositLoading && <CircularProgress size={10} className={ classes.loadingCircle } /> }
</Button>
</div>
Expand Down
15 changes: 14 additions & 1 deletion components/ffVest/ffVest.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
.vestPeriodToggle {
background: none;
font-size: 12px !important;
margin-top: 10px;
transform: scale(0.84);
opacity: 0.6;
}
Expand Down Expand Up @@ -258,6 +257,20 @@
height: 130px;
}

.inline {
display: flex;
align-items: center;
margin-top: 10px;
}

.expiresIn {
background: none;

-webkit-transform: scale(0.84);
transform: scale(0.84);
opacity: 0.6;
}

@media screen and (max-width: 1200px) {
.container {
top: 180px;
Expand Down
19 changes: 11 additions & 8 deletions components/ffVest/lockDuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function ffLockDuration({ ibff, veIBFF, veIBFFOld }) {
}, []);

useEffect(() => {
if(veIBFF.vestingInfo.lockEnds) {
if(veIBFF && veIBFF.vestingInfo && veIBFF.vestingInfo.lockEnds) {
setSelectedDate(moment.unix(veIBFF.vestingInfo.lockEnds).format('YYYY-MM-DD'))
setSelectedValue(null)
}
Expand Down Expand Up @@ -67,7 +67,7 @@ export default function ffLockDuration({ ibff, veIBFF, veIBFFOld }) {
break;
default:
}
const newDate = moment.unix(veIBFF.vestingInfo.lockEnds).add(days, 'days').format('YYYY-MM-DD');
const newDate = moment().add(days, 'days').format('YYYY-MM-DD');

setSelectedDate(newDate);
}
Expand Down Expand Up @@ -98,12 +98,15 @@ export default function ffLockDuration({ ibff, veIBFF, veIBFFOld }) {
shrink: true,
}}
/>
<RadioGroup className={classes.vestPeriodToggle} row aria-label="position" name="position" onChange={handleChange} value={selectedValue}>
<FormControlLabel value="week" control={<Radio color="primary" />} label="1 week" labelPlacement="left" />
<FormControlLabel value="month" control={<Radio color="primary" />} label="1 month" labelPlacement="left" />
<FormControlLabel value="year" control={<Radio color="primary" />} label="1 year" labelPlacement="left" />
<FormControlLabel value="years" control={<Radio color="primary" />} label="4 years" labelPlacement="left" />
</RadioGroup>
<div className={ classes.inline }>
<Typography className={ classes.expiresIn }>Expires in </Typography>
<RadioGroup className={classes.vestPeriodToggle} row aria-label="position" name="position" onChange={handleChange} value={selectedValue}>
<FormControlLabel value="week" control={<Radio color="primary" />} label="1 week" labelPlacement="left" />
<FormControlLabel value="month" control={<Radio color="primary" />} label="1 month" labelPlacement="left" />
<FormControlLabel value="year" control={<Radio color="primary" />} label="1 year" labelPlacement="left" />
<FormControlLabel value="years" control={<Radio color="primary" />} label="4 years" labelPlacement="left" />
</RadioGroup>
</div>
</div>
</div>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion components/navigation/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ function Navigation(props) {
</Grid>
</Grid>
</div>
<Typography className={classes.smallVersion}>Version 0.7.0</Typography>
<Typography className={classes.smallVersion}>Version 0.7.1</Typography>
{ warningOpen &&
<FFWarning close={ closeWarning } />
}
Expand Down
4 changes: 3 additions & 1 deletion stores/fixedForexStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,9 @@ class Store {
const veIBFFContract = new web3.eth.Contract(abis.veIBFFABI, FF_VEKP3R_ADDRESS)
const lockedInfo = await veIBFFContract.methods.locked(account.address).call()
const totalSupply = await veIBFFContract.methods.totalSupply().call()
const balanceOf = await veIBFFContract.methods.balanceOf().call(account)
const balanceOf = await veIBFFContract.methods.balanceOf(account.address).call()

console.log(balanceOf)

// const fourYears = 126144000 // 60 * 60 * 24 * 365 * 4
// const now = Math.floor(Date.now() / 1000)
Expand Down

0 comments on commit cf63564

Please sign in to comment.