URI: 
       tfix #5764 - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit e74f7e7b42aedaf862cd937bf64c3193910dbc47
   DIR parent cbd146ad1501841a05f66135e203cccb3565141d
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Sun, 17 Nov 2019 13:48:19 +0100
       
       fix #5764
       
       Diffstat:
         M electrum/gui/qt/main_window.py      |       8 ++++----
         M electrum/gui/qt/transaction_dialog… |       9 +++++----
       
       2 files changed, 9 insertions(+), 8 deletions(-)
       ---
   DIR diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py
       t@@ -1488,7 +1488,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
                    fee=fee_est,
                    is_sweep=is_sweep)
                if self.config.get('advanced_preview'):
       -            self.preview_tx_dialog(make_tx, outputs, is_sweep=is_sweep, invoice=invoice)
       +            self.preview_tx_dialog(make_tx, outputs, external_keypairs=external_keypairs, invoice=invoice)
                    return
        
                output_values = [x.value for x in outputs]
       t@@ -1507,10 +1507,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
                            self.broadcast_or_show(tx, invoice=invoice)
                    self.sign_tx_with_password(tx, sign_done, password, external_keypairs)
                else:
       -            self.preview_tx_dialog(make_tx, outputs, is_sweep=is_sweep, invoice=invoice)
       +            self.preview_tx_dialog(make_tx, outputs, external_keypairs=external_keypairs, invoice=invoice)
        
       -    def preview_tx_dialog(self, make_tx, outputs, is_sweep=False, invoice=None):
       -        d = PreviewTxDialog(make_tx, outputs, is_sweep, window=self, invoice=invoice)
       +    def preview_tx_dialog(self, make_tx, outputs, external_keypairs=None, invoice=None):
       +        d = PreviewTxDialog(make_tx, outputs, external_keypairs, window=self, invoice=invoice)
                d.show()
        
            def broadcast_or_show(self, tx, invoice=None):
   DIR diff --git a/electrum/gui/qt/transaction_dialog.py b/electrum/gui/qt/transaction_dialog.py
       t@@ -92,13 +92,14 @@ def show_transaction(tx: Transaction, *, parent: 'ElectrumWindow', invoice=None,
        
        class BaseTxDialog(QDialog, MessageBoxMixin):
        
       -    def __init__(self, *, parent: 'ElectrumWindow', invoice, desc, prompt_if_unsaved, finalized: bool):
       +    def __init__(self, *, parent: 'ElectrumWindow', invoice, desc, prompt_if_unsaved, finalized: bool, external_keypairs=None):
                '''Transactions in the wallet will show their description.
                Pass desc to give a description for txs not yet in the wallet.
                '''
                # We want to be a top-level window
                QDialog.__init__(self, parent=None)
                self.tx = None  # type: Optional[Transaction]
       +        self.external_keypairs = external_keypairs
                self.finalized = finalized
                self.main_window = parent
                self.config = parent.config
       t@@ -602,9 +603,9 @@ class TxDialog(BaseTxDialog):
        
        class PreviewTxDialog(BaseTxDialog, TxEditor):
        
       -    def __init__(self, make_tx, outputs, is_sweep, *, window: 'ElectrumWindow', invoice):
       -        TxEditor.__init__(self, window, make_tx, outputs, is_sweep)
       -        BaseTxDialog.__init__(self, parent=window, invoice=invoice, desc='', prompt_if_unsaved=False, finalized=False)
       +    def __init__(self, make_tx, outputs, external_keypairs, *, window: 'ElectrumWindow', invoice):
       +        TxEditor.__init__(self, window, make_tx, outputs, is_sweep=bool(external_keypairs))
       +        BaseTxDialog.__init__(self, parent=window, invoice=invoice, desc='', prompt_if_unsaved=False, finalized=False, external_keypairs=external_keypairs)
                self.update_tx()
                self.update()