CoinRoster / slotmachine

fruitgame
0 stars 0 forks source link

admin page #41

Closed RiskingTime closed 6 years ago

RiskingTime commented 6 years ago

admin_page_available

balances showing as "confirmed balance" on the admin page look like "available balances", this page should show all the addresses that have bitcoins on them

Patrick-Bay commented 6 years ago

I will confirm further but I believe that the balances being shown here are the confirmed balances, not the available ones. Both of the values from the screenshot above match a confirmed balance for each account at a previous point in time and the current admin interface appears to reflect this as well.

What may be occurring, however, is that the account value may not be refreshed to its most current confirmed balance and it may not be a good idea to force a refresh on all of the accounts listed (we could probably do individual ones, however).

I'll investigate and if I discover that I'm not correct I will provide an estimate on fixing this display value.

RiskingTime commented 6 years ago

We need to approach the balances shown on the admin page differently from the numbers in our database. I would like the numbers to be shown on the admin page table to be derived from the current balances of those addresses ON THE BLOCKCHAIN. this way, we can compare the amounts we actually have to the numbers we have in our database. I think also the cash register account should be shown in the admin page table

RiskingTime commented 6 years ago

the admin page will serve as one way we can "audit" the system balances by comparing the amounts in our database to the amounts we have on the blockchain

Patrick-Bay commented 6 years ago

I've confirmed that the value being shown on the admin page is the btc_balance_verified field from the accounts table. This field represents the on-blockchain (confirmed/verified) balance for the account but, as I mentioned, we don't always keep this information synchronized in order to minimize BlockCypher API usage. We will need to discuss a solution in further detail.

RiskingTime commented 6 years ago

admin_page_james

here is some additional illustration that hopefully shows what I'm trying to describe

RiskingTime commented 6 years ago

the cold storage and cash register addresses in this list will be provided by me. This table should be useful like a bank balance sheet, as the bitcoins in our control are our assets, but our liabilities are the amounts our database says are available to users as their in-game and investment balances.

Patrick-Bay commented 6 years ago

Thanks for clearing up this issue for me earlier. To recap our phone conversation, the values shown here should come from blockchain API calls that are initiated by the browser, as opposed to using our server as an intermediary. However, we also want to include information from our database to see how much the on-blockchain values and our database values diverge -- this could be an indicator of how many users deposited Bitcoin without ever using any functionality that requires its confirmation (investments or withdrawals).

We will want to display these differences beneath the table -- do we also want to include both the live blockchain balance and our database balance as separate columns?

We may be able to send multiple requests to the API in a single go but for the time being I think we should assume that we'll need some sort of progress reporting on the client (browser), to indicate how many accounts have been checked on the blockchain. We will also need some sort of error reporting since some of this functionality will be handled exclusively on the client side.

I would estimate that this update would take about 4 hours to implement based on this description.

RiskingTime commented 6 years ago

ok, let's discuss this further before proceeding, focus on dividend payments first

RiskingTime commented 6 years ago

I'm not sure we are on the same "page", I'll further describe what my admin page objectives are...