blink
blink copied to clipboard
store date of wallet creation (USD)
Description
It appears that there are no kept records of the creation date of a wallet (BTC or USD). As the BTC wallet is created at the same time as the user account (we believe), it is trivial to get this info for that wallet. However, we do not know when a user got access to the USD/stablesats feature, and thus when its USD wallet was created. Furthermore, if more currencies / saving accounts or else are later offered, it would be great to know when a user got access to it/those.
Right now, a good proxy is to use the date of the first USD transaction. It would however be valuable to know the lag between the enabling of the stablesats feature on a wallet and the first USD transaction. We think it would be interesting to know what impact enabling the USD wallet has on users' activity, for that we need to know when they had access to it.
Proposed solution
- add a
created_atfield to wallet collection (so that it is specific to each wallet, USD, BTC, ...) - For the BTC wallets: fill in new
created_atfield in wallets collection with thecreated_atfield in the users collection - Set
created_attonullfor users who already have a USD wallet (we will change it to first USD transaction then on our side)
will mostly be relevant when the API to add new wallet is available
@nicolasburtey Can I work on this? Could u assign me this issue?
Go ahead @vr-varad
@nicolasburtey Just for confirmation, is @galoy/core/api/src/app/wallets the place i should be working on?
any idea @nicolasburtey it would be very helpful.
Hello @nicolasburtey, That looks like quick changes, I opened a PR for it at https://github.com/GaloyMoney/galoy/pull/4270