diff --git a/electrum/gui/qt/transaction_dialog.py b/electrum/gui/qt/transaction_dialog.py index 65d5f18f7..8be43cf8f 100644 --- a/electrum/gui/qt/transaction_dialog.py +++ b/electrum/gui/qt/transaction_dialog.py @@ -266,6 +266,14 @@ class BaseTxDialog(QDialog, MessageBoxMixin): raise Exception("Can only export partial transactions for hardware device.") tx = copy.deepcopy(self.tx) tx.add_info_from_wallet(self.wallet, include_xpubs_and_full_paths=True) + # log warning if PSBT_*_BIP32_DERIVATION fields cannot be filled with full path due to missing info + from electrum.keystore import Xpub + def is_ks_missing_info(ks): + return (isinstance(ks, Xpub) and (ks.get_root_fingerprint() is None + or ks.get_derivation_prefix() is None)) + if any([is_ks_missing_info(ks) for ks in self.wallet.get_keystores()]): + _logger.warning('PSBT was requested to be filled with full bip32 paths but ' + 'some keystores lacked either the derivation prefix or the root fingerprint') return tx def copy_to_clipboard(self, *, tx: Transaction = None):