Merge pull request #3182 from SomberNight/storage_upgrade_manual_for_qt
wallet storage upgrade will now happen silently whenever possible
This commit is contained in:
commit
c4923ac99d
|
@ -192,7 +192,7 @@ class ElectrumGui:
|
||||||
d.exec_()
|
d.exec_()
|
||||||
return
|
return
|
||||||
if not wallet:
|
if not wallet:
|
||||||
storage = WalletStorage(path)
|
storage = WalletStorage(path, manual_upgrades=True)
|
||||||
wizard = InstallWizard(self.config, self.app, self.plugins, storage)
|
wizard = InstallWizard(self.config, self.app, self.plugins, storage)
|
||||||
try:
|
try:
|
||||||
wallet = wizard.run_and_get_wallet()
|
wallet = wizard.run_and_get_wallet()
|
||||||
|
|
|
@ -240,7 +240,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
||||||
path = self.storage.path
|
path = self.storage.path
|
||||||
if self.storage.requires_split():
|
if self.storage.requires_split():
|
||||||
self.hide()
|
self.hide()
|
||||||
msg = _("The wallet '%s' contains multiple accounts, which are no longer supported in Electrum 2.7.\n\n"
|
msg = _("The wallet '%s' contains multiple accounts, which are no longer supported since Electrum 2.7.\n\n"
|
||||||
"Do you want to split your wallet into multiple files?"%path)
|
"Do you want to split your wallet into multiple files?"%path)
|
||||||
if not self.question(msg):
|
if not self.question(msg):
|
||||||
return
|
return
|
||||||
|
@ -252,12 +252,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.storage.requires_upgrade():
|
if self.storage.requires_upgrade():
|
||||||
self.hide()
|
|
||||||
msg = _("The format of your wallet '%s' must be upgraded for Electrum. This change will not be backward compatible"%path)
|
|
||||||
if not self.question(msg):
|
|
||||||
return
|
|
||||||
self.storage.upgrade()
|
self.storage.upgrade()
|
||||||
self.show_warning(_('Your wallet was upgraded successfully'))
|
|
||||||
self.wallet = Wallet(self.storage)
|
self.wallet = Wallet(self.storage)
|
||||||
return self.wallet
|
return self.wallet
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ class Daemon(DaemonThread):
|
||||||
if storage.requires_split():
|
if storage.requires_split():
|
||||||
return
|
return
|
||||||
if storage.requires_upgrade():
|
if storage.requires_upgrade():
|
||||||
storage.upgrade()
|
return
|
||||||
if storage.get_action():
|
if storage.get_action():
|
||||||
return
|
return
|
||||||
wallet = Wallet(storage)
|
wallet = Wallet(storage)
|
||||||
|
|
Loading…
Reference in New Issue