k00b, how long are you storing wallet transaction data? Lightning invoices and deposit info.
I don't currently have a policy around discarding it.
Who does a good job of this? Are you aware of any custodial wallets that discard tx data? I'd love learn what decisions and tradeoffs they made here.
I suspect storing deposits is fine, given sender privacy is excellent. It definitely makes sense to discard invoices some period after a withdrawal though.
reply
I don't have any good real life examples I can over up with at the moment.
Instead of setting an arbitrary time frame, I wonder if a user clickable button in settings to clear withdrawal database records for that user would work best. Gives the user the option of keeping data or clearing.
I understand if there may be a conditional time frame when you would keep for debugging. Example: Past 30 days is not able to be deleted.
reply
Giving the user the option is a great solution.
The debugging use case is good. Another is if someone gains access to a user's account, steals their funds, then clears the withdrawal invoice history to cover their tracks.
Other than that, I don't think there'd be much in the way of doing this. I'll put up a GH issue.
reply