dashed-slug.net › Forums › TurtleCoin Adapter extension support › Repair a missing withdrawal TXID › Reply To: Repair a missing withdrawal TXID
If you submit a withdrawal request via the JSON-API or PHP-API, then a new withdrawal row will be entered in the DB in an unconfirmed
state. The cron job will then progress it to a pending
state. If the adapter is unlocked and if the hot wallet has enough unlocked funds, and if the available user balance is sufficient, then the withdrawal will be executed by a cron job. It will get the done
or failed
state.
Why do you need to enter to the DB a withdrawal that has already occurred?
If a withdrawal has already occurred on your hot wallet, independently from the plugin, this cannot be safely mapped to a user balance. This is because only the plugin knows how much balance a user has, and what portion of it is not locked into exchange orders or other pending transactions. Primarily due to the internal transfers and exchange trades features, you cannot expect a user’s balance to correspond to a particular blockchain address.
The only deposits and withdrawals that should occur on your hot wallet besides user transactions are the cold storage transactions. That is, you can safely do transactions to control the percentage of online reserves, and these are not reflected in the DB. Do not do any other transactions with the wallet attached to the plugin.
It sounds like you are trying to hack the db in a way that will result in lost funds.
Please describe in more detail what you are trying to do and I will be able to provide guidance on whether what you are doing is safe and whether there is a better way.