Open AloeareV opened 6 months ago
If we add the ability to get a transaction record's fee, that could be worth saving as an optional value to avoid needing to re-fetch every time we reload the wallet.
If we add the ability to get a transaction record's fee, that could be worth saving as an optional value to avoid needing to re-fetch every time we reload the wallet.
it is actually only currently possible to calculate the fee from OutgoingTxData which isnt mandatory data. I propose we calculate the fee by summing each pools value balance (therefore fetching any Txs for the value of the transparent inputs) during sync and storing this in a fee field of transaction record in the wallet file, when we bump to a new wallet version.
Originally posted by @zancas in https://github.com/zingolabs/zingolib/pull/992#pullrequestreview-2021431681
This needs a serialization version increment to align, (and handling for if we somehow read a None), which is fiddly and we likely don't have time for before zip317.
This would be a good place to keep track of anything else that necessitates a version bump, in case we can do multiple changes at once and make the versioning simpler.