From a2cec27a5445c65ca476978302a41b73c9c37994 Mon Sep 17 00:00:00 2001 From: mroz Date: Wed, 14 Sep 2022 14:34:16 +0200 Subject: [PATCH] fix: correct detection for multiple devices in firmware update vol 2 (cherry picked from commit 79f0524f2586ba75c3f8770d66ad4e3d26823d77) --- packages/suite/src/components/firmware/FirmwareInitial.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/suite/src/components/firmware/FirmwareInitial.tsx b/packages/suite/src/components/firmware/FirmwareInitial.tsx index 9f5c7f3642e..e27391f48f4 100644 --- a/packages/suite/src/components/firmware/FirmwareInitial.tsx +++ b/packages/suite/src/components/firmware/FirmwareInitial.tsx @@ -90,7 +90,10 @@ export const FirmwareInitial = ({ const { goToNextStep, updateAnalytics } = useOnboarding(); const theme = useTheme(); const devices = useSelector(state => state.devices); - const multipleDevicesConnected = devices.filter(device => device.connected).length > 1; + + // todo: move to utils device.ts + const devicesConnected = devices.filter(device => device?.connected); + const multipleDevicesConnected = [...new Set(devicesConnected.map(d => d.path))].length > 1; useEffect(() => { // When the user choses to install a new firmware update we will ask him/her to reconnect a device in bootloader mode.