Skip to content

Commit

Permalink
fix: correct detection for multiple devices in firmware update vol 2
Browse files Browse the repository at this point in the history
(cherry picked from commit 79f0524)
  • Loading branch information
mroz22 authored and matejkriz committed Sep 14, 2022
1 parent cc1083e commit a2cec27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/suite/src/components/firmware/FirmwareInitial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a2cec27

Please sign in to comment.