Browse Source

Use keyword arguments for format_amount call clarity (#4290)

3.2.x
Ben Woosley 7 years ago
committed by ghost43
parent
commit
d7750c73e6
  1. 2
      gui/qt/history_list.py
  2. 4
      gui/qt/main_window.py
  3. 2
      gui/qt/transaction_dialog.py

2
gui/qt/history_list.py

@ -239,7 +239,7 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
status, status_str = self.wallet.get_tx_status(tx_hash, height, conf, timestamp)
has_invoice = self.wallet.invoices.paid.get(tx_hash)
icon = self.icon_cache.get(":icons/" + TX_ICONS[status])
v_str = self.parent.format_amount(value, True, whitespaces=True)
v_str = self.parent.format_amount(value, is_diff=True, whitespaces=True)
balance_str = self.parent.format_amount(balance, whitespaces=True)
entry = ['', tx_hash, status_str, label, v_str, balance_str]
fiat_value = None

4
gui/qt/main_window.py

@ -725,9 +725,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
c, u, x = self.wallet.get_balance()
text = _("Balance" ) + ": %s "%(self.format_amount_and_units(c))
if u:
text += " [%s unconfirmed]"%(self.format_amount(u, True).strip())
text += " [%s unconfirmed]"%(self.format_amount(u, is_diff=True).strip())
if x:
text += " [%s unmatured]"%(self.format_amount(x, True).strip())
text += " [%s unmatured]"%(self.format_amount(x, is_diff=True).strip())
# append fiat balance and price
if self.fx.is_enabled():

2
gui/qt/transaction_dialog.py

@ -273,7 +273,7 @@ class TxDialog(QDialog, MessageBoxMixin):
return ext
def format_amount(amt):
return self.main_window.format_amount(amt, whitespaces = True)
return self.main_window.format_amount(amt, whitespaces=True)
i_text = QTextEdit()
i_text.setFont(QFont(MONOSPACE_FONT))

Loading…
Cancel
Save