Skip to content

Commit

Permalink
Fix follower payout
Browse files Browse the repository at this point in the history
  • Loading branch information
stoodkev committed Oct 12, 2018
1 parent e467463 commit ee9ed9f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "SteemPlus",
"description": "Lightweight toolbox for Steemit",
"version": "3.3",
"version": "3.3.0.1",
"content_security_policy": "script-src 'self' 'unsafe-eval' https://widget.blocktrades.us/ ; object-src 'self'; child-src 'unsafe-eval' 'self' https://widget.blocktrades.us/",
"browser_action": {
"default_icon": "src/img/logo.png",
Expand Down
9 changes: 4 additions & 5 deletions src/js/followers_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,20 +212,19 @@
if (typeof sp !== 'number') {
return 'Loading...';
}
return type === 'display' ?
window.SteemPlus.Utils.numberWithCommas((sp.toFixed(2)) :
sp;
return type === 'display' ? window.SteemPlus.Utils.numberWithCommas((sp.toFixed(2))) : sp;
}
}, {
// upvote worth
type: 'currency',
orderSequence: ['desc', 'asc' ],
render: function(data, type, row, meta) {
render: function(data, type, row, meta) {
var account = row;
if (!account.loaded) {
return 'Loading...';
}
var dollars = window.SteemPlus.Utils.getVotingDollarsPerAccount(100, account, rewardBalance, recentClaims, steemPrice, votePowerReserveRate, false);
const dollars = window.SteemPlus.Utils.getVotingDollarsPerAccount(100, account, rewardBalance, recentClaims, steemPrice, votePowerReserveRate, false);
console.log(dollars);
if (typeof dollars !== 'number') {
return 'Loading...';
}
Expand Down
12 changes: 6 additions & 6 deletions src/js/witnesses_tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,20 +434,20 @@ function displayMyWitnessTab(usernameTabWitnesses, witnessesRankingList) {
lineNumberWitness++;
if (lineNumberWitness % 2 === 0) classOddEven = 'evenLine';

$(rowMyWitness).append('<div class="col-3 witness-cells ' + classOddEven + '">Weekly Reward</div>');
$(rowMyWitness).append('<div class="col-9 witness-cells ' + classOddEven + '"> ' + steem.formatter.vestToSteem(witnessInfoLocal.lastWeekValue, totalVestsWitnessTab, totalSteemWitnessTab).toFixed(0) + ' SP</div>');
$(rowMyWitness).append('<div class="col-3 witness-cells ' + classOddEven + '">Weekly Rewards</div>');
$(rowMyWitness).append('<div class="col-9 witness-cells ' + classOddEven + '"> ' + window.SteemPlus.Utils.numberWithCommas(steem.formatter.vestToSteem(witnessInfoLocal.lastWeekValue, totalVestsWitnessTab, totalSteemWitnessTab).toFixed(0)) + ' SP</div>');
classOddEven = '';
lineNumberWitness++;
if (lineNumberWitness % 2 === 0) classOddEven = 'evenLine';

$(rowMyWitness).append('<div class="col-3 witness-cells ' + classOddEven + '">Monthly Reward</div>');
$(rowMyWitness).append('<div class="col-9 witness-cells ' + classOddEven + '"> ' + steem.formatter.vestToSteem(witnessInfoLocal.lastMonthValue, totalVestsWitnessTab, totalSteemWitnessTab).toFixed(0) + ' SP</div>');
$(rowMyWitness).append('<div class="col-3 witness-cells ' + classOddEven + '">Monthly Rewards</div>');
$(rowMyWitness).append('<div class="col-9 witness-cells ' + classOddEven + '"> ' + window.SteemPlus.Utils.numberWithCommas(steem.formatter.vestToSteem(witnessInfoLocal.lastMonthValue, totalVestsWitnessTab, totalSteemWitnessTab).toFixed(0)) + ' SP</div>');
classOddEven = '';
lineNumberWitness++;
if (lineNumberWitness % 2 === 0) classOddEven = 'evenLine';

$(rowMyWitness).append('<div class="col-3 witness-cells ' + classOddEven + '">Forever Reward</div>');
$(rowMyWitness).append('<div class="col-9 witness-cells ' + classOddEven + '"> ' + steem.formatter.vestToSteem(witnessInfoLocal.foreverValue, totalVestsWitnessTab, totalSteemWitnessTab).toFixed(0) + ' SP</div>');
$(rowMyWitness).append('<div class="col-3 witness-cells ' + classOddEven + '">Total Rewards</div>');
$(rowMyWitness).append('<div class="col-9 witness-cells ' + classOddEven + '"> ' + window.SteemPlus.Utils.numberWithCommas(steem.formatter.vestToSteem(witnessInfoLocal.foreverValue, totalVestsWitnessTab, totalSteemWitnessTab).toFixed(0)) + ' SP</div>');
classOddEven = '';
lineNumberWitness++;
if (lineNumberWitness % 2 === 0) classOddEven = 'evenLine';
Expand Down
8 changes: 3 additions & 5 deletions vendor/smi/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,9 @@
}

var getVotingDollarsPerAccount = function(voteWeight, account, rewardBalance, recentClaims, steemPrice, votePowerReserveRate, full) {
return new Promise(async function(fulfill,reject){
if (rewardBalance && recentClaims && steemPrice && votePowerReserveRate) {
var effective_vesting_shares = Math.round(getEffectiveVestingSharesPerAccount(account) * 1000000);
var current_power = full ? 10000 : await getVotingPowerPerAccount(account)*100;
var current_power = full ? 10000 : getMana(account).estimated_pct.toFixed(2)*100;
var weight = voteWeight * 100;
var max_vote_denom = votePowerReserveRate * STEEM_VOTE_REGENERATION_SECONDS ;

Expand All @@ -183,10 +182,9 @@
var voteValue = rshares *
rewardBalance / recentClaims *
steemPrice;
fulfill(voteValue);
return voteValue;
}
else reject();
});
else return null;
};


Expand Down

0 comments on commit ee9ed9f

Please sign in to comment.