Rename a pure-bitcoin-cash based method naming to no longer
have the word 'price' in it since that is associated with conversion
to another money or currency.
For mined transactions we now use the historical fiat price of BCH
instead of the current.
This will give us a much more stable and historically accurate view of
our transactions.
Fixes: #7
This replaces the simple version with a proper averaging implementation
that takes all the price measurements and returns a single value per
day which is the average of all the measured ones.
When you open a pin-to-pay wallet AND within the timeout (200s) convert
it into a pin-to-open wallet AND you open it again, you might get
surprised to see it close automatically after some timeout.
Well, got to love testers to find this well hidden critter.
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.
This finally fixes the odd case where a default wallet that is fully
encrypted did not show any transactions directly after the user typed
the password.
Turns out this is some weird cornercase in Qt/QML and removing some
code fixes this.
The downside; we now show a qml warning on startup. 🤷
For a payment-request we now remember if its been stored-to-disk so when
it gets removed again before we ever store it, we skip forcing an
unneeded save.
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.