Skip to content

Commit

Permalink
chore(suite): rename some suite banners
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemonexe committed Dec 6, 2024
1 parent e8fbc88 commit d92f6c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const useAuthenticityCheckMessage = (): TranslationKey | null => {
return null;
};

export const FirmwareRevisionCheckBanner = () => {
export const FirmwareAuthenticityCheckBanner = () => {
const firmwareRevisionError = useSelector(selectFirmwareRevisionCheckErrorIfEnabled);
const wasOffline = firmwareRevisionError === 'cannot-perform-check-offline';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Banner } from '@trezor/components';

import { Translation } from 'src/components/suite';

export const FirmwareHashMismatch = () => (
export const FirmwareHashMismatchOnLastUpdateBanner = () => (
<Banner icon variant="destructive">
<Translation id="TR_FIRMWARE_HASH_MISMATCH" />
</Banner>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import { NoBackup } from './NoBackupBanner';
import { FailedBackup } from './FailedBackupBanner';
import { SafetyChecksBanner } from './SafetyChecksBanner';
import { TranslationMode } from './TranslationModeBanner';
import { FirmwareHashMismatch } from './FirmwareHashMismatchBanner';
import { FirmwareRevisionCheckBanner } from './FirmwareRevisionCheckBanner';
import { FirmwareHashMismatchOnLastUpdateBanner } from './FirmwareHashMismatchOnLastUpdateBanner';
import { FirmwareAuthenticityCheckBanner } from './FirmwareAuthenticityCheckBanner';

const Container = styled.div<{ $isVisible?: boolean }>`
width: 100%;
Expand Down Expand Up @@ -67,12 +67,12 @@ export const SuiteBanners = () => {
let priority = 0;
// this handles firmware hash being invalid after a firmware update, not the regular firmware hash check
if (device?.id && firmwareHashInvalid.includes(device.id)) {
banner = <FirmwareHashMismatch />;
banner = <FirmwareHashMismatchOnLastUpdateBanner />;
priority = 92;
}
// the regular firmware hash check, and revision id check, either of them may fail
else if (firmwareRevisionError || firmwareHashError) {
banner = <FirmwareRevisionCheckBanner />;
banner = <FirmwareAuthenticityCheckBanner />;
priority = 91;
} else if (device?.features?.unfinished_backup) {
banner = <FailedBackup />;
Expand Down

0 comments on commit d92f6c4

Please sign in to comment.