commit 5095687d634cb512b88ffa4be94516e0b45cd689
parent f5d557cae9ec13daebfe1879ed0c1c01b7eaee7d
Author: SomberNight <somber.night@protonmail.com>
Date: Tue, 6 Feb 2018 18:48:36 +0100
fee rounding: num sats displayed in dialog too, besides tooltip
Diffstat:
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -1012,6 +1012,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
if self.qr_window and self.qr_window.isVisible():
self.qr_window.set_content(addr, amount, message, uri)
+ def set_feerounding_text(self, num_satoshis_added):
+ self.feerounding_text = (_('Additional {} satoshis are going to be added.')
+ .format(num_satoshis_added))
+
def create_send_tab(self):
# A 4-column grid layout. All the stretch is in the last column.
# The exchange rate plugin adds a fiat widget in column 2
@@ -1130,7 +1134,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.fee_e.editingFinished.connect(partial(on_fee_or_feerate, self.fee_e, True))
def feerounding_onclick():
- text = (_('To somewhat protect your privacy, Electrum tries to create change with similar precision to other outputs.') + ' ' +
+ text = (self.feerounding_text + '\n\n' +
+ _('To somewhat protect your privacy, Electrum tries to create change with similar precision to other outputs.') + ' ' +
_('At most 100 satoshis might be lost due to this rounding.') + '\n' +
_('Also, dust is not kept as change, but added to the fee.'))
QMessageBox.information(self, 'Fee rounding', text)
@@ -1330,12 +1335,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
# show/hide fee rounding icon
feerounding = (fee - displayed_fee) if fee else 0
- if feerounding:
- self.feerounding_icon.setToolTip(
- _('additional {} satoshis will be added').format(feerounding))
- self.feerounding_icon.setVisible(True)
- else:
- self.feerounding_icon.setVisible(False)
+ self.set_feerounding_text(feerounding)
+ self.feerounding_icon.setToolTip(self.feerounding_text)
+ self.feerounding_icon.setVisible(bool(feerounding))
if self.is_max:
amount = tx.output_value()