Browse Source

for unconfirmed transactions, show fee sent by server

283
ThomasV 9 years ago
parent
commit
bdb4958a34
  1. 4
      gui/kivy/uix/dialogs/tx_dialog.py
  2. 6
      gui/qt/transaction_dialog.py

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

@ -104,6 +104,7 @@ class TxDialog(Factory.Popup):
self.update()
def update(self):
is_relevant, is_mine, v, fee = self.wallet.get_wallet_delta(self.tx)
self.can_broadcast = False
if self.tx.is_complete():
self.tx_hash = self.tx.hash()
@ -115,6 +116,8 @@ class TxDialog(Factory.Popup):
self.date_str = datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
else:
self.status_str = _('Unconfirmed')
if fee is None:
fee = self.wallet.tx_fees.get(tx_hash)
else:
self.can_broadcast = self.app.network is not None
self.status_str = _('Signed')
@ -122,7 +125,6 @@ class TxDialog(Factory.Popup):
s, r = self.tx.signature_count()
self.status_str = _("Unsigned") if s == 0 else _('Partially signed') + ' (%d/%d)'%(s,r)
is_relevant, is_mine, v, fee = self.wallet.get_wallet_delta(self.tx)
self.is_mine = is_mine
if is_relevant:
if is_mine:

6
gui/qt/transaction_dialog.py

@ -177,12 +177,12 @@ class TxDialog(QDialog, MessageBoxMixin):
def update(self):
is_relevant, is_mine, v, fee = self.wallet.get_wallet_delta(self.tx)
tx_hash = self.tx.hash()
desc = self.desc
time_str = None
self.broadcast_button.hide()
if self.tx.is_complete():
tx_hash = self.tx.hash()
if tx_hash in self.wallet.transactions.keys():
desc = self.wallet.get_label(tx_hash)
height, conf, timestamp = self.wallet.get_tx_height(tx_hash)
@ -194,6 +194,8 @@ class TxDialog(QDialog, MessageBoxMixin):
status = _('Not verified')
else:
status = _('Unconfirmed')
if fee is None:
fee = self.wallet.tx_fees.get(tx_hash)
else:
status = _("Signed")
self.broadcast_button.show()
@ -242,8 +244,6 @@ class TxDialog(QDialog, MessageBoxMixin):
else:
amount_str = _("Transaction unrelated to your wallet")
if fee is None:
fee = self.wallet.tx_fees.get(tx_hash)
fee_str = _("Transaction fee") + ': %s'% (format_amount(fee) + ' ' + base_unit if fee is not None else _('unknown'))
self.amount_label.setText(amount_str)

Loading…
Cancel
Save