electrum

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

commit bdb4958a346125fcef07dae8da067df796455674
parent 0843aaafb5ce7a1e460ca6c7cd2b87af5d155750
Author: ThomasV <thomasv@electrum.org>
Date:   Thu,  2 Jun 2016 11:39:18 +0200

for unconfirmed transactions, show fee sent by server

Diffstat:
Mgui/kivy/uix/dialogs/tx_dialog.py | 4+++-
Mgui/qt/transaction_dialog.py | 6+++---
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gui/kivy/uix/dialogs/tx_dialog.py b/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: diff --git a/gui/qt/transaction_dialog.py b/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)