electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit d7750c73e605fafcbc0a19d7a21480f6df996d15
parent d0352379d7f5c5aac2cfb63ec383603538860c93
Author: Ben Woosley <Ben.Woosley@gmail.com>
Date:   Mon, 23 Apr 2018 12:17:29 -0400

Use keyword arguments for format_amount call clarity (#4290)


Diffstat:
Mgui/qt/history_list.py | 2+-
Mgui/qt/main_window.py | 4++--
Mgui/qt/transaction_dialog.py | 2+-
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gui/qt/history_list.py b/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 diff --git a/gui/qt/main_window.py b/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(): diff --git a/gui/qt/transaction_dialog.py b/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))