Closed Patrick-Bay closed 6 years ago
This issue will require the investigation of the buildStatsTables
function in the stats page script, as well as the accompanying rpc_getInvestmentStats
function in the investment plugin.
Total work is estimated to take about 2 hours.
ok please proceed
Fix for this issue has been committed (https://github.com/CoinRoster/slotmachine/commit/33cf14690304a69fd145ee38bd64b5503b317fe6), pulled to the development server, and may be tested immediately.
ok, I'll review/test
see the image above, I made two withdrawals from the bankroll, looks like the book value may have updated, but the current value did not?
That seems to be what's happening. I'll have another look in the investment plugin's rpc_updateInvestorInfo
function -- that would be the most likely culprit as that's where deposits and withdrawals are handled.
maybe after straightening out the account level deposits/withdrawals from the bankroll will bring more clarity to the system wide stats page reflection of the bankroll?
The latest update (https://github.com/CoinRoster/slotmachine/commit/aba4ce31acd983a83c8e691e8e827d63d299db4d) for this issue has been pulled to the development server and is currently available for testing.
Please note that I applied the same calculation to the amount subtracted from the base value of the investment https://github.com/CoinRoster/slotmachine/blob/aba4ce31acd983a83c8e691e8e827d63d299db4d/node/investment_plugin.js#L997-L998 as issue #37 -- this made sense to me since the global values should simply be a sum of individual account values. However, if this is incorrect we can simply comment out this section of code to prevent this additional calculation (note that the default action further up in the code is to subtract the whole withdrawal amount which is why this step adds it back in).
ok, I will review
in order to confirm that the current value of investments is correct, we need more visibility and/or a way to cross reference, I'm leaving this issue open until we can do this,
Similarly to the issue #37, the stats page contains incorrect bankroll and global balance values in the investments table.