Move transaction related settings into transaction editor.
That way, users can see the effects settings directly on their transaction. This changes the API of make_tx: - get_coins is called inside make_tx, so that inputs can be changed dynamically - make_tx takes an optional parameter: unconfirmed_only, passed to get_coins - ConfirmTxDialog detects if we can pay by disabling confirmed_only or lowering fee
This commit is contained in:
@@ -132,12 +132,17 @@ class TxInOutWidget(QWidget):
|
||||
vbox.addWidget(self.outputs_textedit)
|
||||
self.setLayout(vbox)
|
||||
|
||||
def update(self, tx):
|
||||
def update(self, tx: Optional[Transaction]):
|
||||
self.tx = tx
|
||||
if tx is None:
|
||||
self.inputs_header.setText('')
|
||||
self.inputs_textedit.setText('')
|
||||
self.outputs_header.setText('')
|
||||
self.outputs_textedit.setText('')
|
||||
return
|
||||
|
||||
inputs_header_text = _("Inputs") + ' (%d)'%len(self.tx.inputs())
|
||||
|
||||
self.inputs_header.setText(inputs_header_text)
|
||||
|
||||
ext = QTextCharFormat() # "external"
|
||||
lnk = QTextCharFormat()
|
||||
lnk.setToolTip(_('Click to open, right-click for menu'))
|
||||
|
||||
Reference in New Issue
Block a user