1
0

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:
ThomasV
2023-02-26 10:15:25 +01:00
parent 27ce9d88c3
commit 2f6d60c715
7 changed files with 124 additions and 111 deletions

View File

@@ -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'))