From 04b1e8718aaafbecdb849debc4e9f290e6345779 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 26 Apr 2021 12:31:04 +0200 Subject: [PATCH] tx dialog (Qt): if possible, save psbt and fully signed transaction under the same basename. --- electrum/gui/qt/transaction_dialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/electrum/gui/qt/transaction_dialog.py b/electrum/gui/qt/transaction_dialog.py index 489502d0364b..b7289b862bac 100644 --- a/electrum/gui/qt/transaction_dialog.py +++ b/electrum/gui/qt/transaction_dialog.py @@ -346,15 +346,15 @@ def export_to_file(self, *, tx: Transaction = None): tx = self.tx if isinstance(tx, PartialTransaction): 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(): - name = 'signed_%s' % (tx.txid()[0:8]) extension = 'txn' default_filter = TRANSACTION_FILE_EXTENSION_FILTER_ONLY_COMPLETE_TX else: - name = self.wallet.basename() + time.strftime('-%Y%m%d-%H%M') extension = 'psbt' default_filter = TRANSACTION_FILE_EXTENSION_FILTER_ONLY_PARTIAL_TX - name = f'{name}.{extension}' + name = f'{self.wallet.basename()}-{suffix}.{extension}' fileName = getSaveFileName( parent=self, title=_("Select where to save your transaction"),