for unconfirmed transactions, show fee sent by server
This commit is contained in:
parent
0843aaafb5
commit
bdb4958a34
|
@ -104,6 +104,7 @@ class TxDialog(Factory.Popup):
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
|
is_relevant, is_mine, v, fee = self.wallet.get_wallet_delta(self.tx)
|
||||||
self.can_broadcast = False
|
self.can_broadcast = False
|
||||||
if self.tx.is_complete():
|
if self.tx.is_complete():
|
||||||
self.tx_hash = self.tx.hash()
|
self.tx_hash = self.tx.hash()
|
||||||
|
@ -115,6 +116,8 @@ class TxDialog(Factory.Popup):
|
||||||
self.date_str = datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
|
self.date_str = datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
|
||||||
else:
|
else:
|
||||||
self.status_str = _('Unconfirmed')
|
self.status_str = _('Unconfirmed')
|
||||||
|
if fee is None:
|
||||||
|
fee = self.wallet.tx_fees.get(tx_hash)
|
||||||
else:
|
else:
|
||||||
self.can_broadcast = self.app.network is not None
|
self.can_broadcast = self.app.network is not None
|
||||||
self.status_str = _('Signed')
|
self.status_str = _('Signed')
|
||||||
|
@ -122,7 +125,6 @@ class TxDialog(Factory.Popup):
|
||||||
s, r = self.tx.signature_count()
|
s, r = self.tx.signature_count()
|
||||||
self.status_str = _("Unsigned") if s == 0 else _('Partially signed') + ' (%d/%d)'%(s,r)
|
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
|
self.is_mine = is_mine
|
||||||
if is_relevant:
|
if is_relevant:
|
||||||
if is_mine:
|
if is_mine:
|
||||||
|
|
|
@ -177,12 +177,12 @@ class TxDialog(QDialog, MessageBoxMixin):
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
is_relevant, is_mine, v, fee = self.wallet.get_wallet_delta(self.tx)
|
is_relevant, is_mine, v, fee = self.wallet.get_wallet_delta(self.tx)
|
||||||
tx_hash = self.tx.hash()
|
|
||||||
desc = self.desc
|
desc = self.desc
|
||||||
time_str = None
|
time_str = None
|
||||||
self.broadcast_button.hide()
|
self.broadcast_button.hide()
|
||||||
|
|
||||||
if self.tx.is_complete():
|
if self.tx.is_complete():
|
||||||
|
tx_hash = self.tx.hash()
|
||||||
if tx_hash in self.wallet.transactions.keys():
|
if tx_hash in self.wallet.transactions.keys():
|
||||||
desc = self.wallet.get_label(tx_hash)
|
desc = self.wallet.get_label(tx_hash)
|
||||||
height, conf, timestamp = self.wallet.get_tx_height(tx_hash)
|
height, conf, timestamp = self.wallet.get_tx_height(tx_hash)
|
||||||
|
@ -194,6 +194,8 @@ class TxDialog(QDialog, MessageBoxMixin):
|
||||||
status = _('Not verified')
|
status = _('Not verified')
|
||||||
else:
|
else:
|
||||||
status = _('Unconfirmed')
|
status = _('Unconfirmed')
|
||||||
|
if fee is None:
|
||||||
|
fee = self.wallet.tx_fees.get(tx_hash)
|
||||||
else:
|
else:
|
||||||
status = _("Signed")
|
status = _("Signed")
|
||||||
self.broadcast_button.show()
|
self.broadcast_button.show()
|
||||||
|
@ -242,8 +244,6 @@ class TxDialog(QDialog, MessageBoxMixin):
|
||||||
else:
|
else:
|
||||||
amount_str = _("Transaction unrelated to your wallet")
|
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'))
|
fee_str = _("Transaction fee") + ': %s'% (format_amount(fee) + ' ' + base_unit if fee is not None else _('unknown'))
|
||||||
|
|
||||||
self.amount_label.setText(amount_str)
|
self.amount_label.setText(amount_str)
|
||||||
|
|
Loading…
Reference in New Issue