diff --git a/electrum/gui/kivy/main_window.py b/electrum/gui/kivy/main_window.py index a0368fa3d..9f36cc01f 100644 --- a/electrum/gui/kivy/main_window.py +++ b/electrum/gui/kivy/main_window.py @@ -381,6 +381,7 @@ class ElectrumWindow(App, Logger): self.daemon = self.gui_object.daemon self.fx = self.daemon.fx self.use_rbf = config.get('use_rbf', True) + self.android_backups = config.get('android_backups', False) self.use_unconfirmed = not config.get('confirmed_only', False) # create triggers so as to minimize updating a max of 2 times a sec @@ -1244,7 +1245,12 @@ class ElectrumWindow(App, Logger): request_permissions([Permission.WRITE_EXTERNAL_STORAGE], cb) def _save_backup(self): - new_path = self.wallet.save_backup() + try: + new_path = self.wallet.save_backup() + except Exception as e: + self.logger.exception("Failed to save wallet backup") + self.show_error("Failed to save wallet backup" + '\n' + str(e)) + return if new_path: self.show_info(_("Backup saved:") + f"\n{new_path}") else: diff --git a/electrum/gui/kivy/uix/ui_screens/status.kv b/electrum/gui/kivy/uix/ui_screens/status.kv index 12c9634f8..41f75b7a8 100644 --- a/electrum/gui/kivy/uix/ui_screens/status.kv +++ b/electrum/gui/kivy/uix/ui_screens/status.kv @@ -81,7 +81,8 @@ Popup: Button: size_hint: 0.5, None height: '48dp' - text: _('Save Backup') + text: _('Export Backup') + disabled: not app.android_backups on_release: root.dismiss() app.save_backup()