Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(suite): rename some suite banners #15791

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading