This is another contribution to busy.org. The fix was simple, but the investigation to get to the fix took time and trial and error.
1. The Issue
From the bug report:
Busy says my payout will release 2 hours ago.
From this message, I can't know whether it is already paid or not paid yet.
Actually, it is not paid yet. It will be paid in 7 hours.
2. The Solution
There was only 1 file changed:
src/client/vendor/steemitHelpers.js
2.1. src/client/vendor/steemitHelpers.js
- Appended
'.000Z'tocashoutInTime
3. Investigation
Initially, the solution I thought that could fix the bug was to to provide explicitly a value for the option now of intl.formatRelative() API.
However, after further investigation, it seems that the fix would take a lot of fixes:
- Where will the
nowvalue be instantiated? - How will the value of
nowbe passed?
Which eventually led me to steemitHelpers.js.
To arrive at the solution, I had to provide additional codes of printing out of values of cashoutInTime and add values of the calculation of the current time:
And had to modify steemitHellpers.js like these:
These two changes gave me these:
4. Demonstration
Here's a demo of the fix showing the payout schedule from the feed, full-story post, and then comparing it with the actual payout schedule displayed in steemit.com:
Feed Payout Sched
Full Story Payout Sched
Steemit Payout Sched
Posted on Utopian.io - Rewarding Open Source Contributors