diff --git a/electrum/gui/qml/components/OpenWalletDialog.qml b/electrum/gui/qml/components/OpenWalletDialog.qml index b9922c42c..13ff9c784 100644 --- a/electrum/gui/qml/components/OpenWalletDialog.qml +++ b/electrum/gui/qml/components/OpenWalletDialog.qml @@ -74,20 +74,6 @@ ElDialog { color: constants.colorError font.pixelSize: constants.fontSizeLarge } - - Label { - Layout.alignment: Qt.AlignHCenter - visible: wallet_db.requiresSplit - text: qsTr('Wallet requires splitting') - font.pixelSize: constants.fontSizeLarge - } - - FlatButton { - Layout.alignment: Qt.AlignHCenter - visible: wallet_db.requiresSplit - text: qsTr('Split wallet') - onClicked: wallet_db.doSplit() - } } FlatButton { @@ -113,11 +99,6 @@ ElDialog { WalletDB { id: wallet_db path: openwalletdialog.path - onSplitFinished: { - // if wallet needed splitting, we close the pane and refresh the wallet list - Daemon.availableWallets.reload() - openwalletdialog.close() - } onReadyChanged: { if (ready) { Daemon.loadWallet(openwalletdialog.path, password.text) diff --git a/electrum/gui/qml/qewalletdb.py b/electrum/gui/qml/qewalletdb.py index 4475a6c70..bbf91c3e3 100644 --- a/electrum/gui/qml/qewalletdb.py +++ b/electrum/gui/qml/qewalletdb.py @@ -1,16 +1,13 @@ -import os from typing import TYPE_CHECKING from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject from electrum.i18n import _ from electrum.logging import get_logger -from electrum.storage import WalletStorage, StorageEncryptionVersion +from electrum.storage import WalletStorage from electrum.wallet_db import WalletDB from electrum.wallet import Wallet -from electrum.bip32 import normalize_bip32_derivation, xpub_type from electrum.util import InvalidPassword, WalletFileException, send_exception_to_crash_reporter -from electrum import keystore if TYPE_CHECKING: from electrum.simple_config import SimpleConfig @@ -26,8 +23,6 @@ class QEWalletDB(QObject): needsHWDeviceChanged = pyqtSignal() passwordChanged = pyqtSignal() validPasswordChanged = pyqtSignal() - requiresSplitChanged = pyqtSignal() - splitFinished = pyqtSignal() readyChanged = pyqtSignal() invalidPassword = pyqtSignal() @@ -45,7 +40,6 @@ class QEWalletDB(QObject): self._needsPassword = False self._needsHWDevice = False self._password = '' - self._requiresSplit = False self._validPassword = True self._storage = None @@ -101,10 +95,6 @@ class QEWalletDB(QObject): self._password = wallet_password self.passwordChanged.emit() - @pyqtProperty(bool, notify=requiresSplitChanged) - def requiresSplit(self): - return self._requiresSplit - @pyqtProperty(bool, notify=validPasswordChanged) def validPassword(self): return self._validPassword @@ -132,16 +122,6 @@ class QEWalletDB(QObject): if e.should_report_crash: send_exception_to_crash_reporter(e) - @pyqtSlot() - def doSplit(self): - self._logger.warning('doSplit') - if not self._requiresSplit: - return - - self._db.split_accounts(self._path) - - self.splitFinished.emit() - def _load_storage(self): """can raise WalletFileException""" self._storage = WalletStorage(self._path) @@ -185,9 +165,7 @@ class QEWalletDB(QObject): self._db = WalletDB(self._storage.read(), storage=self._storage, manual_upgrades=True) if self._db.requires_split(): self._logger.warning('wallet requires split') - self._requiresSplit = True - self.requiresSplitChanged.emit() - return + raise WalletFileException(_('This wallet needs splitting. This is not supported on mobile')) if self._db.get_action(): self._logger.warning('action pending. QML version doesn\'t support continuation of wizard') raise WalletFileException(_('This wallet has an action pending. This is currently not supported on mobile'))