Skip to content

Commit

Permalink
fix(suite): install regular firmware after clicking the respective bu…
Browse files Browse the repository at this point in the history
…tton in onboarding
  • Loading branch information
komret committed Jul 18, 2024
1 parent ff75009 commit feaeaa3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/suite/src/components/firmware/FirmwareInitial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ export const FirmwareInitial = ({
availableFwVersion === currentFwVersion
);

const installFirmware = () => {
firmwareUpdate({ firmwareType: targetType });
const installFirmware = (firmwareType: FirmwareType) => {
firmwareUpdate({ firmwareType });
updateAnalytics({ firmware: 'install' });
};

Expand All @@ -183,8 +183,8 @@ export const FirmwareInitial = ({
innerActions: (
<FirmwareButtonsRow>
<FirmwareInstallButton
variant="secondary"
onClick={installFirmware}
variant="tertiary"
onClick={() => installFirmware(FirmwareType.Regular)}
multipleDevicesConnected={multipleDevicesConnected}
>
<Translation
Expand All @@ -196,7 +196,7 @@ export const FirmwareInitial = ({
</FirmwareInstallButton>

<FirmwareInstallButton
onClick={installFirmware}
onClick={() => installFirmware(targetType)}
multipleDevicesConnected={multipleDevicesConnected}
>
<Translation
Expand Down Expand Up @@ -233,7 +233,7 @@ export const FirmwareInitial = ({
body: <FirmwareOffer targetFirmwareType={targetType} />,
innerActions: (
<FirmwareInstallButton
onClick={installFirmware}
onClick={() => installFirmware(targetType)}
multipleDevicesConnected={multipleDevicesConnected}
/>
),
Expand Down Expand Up @@ -327,7 +327,7 @@ export const FirmwareInitial = ({
<FirmwareButtonsRow withCancelButton={willBeWiped} onClose={onClose}>
<FirmwareInstallButton
onClick={() =>
shouldCheckSeed ? setStatus('check-seed') : installFirmware()
shouldCheckSeed ? setStatus('check-seed') : installFirmware(targetType)
}
multipleDevicesConnected={multipleDevicesConnected}
>
Expand Down

0 comments on commit feaeaa3

Please sign in to comment.