Wallet3: should parse/store staking data
jagerman opened this issue · 0 comments
Wallet2 doesn't properly parse staking information off the blockchain. As a consequence, if you restore a wallet, we can identify it as a staking transaction, but we can't extract the staking details (such as the staked amount, staked SN, etc.). The info is all there in the tx extra (since wallet2 created it in the first place), but wallet2 doesn't appear to load it when syncing from the blockchain.
As a consequence, restored wallets cannot reliably show staked amounts because both txes in a staking transaction get lumped together into "change" when parsed, which is quite useless for identifying staking details.
E.g. if you stake 100, and have to spend a 1000 output to do it, you might have:
- out1: 100, staked
- out2: 899.98715, change
but all wallet2 exposes is:
- amount: 0
- change: 999.98715
- fee: 0.01285
which effectively prohibits mobile/desktop wallets from showing a stake properly.
(If the transfer is in the cache we can show it, because it's in wallet2's tx-info store, but that isn't available when restoring).