Open XaviP opened 7 years ago
Initial commit wallet app: https://github.com/FreedomCoop/valuenetwork/commit/29449692a9561bb4c421c6c0f45b73f3e352497b Two notes:
Related to this issue, working in faircoin decoupling in branch new_faircoin_app, with this main goals:
This way, all related to faircoin will be in a separated app. https://github.com/FreedomCoop/valuenetwork/tree/new_faircoin_app
The branch new_faircoin_app is ready to test in testocp. The wallet is working ok, but to test further than faircoin_account and faircoin_history pages is needed, as I don't really know the implications inside valueaccounting and work apps that these movements of code have. Another change done: valueaccounting/faircoin_utils.py is merged into faircoin/utils.py, and all imports in valueaccountig and work apps are changed to point there. Edit: merged into master and deployed in production.
Transfering specific faircoin stuff from valueaccounting/models.py to faircoin/models.py: https://github.com/FreedomCoop/valuenetwork/blob/faircoin_models/faircoin/models.py It's not working yet, it's only a draft.
@bhaugen @fosterlynn @bum2 , can you take a look? Am I missing something? Do you catch my purpose? Do you agree?
Edit: The ultimate goal of all this would be that valueaccountig and work apps interact with a common interface to make currency movements, through gateways for the faircoin wallet, for chipchap api, for freecoin api, etc.. That is, the @escanda last proposals, draft in wallet app branch with an object factory: https://github.com/FreedomCoop/valuenetwork/blob/wallet_app/wallet/__init__.py
I took a look. I think I catch the purpose: FaircoinAddress is oneToOne with EconomicResource, which is where faircoin addresses have been held before. So it is factoring out all the faircoin-specific behaviors from the valueaccounting app, and then you will be able to add more behaviors for different currencies behind other gateways.
FaircoinTransaction does the same for EconomicEvent.
Is that what you had in mind?
I didn't see any corresponding changes in https://github.com/FreedomCoop/valuenetwork/blob/faircoin_models/valuenetwork/valueaccounting/models.py though. Are those yet to come?
The first part makes sense to me, if the corresponding changes in valueaccounting and work apps are smooth enough.
Is that what you had in mind?
Yes.
I didn't see any corresponding changes in https://github.com/FreedomCoop/valuenetwork/blob/faircoin_models/valuenetwork/valueaccounting/models.py though. Are those yet to come?
Yes, when everything goes fine, I'll erase the fields/functions from valueaccounting
The first part makes sense to me, if the corresponding changes in valueaccounting and work apps are smooth enough.
Yes, I'll try that smoothness :-)
I'll erase the fields/functions from valueaccounting
Won't you need to add some new functions (or redo some of those that exist), at least for EconomicAgent? (But I'll wait and see what comes next.)
Hey, too complex, so I'm going to work in two fases:
Find a secure way to migrate db data from valueaccounting app tables to faircoin app new tables in testocp and production dbs.
Data migrations might work.
Trying to find a doable road map. A (very schematic and simple) proposal:
(Edit: point 1 is done, merged and deployed)