CoinRoster / slotmachine

fruitgame
0 stars 0 forks source link

Add "Balance" column to Transaction History on My Account page #25

Closed Patrick-Bay closed 6 years ago

Patrick-Bay commented 6 years ago

Add extra "Balance" column and add balance information, where applicable.

Patrick-Bay commented 6 years ago

After some investigation I estimate that this enhancement will take approximately 3 hours.

We aren't currently storing the user's balance as part of the game information in the database and cross-referencing against the account transactions may not be 100% reliable.

The solution would is to update the RPC_getGameResults and RPC_selectResults functions in game_server.js to store the user's resultant (post-calculation) balance information, in Bitcoin, in the "games" tables.

After this the RPC_getAccountTransactions may need to be looked at to ensure that it's picking up the new information.

Finally, the "html/common/account.js" and "html/common/stats.js" client-side libraries will need to be updated to handle the new values.

RiskingTime commented 6 years ago

ok please proceed, and let me know when its complete to test

Patrick-Bay commented 6 years ago

The new balance column was added with the following commit: https://github.com/CoinRoster/slotmachine/commit/8442410453b3a5304955b8d9ebf2c0a4d140ad31

The code has been updated on the server and the server restarted so that changes are available for review at myfruitgame.com now.

A couple of changes were required to address this including some server-side changes to include the user balance with all of the known transaction types.