qt: show both sign and broadcast buttons in tx dialog
This commit is contained in:
parent
c0fc844390
commit
23c8684448
@ -156,13 +156,12 @@ class TxDialog(QDialog, MessageBoxMixin):
|
|||||||
if success:
|
if success:
|
||||||
self.prompt_if_unsaved = True
|
self.prompt_if_unsaved = True
|
||||||
self.saved = False
|
self.saved = False
|
||||||
self.update()
|
self.update()
|
||||||
|
self.main_window.pop_top_level_window(self)
|
||||||
|
|
||||||
self.sign_button.setDisabled(True)
|
self.sign_button.setDisabled(True)
|
||||||
self.main_window.push_top_level_window(self)
|
self.main_window.push_top_level_window(self)
|
||||||
self.main_window.sign_tx(self.tx, sign_done)
|
self.main_window.sign_tx(self.tx, sign_done)
|
||||||
self.sign_button.setDisabled(False)
|
|
||||||
self.main_window.pop_top_level_window(self)
|
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
name = 'signed_%s.txn' % (self.tx.hash()[0:8]) if self.tx.is_complete() else 'unsigned.txn'
|
name = 'signed_%s.txn' % (self.tx.hash()[0:8]) if self.tx.is_complete() else 'unsigned.txn'
|
||||||
@ -173,23 +172,13 @@ class TxDialog(QDialog, MessageBoxMixin):
|
|||||||
self.show_message(_("Transaction saved successfully"))
|
self.show_message(_("Transaction saved successfully"))
|
||||||
self.saved = True
|
self.saved = True
|
||||||
|
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
desc = self.desc
|
desc = self.desc
|
||||||
base_unit = self.main_window.base_unit()
|
base_unit = self.main_window.base_unit()
|
||||||
format_amount = self.main_window.format_amount
|
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)
|
tx_hash, status, label, can_broadcast, can_rbf, amount, fee, height, conf, timestamp, exp_n = self.wallet.get_tx_info(self.tx)
|
||||||
|
self.broadcast_button.setEnabled(can_broadcast)
|
||||||
if can_broadcast:
|
self.sign_button.setEnabled(self.wallet.can_sign(self.tx))
|
||||||
self.broadcast_button.show()
|
|
||||||
else:
|
|
||||||
self.broadcast_button.hide()
|
|
||||||
|
|
||||||
if self.wallet.can_sign(self.tx):
|
|
||||||
self.sign_button.show()
|
|
||||||
else:
|
|
||||||
self.sign_button.hide()
|
|
||||||
|
|
||||||
self.tx_hash_e.setText(tx_hash or _('Unknown'))
|
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()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user