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)
This commit is contained in:
@@ -25,7 +25,6 @@ from .qedaemon import QEDaemon
|
||||
from .qenetwork import QENetwork
|
||||
from .qewallet import QEWallet
|
||||
from .qeqr import QEQRParser, QEQRImageProvider, QEQRImageProviderHelper
|
||||
from .qewalletdb import QEWalletDB
|
||||
from .qebitcoin import QEBitcoin
|
||||
from .qefx import QEFX
|
||||
from .qetxfinalizer import QETxFinalizer, QETxRbfFeeBumper, QETxCpfpFeeBumper, QETxCanceller
|
||||
@@ -332,7 +331,6 @@ class ElectrumQmlApplication(QGuiApplication):
|
||||
ElectrumQmlApplication._daemon = daemon
|
||||
|
||||
qmlRegisterType(QEWallet, 'org.electrum', 1, 0, 'Wallet')
|
||||
qmlRegisterType(QEWalletDB, 'org.electrum', 1, 0, 'WalletDB')
|
||||
qmlRegisterType(QEBitcoin, 'org.electrum', 1, 0, 'Bitcoin')
|
||||
qmlRegisterType(QEQRParser, 'org.electrum', 1, 0, 'QRParser')
|
||||
qmlRegisterType(QEFX, 'org.electrum', 1, 0, 'FX')
|
||||
|
||||
Reference in New Issue
Block a user