mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 17:55:20 +00:00
Use keyword arguments for format_amount call clarity (#4290)
This commit is contained in:
parent
d0352379d7
commit
d7750c73e6
3 changed files with 4 additions and 4 deletions
|
@ -239,7 +239,7 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
|
||||||
status, status_str = self.wallet.get_tx_status(tx_hash, height, conf, timestamp)
|
status, status_str = self.wallet.get_tx_status(tx_hash, height, conf, timestamp)
|
||||||
has_invoice = self.wallet.invoices.paid.get(tx_hash)
|
has_invoice = self.wallet.invoices.paid.get(tx_hash)
|
||||||
icon = self.icon_cache.get(":icons/" + TX_ICONS[status])
|
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)
|
balance_str = self.parent.format_amount(balance, whitespaces=True)
|
||||||
entry = ['', tx_hash, status_str, label, v_str, balance_str]
|
entry = ['', tx_hash, status_str, label, v_str, balance_str]
|
||||||
fiat_value = None
|
fiat_value = None
|
||||||
|
|
|
@ -725,9 +725,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
c, u, x = self.wallet.get_balance()
|
c, u, x = self.wallet.get_balance()
|
||||||
text = _("Balance" ) + ": %s "%(self.format_amount_and_units(c))
|
text = _("Balance" ) + ": %s "%(self.format_amount_and_units(c))
|
||||||
if u:
|
if u:
|
||||||
text += " [%s unconfirmed]"%(self.format_amount(u, True).strip())
|
text += " [%s unconfirmed]"%(self.format_amount(u, is_diff=True).strip())
|
||||||
if x:
|
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
|
# append fiat balance and price
|
||||||
if self.fx.is_enabled():
|
if self.fx.is_enabled():
|
||||||
|
|
|
@ -273,7 +273,7 @@ class TxDialog(QDialog, MessageBoxMixin):
|
||||||
return ext
|
return ext
|
||||||
|
|
||||||
def format_amount(amt):
|
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 = QTextEdit()
|
||||||
i_text.setFont(QFont(MONOSPACE_FONT))
|
i_text.setFont(QFont(MONOSPACE_FONT))
|
||||||
|
|
Loading…
Add table
Reference in a new issue