eSteem Surfer - powerdown information with the correct effective SP, search to eSteem toggle, etc.
Note: Regarding comment and coding style, as an external contributor, I followed the PO's practice. Comments were rarely used in the original code, so I only made a comment when it's really needed. In addition, I wrote the details in commit/issue/PR.
Note2: My recent dev post couldn't be voted due to the limited VP. As I mentioned in my suggestion post, Utopian bot sorting criteria improvement to prevent no voting, external contributors definitely have disadvantages in the dev category. Hope the review will be more generous, considering this :) Also, please increase 14 day window soon. It's too short for external contributors gather decent commits due to irregular and infrequent merges by POs. (note: eSteem team is quite fast! Thanks a lot!)
New Feature + Bug Fix
Powerdown information + correct effective SP
- Show the powerdown amount in the SP section
Previously, eSteem Surfer didn't show the powerdown amount in the Steem Power section, and had a wrong effective SP (in terms of voting value) amount due to this.
before: powerdown amount wasn't excluded in the effective SP
after: powerdown amount is separately shown and excluded from the effective SP
after (sanity check for no powerdown user)
Two usual mistakes in the effective SP calculation
- Doesn't exclude powerdown amount (already explained in the above)
- Doesn't take 14th week power down into account
That is, powerdown can actually takes 14 weeks, and the "powerdown amount"
vesting_withdraw_rateis the still same, so if you don't consider this case, the effective SP can go negative. That's why you need,
minfunction to avoid this situation.
// min needed due to 14th week powerdown: https://github.com/steemit/steem/issues/3237 const vestingSharesWithdrawal = Math.min( parseToken(account.vesting_withdraw_rate), (parseToken(account.to_withdraw) - parseToken(account.withdrawn)) / 100000 );
Search to eSteem toggle
Previously, once search something, toggle back to esteem mode was impossible, which was quite annoying if you want to go to someone's blog. Now toggle is supported back and forth.
Fix build instruction
While this wasn't merged due to the eSteem team's another implementation plan, I suggested the search improvement
Help debugging for voting time problem
Not just in this issue, but in general I genuinely tried my best to help the team.