tx dialog (Qt): if possible, save psbt and fully signed transaction under the same basename.
This commit is contained in:
@@ -346,15 +346,15 @@ class BaseTxDialog(QDialog, MessageBoxMixin):
|
|||||||
tx = self.tx
|
tx = self.tx
|
||||||
if isinstance(tx, PartialTransaction):
|
if isinstance(tx, PartialTransaction):
|
||||||
tx.finalize_psbt()
|
tx.finalize_psbt()
|
||||||
|
txid = tx.txid()
|
||||||
|
suffix = txid[0:8] if txid is not None else time.strftime('%Y%m%d-%H%M')
|
||||||
if tx.is_complete():
|
if tx.is_complete():
|
||||||
name = 'signed_%s' % (tx.txid()[0:8])
|
|
||||||
extension = 'txn'
|
extension = 'txn'
|
||||||
default_filter = TRANSACTION_FILE_EXTENSION_FILTER_ONLY_COMPLETE_TX
|
default_filter = TRANSACTION_FILE_EXTENSION_FILTER_ONLY_COMPLETE_TX
|
||||||
else:
|
else:
|
||||||
name = self.wallet.basename() + time.strftime('-%Y%m%d-%H%M')
|
|
||||||
extension = 'psbt'
|
extension = 'psbt'
|
||||||
default_filter = TRANSACTION_FILE_EXTENSION_FILTER_ONLY_PARTIAL_TX
|
default_filter = TRANSACTION_FILE_EXTENSION_FILTER_ONLY_PARTIAL_TX
|
||||||
name = f'{name}.{extension}'
|
name = f'{self.wallet.basename()}-{suffix}.{extension}'
|
||||||
fileName = getSaveFileName(
|
fileName = getSaveFileName(
|
||||||
parent=self,
|
parent=self,
|
||||||
title=_("Select where to save your transaction"),
|
title=_("Select where to save your transaction"),
|
||||||
|
|||||||
Reference in New Issue
Block a user