Previously if the user disabled FX rates in the settings, the UI
would keep showing the fiat amounts everywhere until the next time
the program was started. (and the rates would not even refresh anymore)
Main motivation is that I often use wallet.remove_transaction
from the Qt console, and would find this behaviour more intuitive.
Note that previously if one were to call this on a tx with children,
the crash reporter would appear with "wallet.get_history() failed balance sanity-check".
related: https://github.com/spesmilo/electrum/issues/6960#issuecomment-764716533
This was a regression from e83f0dd3fc,
introduced by the change in connection_down() there.
(if the initial connection to the main interface is not successful, the
network status will not be set to 'disconnected' - but it should be)
That change is now reverted here.
That change was somewhat independent of the rest of that commit,
except the rest highlighted that something of the sort was needed:
as it might sometimes take many seconds for an interface to close
and we might launch another interface for the same server while the
first one is still closing, the "server == self.default_server" test
is highly problematic.
To fix this second - original - issue, we now introduce a "closing" state
for interfaces (in the form of network._closing_ifaces).
When the app is started, the password is checked against all
wallets in the directory.
If the test passes:
- subsequent wallet creations will use the same password
- subsequent password updates will be performed on all wallets
- wallets that are not storage encrypted will encrypted
on the next password update (even if they are watching-only)
This behaviour is restricted on Android, with a 'single_password' config variable.
Wallet creation without password is disabled if single_password is set