Skip to content

Commit

Permalink
fix(suite): add defensive condition to prevent reported crashes durin…
Browse files Browse the repository at this point in the history
…g onboarding
  • Loading branch information
komret committed Feb 27, 2025
1 parent 7e92e4b commit 7a5ef28
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/suite/src/components/firmware/FirmwareInitial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const FirmwareInitial = ({
useFirmwareInstallation({
shouldSwitchFirmwareType,
});
const { updateAnalytics } = useOnboarding();
const { isActive: isOnboarding, updateAnalytics } = useOnboarding();
const devices = useSelector(selectDevices);
const [bitcoinOnlyOffer, setBitcoinOnlyOffer] = useState(false);
const [showSkipConfirmation, setShowSkipConfirmation] = useState(false);
Expand All @@ -147,7 +147,9 @@ export const FirmwareInitial = ({
// todo: move to utils device.ts
const devicesConnected = devices.filter(device => device?.connected);
const multipleDevicesConnected = [...new Set(devicesConnected.map(d => d.path))].length > 1;
const shouldCheckSeed = device?.mode !== 'initialize';

// The first condition is a defensive measure against https://github.com/trezor/trezor-suite/issues/17246, I could not reproduce the error.
const shouldCheckSeed = !isOnboarding && device?.mode !== 'initialize';

let content;

Expand Down

0 comments on commit 7a5ef28

Please sign in to comment.