getting vote power from dhive and scaling with 100

This commit is contained in:
Nouman Tahir 2022-02-22 10:30:07 +05:00
parent e85ab5be22
commit 9fafbdaf25

View File

@ -1,10 +1,11 @@
import parseToken from './parseToken';
import { GlobalProps } from '../redux/reducers/accountReducer';
import { votingPower } from '../providers/hive/dhive';
export const getEstimatedAmount = (account, globalProps:GlobalProps, sliderValue:number = 1) => {
const { fundRecentClaims, fundRewardBalance, base, quote } = globalProps;
const _votingPower:number = account.voting_power;
const _votingPower:number = votingPower(account) * 100;
const vestingShares = parseToken(account.vesting_shares);
const receievedVestingShares = parseToken(account.received_vesting_shares);
const delegatedVestingShared = parseToken(account.delegated_vesting_shares);