Commit c1c9ac54 authored by Quoc Huy Nguyen Dinh's avatar Quoc Huy Nguyen Dinh
Browse files

- Added vesting_reward_percent into the mockdata

- Use vesting_reward_percent instead of hardcoding its value
parent af84c357
......@@ -30,6 +30,8 @@ module.exports = {
current_reserve_ratio: 200000000,
average_block_size: 15136,
max_virtual_bandwidth: '264241152000000000000',
vesting_reward_percent: 1500,
// @TODO: add other extended fields from https://github.com/steemit/steem/pull/3484/commits/47dc797f59be23a9db8493958748956b8b73750a
},
tag_idx: {
trending: [
......
......@@ -37,6 +37,8 @@ module.exports = {
current_reserve_ratio: 200000000,
average_block_size: 15410,
max_virtual_bandwidth: '264241152000000000000',
vesting_reward_percent: 1500,
// @TODO: add other extended fields from https://github.com/steemit/steem/pull/3484/commits/47dc797f59be23a9db8493958748956b8b73750a
},
current_route: '/',
};
......@@ -108,11 +108,17 @@ class UserWallet extends React.Component {
}
// Now lets calculate the "APR"
const vestingRewardPercent = gprops.vesting_reward_percent / 10000;
const virtualSupply = gprops.virtual_supply.split(' ').shift();
const totalVestingFunds = gprops.total_vesting_fund_steem
.split(' ')
.shift();
return virtualSupply * currentInflationRate * 0.15 / totalVestingFunds;
return (
virtualSupply *
currentInflationRate *
vestingRewardPercent /
totalVestingFunds
);
};
render() {
......
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