get_tx_info: fix types
This commit is contained in:
parent
60756e2ef9
commit
9896718f09
|
@ -107,7 +107,8 @@ class TxDialog(Factory.Popup):
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
format_amount = self.app.format_amount_and_units
|
format_amount = self.app.format_amount_and_units
|
||||||
self.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 ''
|
||||||
if timestamp:
|
if timestamp:
|
||||||
self.date_str = datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
|
self.date_str = datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
|
||||||
elif exp_n:
|
elif exp_n:
|
||||||
|
|
|
@ -190,7 +190,7 @@ class TxDialog(QDialog, MessageBoxMixin):
|
||||||
else:
|
else:
|
||||||
self.sign_button.hide()
|
self.sign_button.hide()
|
||||||
|
|
||||||
self.tx_hash_e.setText(tx_hash)
|
self.tx_hash_e.setText(tx_hash or _('Unknown'))
|
||||||
if desc is None:
|
if desc is None:
|
||||||
self.tx_desc.hide()
|
self.tx_desc.hide()
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -606,7 +606,7 @@ class Abstract_Wallet(PrintError):
|
||||||
exp_n = None
|
exp_n = None
|
||||||
can_broadcast = False
|
can_broadcast = False
|
||||||
can_bump = False
|
can_bump = False
|
||||||
label = None
|
label = ''
|
||||||
height = conf = timestamp = None
|
height = conf = timestamp = None
|
||||||
if tx.is_complete():
|
if tx.is_complete():
|
||||||
tx_hash = tx.hash()
|
tx_hash = tx.hash()
|
||||||
|
@ -633,7 +633,7 @@ class Abstract_Wallet(PrintError):
|
||||||
else:
|
else:
|
||||||
s, r = tx.signature_count()
|
s, r = tx.signature_count()
|
||||||
status = _("Unsigned") if s == 0 else _('Partially signed') + ' (%d/%d)'%(s,r)
|
status = _("Unsigned") if s == 0 else _('Partially signed') + ' (%d/%d)'%(s,r)
|
||||||
tx_hash = _('Unknown')
|
tx_hash = None
|
||||||
|
|
||||||
if is_relevant:
|
if is_relevant:
|
||||||
if is_mine:
|
if is_mine:
|
||||||
|
|
Loading…
Reference in New Issue