Currently the PSBT generated for external devices doens't include the xpubs, which makes change detection annd associated a wallet (if exists) complicated/ not possible. We currently don't share the xpubs in the PSBT to protect privacy in case the signer is not meant to know the full wallet data. However in cases it does, like normal collaborative wallets, there should be a way for the user to include these.
So on the side generating the PSBT, we need a way to decide whether or not to include xpubs in the PSBT.
For the side signing, in case xpubs are included in the PSBT, we should do change detection (and can hide the change output), and also try to detect if the PSBT belong to a wallet in the user's wallets, and show the wallet it's coming from in the confirmation screen if found.
Currently the PSBT generated for external devices doens't include the xpubs, which makes change detection annd associated a wallet (if exists) complicated/ not possible. We currently don't share the xpubs in the PSBT to protect privacy in case the signer is not meant to know the full wallet data. However in cases it does, like normal collaborative wallets, there should be a way for the user to include these.
So on the side generating the PSBT, we need a way to decide whether or not to include xpubs in the PSBT.
For the side signing, in case xpubs are included in the PSBT, we should do change detection (and can hide the change output), and also try to detect if the PSBT belong to a wallet in the user's wallets, and show the wallet it's coming from in the confirmation screen if found.