mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 09:45:18 +00:00
fee rounding: num sats displayed in dialog too, besides tooltip
This commit is contained in:
parent
f5d557cae9
commit
5095687d63
1 changed files with 9 additions and 7 deletions
|
@ -1012,6 +1012,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
if self.qr_window and self.qr_window.isVisible():
|
if self.qr_window and self.qr_window.isVisible():
|
||||||
self.qr_window.set_content(addr, amount, message, uri)
|
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):
|
def create_send_tab(self):
|
||||||
# A 4-column grid layout. All the stretch is in the last column.
|
# A 4-column grid layout. All the stretch is in the last column.
|
||||||
# The exchange rate plugin adds a fiat widget in column 2
|
# 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))
|
self.fee_e.editingFinished.connect(partial(on_fee_or_feerate, self.fee_e, True))
|
||||||
|
|
||||||
def feerounding_onclick():
|
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' +
|
_('At most 100 satoshis might be lost due to this rounding.') + '\n' +
|
||||||
_('Also, dust is not kept as change, but added to the fee.'))
|
_('Also, dust is not kept as change, but added to the fee.'))
|
||||||
QMessageBox.information(self, 'Fee rounding', text)
|
QMessageBox.information(self, 'Fee rounding', text)
|
||||||
|
@ -1330,12 +1335,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
|
|
||||||
# show/hide fee rounding icon
|
# show/hide fee rounding icon
|
||||||
feerounding = (fee - displayed_fee) if fee else 0
|
feerounding = (fee - displayed_fee) if fee else 0
|
||||||
if feerounding:
|
self.set_feerounding_text(feerounding)
|
||||||
self.feerounding_icon.setToolTip(
|
self.feerounding_icon.setToolTip(self.feerounding_text)
|
||||||
_('additional {} satoshis will be added').format(feerounding))
|
self.feerounding_icon.setVisible(bool(feerounding))
|
||||||
self.feerounding_icon.setVisible(True)
|
|
||||||
else:
|
|
||||||
self.feerounding_icon.setVisible(False)
|
|
||||||
|
|
||||||
if self.is_max:
|
if self.is_max:
|
||||||
amount = tx.output_value()
|
amount = tx.output_value()
|
||||||
|
|
Loading…
Add table
Reference in a new issue