blink icon indicating copy to clipboard operation
blink copied to clipboard

store date of wallet creation (USD)

Open pierreberthet opened this issue 3 years ago • 6 comments

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_at field to wallet collection (so that it is specific to each wallet, USD, BTC, ...)
  • For the BTC wallets: fill in new created_at field in wallets collection with the created_at field in the users collection
  • Set created_at to null for users who already have a USD wallet (we will change it to first USD transaction then on our side)

pierreberthet avatar Sep 01 '22 14:09 pierreberthet

will mostly be relevant when the API to add new wallet is available

nicolasburtey avatar Sep 18 '23 13:09 nicolasburtey

@nicolasburtey Can I work on this? Could u assign me this issue?

vr-varad avatar Mar 11 '24 10:03 vr-varad

Go ahead @vr-varad

nicolasburtey avatar Mar 11 '24 12:03 nicolasburtey

@nicolasburtey Just for confirmation, is @galoy/core/api/src/app/wallets the place i should be working on?

vr-varad avatar Mar 12 '24 12:03 vr-varad

any idea @nicolasburtey it would be very helpful.

vr-varad avatar Mar 14 '24 20:03 vr-varad

Hello @nicolasburtey, That looks like quick changes, I opened a PR for it at https://github.com/GaloyMoney/galoy/pull/4270

Freedisch avatar Apr 09 '24 09:04 Freedisch