Commit Graph

6 Commits

Author SHA1 Message Date
SomberNight
afb245c17d scripts: fix regression in quick_start.py
```
$ ./electrum/scripts/quick_start.py
Traceback (most recent call last):
  File "/home/user/wspace/electrum/./electrum/scripts/quick_start.py", line 32, in <module>
    wallet.start_network(network)
  File "/home/user/wspace/electrum/electrum/wallet.py", line 620, in start_network
    assert self.network is None, "already started"
AssertionError: already started
```
just the sanity check added in 6ac3f84095
2024-02-08 23:44:08 +00:00
Sander van Grieken
7ca9b735d5 daemon: refactor load_wallet to not just return None, but raise specific exceptions.
The following exceptions should be expected:
FileNotFoundError: given wallet path does not exist
StorageReadWriteError: given file is not readable/writable or containing folder is not writable
InvalidPassword: wallet requires a password but no password or an invalid password was given
WalletFileException: any internal wallet data issue. specific subclasses can be caught separately:
-  WalletRequiresSplit: wallet needs splitting (split_data passed in Exception)
-  WalletRequiresUpgrade: wallet needs upgrade, and no upgrade=True was passed to load_wallet
-  WalletUnfinished: wallet file contains an action and needs additional information to finalize. (WalletDB passed in exception)

Removed qml/qewalletdb.py

This patch also fixes load_wallet calls in electrum/scripts and adds a qml workaround for dialogs opening and closing so
fast that the dialog opened==true property change is missed (which we need to manage the dialog/page stack)
2023-10-10 17:42:07 +02:00
SomberNight
42da407ee1 scripts: update quick_start.py to work with 4.0.x internals
fixes #6453
2020-08-25 16:22:59 +02:00
SomberNight
04edad9984 config: no longer singleton. it is passed to Wallet.__init__
The few other cases that used SimpleConfig.get_instance() now
either get passed a config instance, or they try to get a reference
to something else that has a reference to a config.
(see lnsweep, qt/qrcodewidget, qt/qrtextedit)
2019-09-22 20:46:01 +02:00
SomberNight
7b9047d8d6 scripts: simplify quick_start 2019-02-28 20:26:30 +01:00
SomberNight
92bf409bf0 scripts: add "quick_start" to showcase some basic functionality 2019-02-15 21:14:08 +01:00