tadd label for size in tx window. use base_unit for fee - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 0a8f9d49eac1d538f5b7f374f2b7740956e9c40b (DIR) parent dbf0a6f7a5ed58f13b21232887c4026ed3a58930 (HTM) Author: ThomasV <thomasv@electrum.org> Date: Sat, 17 Dec 2016 17:28:19 +0100 add label for size in tx window. use base_unit for fee Diffstat: M gui/qt/transaction_dialog.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) --- (DIR) diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py t@@ -85,6 +85,8 @@ class TxDialog(QDialog, MessageBoxMixin): vbox.addWidget(self.date_label) self.amount_label = QLabel() vbox.addWidget(self.amount_label) + self.size_label = QLabel() + vbox.addWidget(self.size_label) self.fee_label = QLabel() vbox.addWidget(self.fee_label) t@@ -177,6 +179,7 @@ class TxDialog(QDialog, MessageBoxMixin): base_unit = self.main_window.base_unit() format_amount = self.main_window.format_amount tx_hash, status, label, can_broadcast, can_rbf, amount, fee, height, conf, timestamp, exp_n = self.wallet.get_tx_info(self.tx) + size = self.tx.estimated_size() self.broadcast_button.setEnabled(can_broadcast) self.sign_button.setEnabled(self.wallet.can_sign(self.tx)) self.tx_hash_e.setText(tx_hash or _('Unknown')) t@@ -203,12 +206,13 @@ class TxDialog(QDialog, MessageBoxMixin): amount_str = _("Amount received:") + ' %s'% format_amount(amount) + ' ' + base_unit else: amount_str = _("Amount sent:") + ' %s'% format_amount(-amount) + ' ' + base_unit - fee_str = _("Transaction fee") + ': %s'% (format_amount(fee) + ' ' + base_unit if fee is not None else _('unknown')) + size_str = _("Size:") + ' %d bytes'% size + fee_str = _("Fee") + ': %s'% (format_amount(fee) + ' ' + base_unit if fee is not None else _('unknown')) if fee is not None: - size = self.tx.estimated_size() - fee_str += ' ( %d bytes @ %s ' % (size, format_amount(fee * 1000 / size)) + base_unit + '/kB, %.0d sat/byte )' % (fee/size) + fee_str += ' ( %s )' % (format_amount(fee * 1000 / size) + ' ' + base_unit + '/kB') self.amount_label.setText(amount_str) self.fee_label.setText(fee_str) + self.size_label.setText(size_str) run_hook('transaction_dialog_update', self) def add_io(self, vbox):