Commit Graph

9 Commits

Author SHA1 Message Date
tomFlowee fff90de695 Fixlets and simplification in unit unit test
This reflects that we no longer have a 3-state but that a wallet is
either open or closed.
2022-07-21 14:21:31 +02:00
tomFlowee e1cb6d3c40 Make connection between payment request & wallet more robust
As they have a pointer to each other we have to be a bit smart about how
removing works and how deletion works. Because otherwise we'll end up
with calling a deleted object.
2022-07-21 13:10:44 +02:00
tomFlowee aede168236 Fixes in saving / encryption. 2022-07-14 17:45:09 +02:00
tomFlowee 6e4aa0065e Switch to the string type for saving mnemonics
This solves a recently introduced debt.
2022-07-14 17:03:00 +02:00
tomFlowee d4658564ff Use secure allocator for mnemonic
This ensures that we not swap out this value.
2022-07-14 15:28:23 +02:00
tomFlowee e0fe6fe532 Fix missing emit.
Now the balances and 'last transaction' fields are updated on decrypt.
2022-07-14 10:52:43 +02:00
tomFlowee 0c9136be3b Refactor wallet encryption
This stops re-loading of the wallet-data on decrypt but instead keeps
the encrypted data in memory next to the (possibly) decrypted data.

This then means we can save a wallet that has its secrets still
encrypted (no password supplied) which is needed in order to propery
support the concept of xpub.

So, now a HD wallet that is closed can correctly sync and create new
public keys (which are needed to sync), including the step of saving
those to disk.
The first time the user provides a password we'll then create the
matching private keys (and their encrypted counterparts) which will then
be saved, and naturally can be used to sign transactions.
2022-07-13 13:54:29 +02:00
tomFlowee 90252a4e1a Allow HD wallet to sync while encrypted
This allows an encrypted HD wallet to sync using merkleblock p2p
messages by using the xpub instead while the private keys are
unavailable.
2022-07-11 22:11:01 +02:00
tomFlowee 27af984f5b Split off encryption methods to its own file.
This avoids Wallet.cpp to become too huge and groups stuff to
make it easier to find.
2022-07-11 19:23:30 +02:00