Closed djpnewton closed 2 years ago
making the assumption that i need to run the migrations/582a80fd3fda_balance_update_table.py script. But when i do im getting the error:
ModuleNotFoundError: No module named 'alembic'
no it runs the script when you do ./flask-cli.sh db upgrade
but be aware that this will eliminate all your deposit/withdrawal history if you do it because I have not written a data migrator
I am wondering if I should add a 'fee' column to the balance_update
table.
When we create a withdrawal we create a withdrawal record (balance_update
) with an amount
but we actually deduct amount + fee
from the account. if a withdrawal is cancelled (confirmation times out or user cancels) then we refund the amount
back to the users balance but we forget that the fee that we deducted also!
If there is a fee
colum to the balance_update
table then it is easy to refund the amount + fee
when cancelling a withdrawal but also we can show the users the historical fees they paid too which will make their balance make more sense
Ok I added the fee column and fixed the withdrawal cancel/refund amount
getting the following when trying to do the balance withdrawal according to admin:
so its including fee for 5 sats? but the actual status is still "CREATED" it never completes. Using HTLC.me, its not receiving what I'm withdrawing. confirmed one of them and it looks like that changes to "completed"
waiitng for the other one to timeout.
getting the following when trying to do the balance withdrawal according to admin:
so its including fee for 5 sats? but the actual status is still "CREATED" it never completes. Using HTLC.me, its not receiving what I'm withdrawing. confirmed one of them and it looks like that changes to "completed"
waiitng for the other one to timeout.
Are you using the link emailed to confirm it?
Balance Before:
Sending 995 sats and waiting for the 30 minute time out and see if the balance goes back to 1000995 sats or only returns 995 sats.
new balance: after sending(without confirming)
so when it gets cancelled, it should still be 1000995 sats.
looks like its returned the sats (including the fees) when its cancelled:
The idea of this PR is basically to remove the tables
FiatWithdrawal, FiatDeposit, CryptoWithdrawal, CryptoDeposit
and replace them with a single table calledBalanceUpdate
.The point of this is to hopefully simplify
models.py
and then simplify the other modules (likedepwith.py, api_endpoint.py, admin.py
that currently need to do 4 similar things instead of just having one generic interfaceI am still not 100% sure this is a good idea but I think it probably is.
Migrating the actually data would be difficult and I think that maybe if we land this before launching we could just delete the limited deposit/withdraw history on
be.bitforge.me