diff --git a/src/ui/app/tabs/hw.jsx b/src/ui/app/tabs/hw.jsx index 1d066b2e..1cad0f84 100644 --- a/src/ui/app/tabs/hw.jsx +++ b/src/ui/app/tabs/hw.jsx @@ -42,10 +42,11 @@ import { MdUsb } from 'react-icons/md'; import { Planet } from 'react-kawaii'; import { useCaptureEvent } from '../../../features/analytics/hooks'; import { Events } from '../../../features/analytics/events'; +import { ledgerUSBVendorId } from '@ledgerhq/devices'; -const MANUFACTURER = { - ledger: 'Ledger', - trezor: 'SatoshiLabs', +const VENDOR_IDS = { + ledger: [ledgerUSBVendorId], + trezor: [0x534c, 0x1209], // Model T HID 0x534c and others 0x1209 - taken from https://github.com/vacuumlabs/trezor-suite/blob/develop/packages/transport/src/constants.ts#L13-L21 }; const App = () => { @@ -189,7 +190,7 @@ const ConnectHW = ({ onConfirm }) => { const device = await navigator.usb.requestDevice({ filters: [], }); - if (device.manufacturerName !== MANUFACTURER[selected]) { + if (!VENDOR_IDS[selected].some((vendorId) => vendorId === device.vendorId)) { setError( `Device is not a ${selected == HW.ledger ? 'Ledger' : 'Trezor'}` );