From c8ea5b6173e4b2dd7a0fe42acf98798b47ce890c Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 2 Jun 2025 11:47:24 +0200 Subject: [PATCH] Third-party plugins: expand warning message Remove lightning is experimental warning --- electrum/gui/messages.py | 18 ++++++++++++------ electrum/gui/qt/plugins_dialog.py | 15 +++------------ 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/electrum/gui/messages.py b/electrum/gui/messages.py index af5a13fa5..10a85461b 100644 --- a/electrum/gui/messages.py +++ b/electrum/gui/messages.py @@ -20,15 +20,21 @@ To prevent fund losses, please save this backup on another device. It may be imported in another Electrum wallet with the same seed.""" ) -MSG_LIGHTNING_EXPERIMENTAL_WARNING = _( -"""Lightning support in Electrum is experimental. Do not put large amounts in lightning channels.""" -) - -MSG_LIGHTNING_SCB_WARNING = _( +MSG_LIGHTNING_WARNING = _( """Electrum uses static channel backups. If you lose your wallet file, you will need to request your channel to be force-closed by the remote peer in order to recover your funds. This assumes that the remote peer is reachable, and has not lost its own data.""" ) -MSG_LIGHTNING_WARNING = MSG_LIGHTNING_EXPERIMENTAL_WARNING + "\n\n" + MSG_LIGHTNING_SCB_WARNING +MSG_THIRD_PARTY_PLUGIN_WARNING = ' '.join([ + '' + _('Warning: Thirt-party plugins have access to your wallet!') + '', + '

', + _('Installing this plugin will grant third-party software access to your wallet. You must trust the plugin not to be malicious.'), + _('You should at minimum check who the author of the plugin is, and be careful of imposters.'), + '

', + _('Third-party plugins are not endorsed by Electrum.'), + _('Electrum will not be responsible in case of theft, loss of funds or privacy that might result from third-party plugins.'), + '

', + _('To install this plugin, please enter your plugin authorization password') + ':' +]) MSG_CONFLICTING_BACKUP_INSTANCE = _( """Another instance of this wallet (same seed) has an open channel with the same remote node. If you create this channel, you will not be able to use both wallets at the same time. diff --git a/electrum/gui/qt/plugins_dialog.py b/electrum/gui/qt/plugins_dialog.py index b29466d22..553768869 100644 --- a/electrum/gui/qt/plugins_dialog.py +++ b/electrum/gui/qt/plugins_dialog.py @@ -8,6 +8,7 @@ from PyQt6.QtWidgets import QLabel, QVBoxLayout, QGridLayout, QPushButton, QWidg from PyQt6.QtCore import QTimer from electrum.i18n import _ +from electrum.gui import messages from electrum.logging import get_logger from .util import (WindowModalDialog, Buttons, CloseButton, WWLabel, insert_spaces, MessageBoxMixin, @@ -77,7 +78,7 @@ class PluginDialog(WindowModalDialog): remove_button.setText(_('Remove')) buttons.insert(0, remove_button) if not is_authorized: - auth_button = QPushButton('Authorize') + auth_button = QPushButton('Install') auth_button.clicked.connect(self.do_authorize) buttons.insert(0, auth_button) else: @@ -178,17 +179,7 @@ class PluginsDialog(WindowModalDialog, MessageBoxMixin): self.init_plugins_password() return None # ask for url and password, same window - pw = self.password_dialog( - msg=' '.join([ - _('Warning: Third-party plugins are not endorsed by Electrum!'), - '

', - _('If you install a third-party plugin, you trust the software not to be malicious.'), - _('Electrum will not be responsible in case of theft, loss of funds or privacy that might result from third-party plugins.'), - _('You should at minimum check who the author of the plugin is, and be careful of imposters.'), - '

', - _('Please enter your plugin authorization password') + ':' - ]) - ) + pw = self.password_dialog(msg=messages.MSG_THIRD_PARTY_PLUGIN_WARNING) if not pw: return None privkey = self.plugins.derive_privkey(pw, salt)