September 5, 2018 at 7:53 am #4269
I am not sure how my Dogecoin currently sits at a negative balance.
Upon checking, I found out that my users traded with one another & withdrawn right after. But am still not sure how a negative balance could be displayed?
Perhaps when a user requests for a withdraw, his/her balance is still shown on the wallet and they are able to trade with it? It would be nice to have a ‘pending balance’ feature so that when a user requests a withdrawal, his balance is transferred to the ‘pending’ section.
Attached are some screenshots showing the negative balance & the trades.September 5, 2018 at 7:57 am #4272
Thank you I will investigate.
It does not matter if the balance is displayed negative, the balance is checked again on the server side before any withdrawal. Additionally the tables are locked during each operation so that it is not possible to have race conditions.
Could you please post again the second attachment? It was deleted (my mistake)
thanksSeptember 5, 2018 at 8:00 am #4274
sure. Here it is. So it seems like these 2 users traded DOGE & then have withdrawn them right after.September 5, 2018 at 8:08 am #4277
OK since this is such a serious error I would ask that you help me investigate. Please do the following:
1. Find out the numeric WordPress IDs for these two users. Let’s say the IDs are
2. Enter the following two queries into your SQL console and email me the result:
SELECT category,amount,fee,status,account FROM wp_wallets_txs WHERE account IN (111,222) and symbol='DOGE';
SELECT * FROM wp_wallets_orders WHERE account in (111,222) and quote_symbol='DOGE';
Please keep in mind that the exchange is still in beta.
Looking forward to your reply.
thank youSeptember 5, 2018 at 8:33 am #4278September 5, 2018 at 8:36 am #4283
Are you using the latest version of the CoinPayments adapter? The latest version is
1.0.7.September 5, 2018 at 8:48 am #4284
Hey Alex, yes it is 1.0.7September 5, 2018 at 9:43 am #4285
I have an explanation. It does not seem like this is an issue with the exchange.
1.0.7of the CoinPayments adapter, the deposit fees that the platform incurs are saved into the deposit transaction records. These fees are taken into account since the latest version
3.6.4of the parent plugin.
3.6.4was released on the 28th of August. On the 1st of September your user #7 did a withdrawal that was their balance plus the deposit fees (49 DOGE) that were not subtracted from their balance. If you had not applied the latest version
3.6.4.at that time, it would explain the problem. It would also mean that this will not happen again.
My apologies for the trouble.
Is it possible that you had not yet applied version
3.6.4of the parent plugin on the 1st of September?September 6, 2018 at 1:37 am #4296
Yes that explains it… thank you.
So how can I reset this negative balance?September 10, 2018 at 12:56 pm #4369
You could reset the balances to 0 but it would have to be done manually.
You see, the negative balance in this case is correct, i.e. there are 50 DOGE missing from this user’s account due to the bug not being fixed at the time when the user did their withdrawal.
One way would be to set the fees of all deposits before that time to zero. This is how you would do it from your MySQL console, assuming your DB prefix is
1. Backup your database
2. Assuming that you upgraded to
3.6.4on the 2nd of September, execute this:
UPDATE wp_wallets_txs SET fee = 0 WHERE category='deposit' AND created_time <= '2018-09-02';
This would force all of the deposits before that date to not have any fees.
Hope this helps. Again, my apologies for the mistake on my part.
Let me know if you have any further questions about this.
- You must be logged in to reply to this topic.