Browse Source

kivy: fix tx dialog message

master
ThomasV 8 years ago
parent
commit
2b5117ab3d
  1. 8
      gui/kivy/uix/dialogs/tx_dialog.py

8
gui/kivy/uix/dialogs/tx_dialog.py

@ -20,6 +20,7 @@ Builder.load_string('''
can_rbf: False can_rbf: False
fee_str: '' fee_str: ''
date_str: '' date_str: ''
date_label:''
amount_str: '' amount_str: ''
tx_hash: '' tx_hash: ''
status_str: '' status_str: ''
@ -46,7 +47,7 @@ Builder.load_string('''
text: _('Description') if root.description else '' text: _('Description') if root.description else ''
value: root.description value: root.description
BoxLabel: BoxLabel:
text: _('Date') if root.date_str else '' text: root.date_label
value: root.date_str value: root.date_str
BoxLabel: BoxLabel:
text: _('Amount sent') if root.is_mine else _('Amount received') text: _('Amount sent') if root.is_mine else _('Amount received')
@ -110,10 +111,13 @@ class TxDialog(Factory.Popup):
tx_hash, self.status_str, self.description, self.can_broadcast, self.can_rbf, amount, fee, height, conf, timestamp, exp_n = self.wallet.get_tx_info(self.tx) tx_hash, self.status_str, self.description, self.can_broadcast, self.can_rbf, amount, fee, height, conf, timestamp, exp_n = self.wallet.get_tx_info(self.tx)
self.tx_hash = tx_hash or '' self.tx_hash = tx_hash or ''
if timestamp: if timestamp:
self.date_label = _('Date')
self.date_str = datetime.fromtimestamp(timestamp).isoformat(' ')[:-3] self.date_str = datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
elif exp_n: elif exp_n:
self.date_str = _('Within {} blocks').format(exp_n) if exp_n > 0 else _('unknown (low fee)') self.date_label = _('Mempool depth')
self.date_str = _('{} from tip').format('%.2f MB'%(exp_n/1000000))
else: else:
self.date_label = ''
self.date_str = '' self.date_str = ''
if amount is None: if amount is None:

Loading…
Cancel
Save