Open extra topbar

where is user balance located?

If you are new here, please see some information on how to ask for support. Thank you!

where is user balance located?

dashed-slug.net Forums General discussion where is user balance located?

This topic contains 8 replies, has 2 voices, and was last updated by  alexg 1 month, 3 weeks ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #6325

    dynamitemedia
    Participant

    with this page:
    Bitcoin and Altcoin Wallets user balances

    where are the user balances stored in the database?

    we upgraded our server and now some of the old deposits are showing up in the new database

    We need to go in and fix these. in fact my account alone as the admin shows more coins that are even in the wallet.

    we mainly do transfers and only 3 accounts have actually gotten deposits so its easy to narrow that down. But i cant get rid of these excess coins that i do not even own

    https://prnt.sc/nqorsj

    sorry but the coin info they dont want out in the public if we are having issues

    #6326

    alexg
    Keymaster

    Hello,

    User balances are derived from summing all of a user’s transactions.

    The transactions are attached to WordPress user ids. If you have migrated your site, the ids of the users are probably different now. Clear the new wp_wallets_txs table, then use the export/import feature to migrate the transaction data. The export feature is found in Wallets -> Adapters -> Export, under each adapter. This will create csv files where the users are uniquely identified by their email. The import feature is found in Wallets -> Transactions at the bottom of the page.

    with regards

    #6327

    dynamitemedia
    Participant

    That is what the issue is we already started with a fresh tx table.

    Then two days ago it put into the database over 200k of deposits into accounts, that was already used.

    Now even tho there is not even 5k in the wallet it is showing in my account over 200k in the frontend

    I moved that 200k from the othet admins account so if i try deleting the move it just ends back in his account

    #6328

    dynamitemedia
    Participant

    example

    https://prnt.sc/nr7h7b

    If you have migrated your site, the ids of the users are probably different now.

    We actually moved everything so not different userID’s and that is why we are having this issue

    #6329

    alexg
    Keymaster

    Hello,

    To be clear, the user IDs (not the user names or user logins) can be different if you import them into your new MySQL because the id is an AUTO_INCREMENT column. If you have 100% certain that you have preserved all the IDs then there should be no issue.

    The procedure I described above, with the intermediate CSV files is available so that you do not have to worry about IDs. The plugin normally associates transaction rows in the db with user ids. When the transactions are exported to CSV, the user ids (account column) are replaced with the user emails. Upon import, these are again replaced with the user ids, which can now be different, due to the behavior of AUTO_INCREMENT columns on MySQL.

    I did not understand from your post. Did you perform this exact procedure?

    1. Transfer the full WordPress backup to a new server.

    2. Export the transactions to csv from the old installation, one csv file for each coin.

    3. Clear the transactions table on the new installation (with DELETE or TRUNCATE commands)

    4. Import the CSV file or files to the new installation.

    If you have performed these exact steps and the problem remains, select a user whose balance is not correct and look at their transactions. How do they compare to their transactions on the old installation? Are there more transactions? Less? What’s going on?

    #6343

    dynamitemedia
    Participant

    we moved the whole site over to a dedicated server

    then we deleted ONLY the wallet db NOT the user DB

    after about a week of running it then on sunday it added every deposit ever made back into the database, with the original created date but now updated date of sunday

    now we cant not get these coins off of the site, there is only like 3000 coins in the actually wallet but it is showing over 200K in y account alone. so of course we can not withdraw them

    honestly no i didnt not do what you were talking about cause #1 i was a bit confused and #2 we cant chance these ppl getting deposits etc again because they can withdraw at the Crypto ATM, this could be disastrous

    i just created a dummy account adn moved over the 200k and then deleted that account, hopefully they do not show back up again

    in the future plugin couldn’t it update the user’s user meta or something?

    #6344

    alexg
    Keymaster

    Hello,

    1. You say that you found the procedure above confusing. Out of the four steps, which ones are you having trouble with? I can help clarify. This is the correct procedure.

    2. If you did not perform the above procedure, then what did you do? You say that you cleared the transactions table after migrating the database. This alone would create the problem you describe. You would need to reimport the exported csv files, then enable the new site once you are 100% sure that everything is correct.

    3. I am not sure what user meta you are referring to. There are no user meta involved in this. The data is in the transactions table.

    The plugin periodically rediscovers old deposits. If you have deleted a deposit row, eventually it will get re-discovered, and you might face the same problem again, until you perform the migration as described.

    Please ask me any questions you need in order to understand the migration process. Then you can repeat the steps and I’m sure it will work.

    with regards

    #6351

    dynamitemedia
    Participant

    user meta as in the WordPress user info

    i didn’t do it because i assumed that the csv file would not work. i thought that because i had already deleted the DB a week + ago. and i was guessing that the info i was reloading was the same exact as before

    we did not delete any more of the deposits and i think we are good now.

    i just sent the coins to a ghost user and then deleted him. now it is not showing the 200K plus in my account.

    if ever a issue in the future we will try this method but for now it is working

    #6353

    alexg
    Keymaster

    Again, if you did not delete ANY deposits, then you should be OK.

    But if you deleted even one deposit, this one will be replayed eventually. In that case, it’s better to complete the migration now, before any users perform transactions and the data becomes out of sync.

    This is an issue that is common always with data migration projects. You want the snapshot you take to be of one instant in time. With careful planning you can avoid any downtime. Only enable the new site to your users once you are certain that the data is migrated correctly. You will not be able to easily perform the procedure afterwards because the user data will have diverged.

    with regards

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.