Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ety001 committed Nov 9, 2023
1 parent 2b6c2a5 commit 57d13ba
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/BlockReward.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ export default {
witnessReward2 /= wso.witness_pay_normalization_factor;
let newSbd = 0;
const baseFeed = feed.current_median_history.base.split(' '); // SBD
const quoteFeed = feed.current_median_history.quote.split(' '); // STEEM
if (spsFund) {
const baseF = feed.current_median_history.base.split(' '); // SBD
// const quoteF = feed.current_median_history.quote.split(' '); // STEEM
newSbd = spsFund * baseF[0];
newSbd = spsFund * baseFeed[0];
// Transfer to STEEM_TREASURY_ACCOUNT of newSbd
console.log(`transfer to ${STEEM_TREASURY_ACCOUNT} ${newSbd} SBD.`);
}
Expand All @@ -106,11 +106,13 @@ export default {
const newSteem2 = contentReward2 + vestingReward + witnessReward2;
// current_median_price
const currentMedianPrice = feed.current_median_history.base.split(' ')[0] / feed.current_median_history.quote(' ')[0];
const currentMedianPrice = baseFeed[0] / quoteFeed[0];
const currentSupply = dgp.current_supply.split(' ');
const currentSbdSupply = dgp.current_sbd_supply.split(' ');
// Percent SBD
const tmpCurrentSbdSupplyAsSteemUnit = dgp.current_sbd_supply.split(' ')[0] / currentMedianPrice;
const percentSbd = tmpCurrentSbdSupplyAsSteemUnit / (dgp.current_supply.split(' ')[0] + tmpCurrentSbdSupplyAsSteemUnit);
const tmpCurrentSbdSupplyAsSteemUnit = currentSbdSupply[0] / currentMedianPrice;
const percentSbd = tmpCurrentSbdSupplyAsSteemUnit / (currentSupply[0] + tmpCurrentSbdSupplyAsSteemUnit);
// Display the data
this.data = [
Expand Down

0 comments on commit 57d13ba

Please sign in to comment.