Skip to content

Commit cf63564

Browse files
committed
tweaks to vesting.
Signed-off-by: antonnell <antonnell.crypto@gmail.com>
1 parent 49e2c34 commit cf63564

File tree

5 files changed

+31
-13
lines changed

5 files changed

+31
-13
lines changed

components/ffCurveGauge/ffCurveGauge.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export default function ffCurveGauge({ asset }) {
361361
disabled={ depositLoading || !depositApprovalNotRequired }
362362
onClick={ onDeposit }
363363
>
364-
<Typography className={ classes.actionButtonText }>{ depositLoading ? `Depositing` : `Deposit` }</Typography>
364+
<Typography className={ classes.actionButtonText }>{ depositLoading ? `Staking` : `Stake` }</Typography>
365365
{ depositLoading && <CircularProgress size={10} className={ classes.loadingCircle } /> }
366366
</Button>
367367
</div>
@@ -377,7 +377,7 @@ export default function ffCurveGauge({ asset }) {
377377
disabled={ depositLoading }
378378
onClick={ onWithdraw }
379379
>
380-
<Typography className={ classes.actionButtonText }>{ depositLoading ? `Withdrawing` : `Withdraw` }</Typography>
380+
<Typography className={ classes.actionButtonText }>{ depositLoading ? `Unstaking` : `Unstake` }</Typography>
381381
{ depositLoading && <CircularProgress size={10} className={ classes.loadingCircle } /> }
382382
</Button>
383383
</div>

components/ffVest/ffVest.module.css

+14-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
.vestPeriodToggle {
5959
background: none;
6060
font-size: 12px !important;
61-
margin-top: 10px;
6261
transform: scale(0.84);
6362
opacity: 0.6;
6463
}
@@ -258,6 +257,20 @@
258257
height: 130px;
259258
}
260259

260+
.inline {
261+
display: flex;
262+
align-items: center;
263+
margin-top: 10px;
264+
}
265+
266+
.expiresIn {
267+
background: none;
268+
269+
-webkit-transform: scale(0.84);
270+
transform: scale(0.84);
271+
opacity: 0.6;
272+
}
273+
261274
@media screen and (max-width: 1200px) {
262275
.container {
263276
top: 180px;

components/ffVest/lockDuration.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function ffLockDuration({ ibff, veIBFF, veIBFFOld }) {
3737
}, []);
3838

3939
useEffect(() => {
40-
if(veIBFF.vestingInfo.lockEnds) {
40+
if(veIBFF && veIBFF.vestingInfo && veIBFF.vestingInfo.lockEnds) {
4141
setSelectedDate(moment.unix(veIBFF.vestingInfo.lockEnds).format('YYYY-MM-DD'))
4242
setSelectedValue(null)
4343
}
@@ -67,7 +67,7 @@ export default function ffLockDuration({ ibff, veIBFF, veIBFFOld }) {
6767
break;
6868
default:
6969
}
70-
const newDate = moment.unix(veIBFF.vestingInfo.lockEnds).add(days, 'days').format('YYYY-MM-DD');
70+
const newDate = moment().add(days, 'days').format('YYYY-MM-DD');
7171

7272
setSelectedDate(newDate);
7373
}
@@ -98,12 +98,15 @@ export default function ffLockDuration({ ibff, veIBFF, veIBFFOld }) {
9898
shrink: true,
9999
}}
100100
/>
101-
<RadioGroup className={classes.vestPeriodToggle} row aria-label="position" name="position" onChange={handleChange} value={selectedValue}>
102-
<FormControlLabel value="week" control={<Radio color="primary" />} label="1 week" labelPlacement="left" />
103-
<FormControlLabel value="month" control={<Radio color="primary" />} label="1 month" labelPlacement="left" />
104-
<FormControlLabel value="year" control={<Radio color="primary" />} label="1 year" labelPlacement="left" />
105-
<FormControlLabel value="years" control={<Radio color="primary" />} label="4 years" labelPlacement="left" />
106-
</RadioGroup>
101+
<div className={ classes.inline }>
102+
<Typography className={ classes.expiresIn }>Expires in </Typography>
103+
<RadioGroup className={classes.vestPeriodToggle} row aria-label="position" name="position" onChange={handleChange} value={selectedValue}>
104+
<FormControlLabel value="week" control={<Radio color="primary" />} label="1 week" labelPlacement="left" />
105+
<FormControlLabel value="month" control={<Radio color="primary" />} label="1 month" labelPlacement="left" />
106+
<FormControlLabel value="year" control={<Radio color="primary" />} label="1 year" labelPlacement="left" />
107+
<FormControlLabel value="years" control={<Radio color="primary" />} label="4 years" labelPlacement="left" />
108+
</RadioGroup>
109+
</div>
107110
</div>
108111
</div>
109112
</Grid>

components/navigation/navigation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ function Navigation(props) {
512512
</Grid>
513513
</Grid>
514514
</div>
515-
<Typography className={classes.smallVersion}>Version 0.7.0</Typography>
515+
<Typography className={classes.smallVersion}>Version 0.7.1</Typography>
516516
{ warningOpen &&
517517
<FFWarning close={ closeWarning } />
518518
}

stores/fixedForexStore.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,9 @@ class Store {
12211221
const veIBFFContract = new web3.eth.Contract(abis.veIBFFABI, FF_VEKP3R_ADDRESS)
12221222
const lockedInfo = await veIBFFContract.methods.locked(account.address).call()
12231223
const totalSupply = await veIBFFContract.methods.totalSupply().call()
1224-
const balanceOf = await veIBFFContract.methods.balanceOf().call(account)
1224+
const balanceOf = await veIBFFContract.methods.balanceOf(account.address).call()
1225+
1226+
console.log(balanceOf)
12251227

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

0 commit comments

Comments
 (0)