From 49b7a7518c8baee74757aef1dbad637dd2ab266d Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Thu, 10 Mar 2022 12:48:17 +0100 Subject: [PATCH] upgrade wallet automatically when needed --- electrum/gui/qml/components/OpenWallet.qml | 25 ++++------------------ 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/electrum/gui/qml/components/OpenWallet.qml b/electrum/gui/qml/components/OpenWallet.qml index 47f2ade94..04dbb838d 100644 --- a/electrum/gui/qml/components/OpenWallet.qml +++ b/electrum/gui/qml/components/OpenWallet.qml @@ -85,27 +85,6 @@ Pane { text: qsTr('Split wallet') onClicked: wallet_db.doSplit() } - - Label { - text: qsTr('Wallet requires upgrade') - visible: wallet_db.requiresUpgrade - } - - Button { - visible: wallet_db.requiresUpgrade - text: qsTr('Upgrade') - onClicked: wallet_db.doUpgrade() - } - - Rectangle { - Layout.columnSpan: 2 - Layout.alignment: Qt.AlignHCenter - visible: wallet_db.upgrading - width: 100 - height: 100 - color: "red" - } - } WalletDB { @@ -116,6 +95,10 @@ Pane { Daemon.availableWallets.reload() app.stack.pop() } + onRequiresUpgradeChanged: { + if (requiresUpgrade) + wallet_db.doUpgrade() + } onReadyChanged: { if (ready) { Daemon.load_wallet(Daemon.path, password.text)