@@ -870,15 +870,21 @@ export class AccountPickerController extends EventEmitter implements IAccountPic
870870 const deviceIds : { [ key in ExternalKey [ 'type' ] ] : string } = {
871871 ledger : this . #externalSignerControllers. ledger ?. deviceId || '' ,
872872 trezor : this . #externalSignerControllers. trezor ?. deviceId || '' ,
873- lattice : this . #externalSignerControllers?. lattice ?. deviceId || ''
873+ lattice : this . #externalSignerControllers?. lattice ?. deviceId || '' ,
874+ qr : this . #externalSignerControllers. qr ?. deviceId || ''
874875 }
875876
876877 const deviceModels : { [ key in ExternalKey [ 'type' ] ] : string } = {
877878 ledger : this . #externalSignerControllers. ledger ?. deviceModel || '' ,
878879 trezor : this . #externalSignerControllers. trezor ?. deviceModel || '' ,
879- lattice : this . #externalSignerControllers. lattice ?. deviceModel || ''
880+ lattice : this . #externalSignerControllers. lattice ?. deviceModel || '' ,
881+ qr : this . #externalSignerControllers. qr ?. deviceModel || ''
880882 }
881883
884+ const masterFingerprint = this . #externalSignerControllers. qr ?. masterFingerprint || ''
885+
886+ const hdPathTemplate = this . hdPathTemplate as HD_PATH_TEMPLATE_TYPE
887+
882888 const readyToAddExternalKeys = this . selectedAccountsFromCurrentSession . flatMap (
883889 ( { account, accountKeys } ) =>
884890 accountKeys . map ( ( { addr, index } , i ) => ( {
@@ -896,7 +902,12 @@ export class AccountPickerController extends EventEmitter implements IAccountPic
896902 deviceId : deviceIds [ keyType ] ,
897903 deviceModel : deviceModels [ keyType ] ,
898904 // always defined in the case of external keys
899- hdPathTemplate : this . hdPathTemplate as HD_PATH_TEMPLATE_TYPE ,
905+ hdPathTemplate,
906+ ...( keyType === 'qr'
907+ ? {
908+ masterFingerprint
909+ }
910+ : { } ) ,
900911 index,
901912 createdAt : new Date ( ) . getTime ( )
902913 }
@@ -1066,7 +1077,12 @@ export class AccountPickerController extends EventEmitter implements IAccountPic
10661077 // (SMART_ACCOUNT_SIGNER_KEY_DERIVATION_OFFSET), and deriving smart
10671078 // accounts out of the private key (with another approach - salt and
10681079 // extra entropy) was creating confusion.
1069- const shouldRetrieveSmartAccountIndices = this . keyIterator . subType !== 'private-key'
1080+ //
1081+ // + no smart accounts for QR wallets. Reasons:
1082+ // - some hws sign only if the signer is imported
1083+ // - we are generally moving in another direction
1084+ const shouldRetrieveSmartAccountIndices =
1085+ this . keyIterator . subType !== 'private-key' && this . type !== 'qr'
10701086 if ( shouldRetrieveSmartAccountIndices ) {
10711087 // Indices for the smart accounts.
10721088 indicesToRetrieve . push ( {
0 commit comments