mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 02:07:10 +03:00
getting vote power from dhive and scaling with 100
This commit is contained in:
parent
e85ab5be22
commit
9fafbdaf25
@ -1,10 +1,11 @@
|
|||||||
import parseToken from './parseToken';
|
import parseToken from './parseToken';
|
||||||
import { GlobalProps } from '../redux/reducers/accountReducer';
|
import { GlobalProps } from '../redux/reducers/accountReducer';
|
||||||
|
import { votingPower } from '../providers/hive/dhive';
|
||||||
|
|
||||||
export const getEstimatedAmount = (account, globalProps:GlobalProps, sliderValue:number = 1) => {
|
export const getEstimatedAmount = (account, globalProps:GlobalProps, sliderValue:number = 1) => {
|
||||||
|
|
||||||
const { fundRecentClaims, fundRewardBalance, base, quote } = globalProps;
|
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 vestingShares = parseToken(account.vesting_shares);
|
||||||
const receievedVestingShares = parseToken(account.received_vesting_shares);
|
const receievedVestingShares = parseToken(account.received_vesting_shares);
|
||||||
const delegatedVestingShared = parseToken(account.delegated_vesting_shares);
|
const delegatedVestingShared = parseToken(account.delegated_vesting_shares);
|
||||||
|
Loading…
Reference in New Issue
Block a user