diff --git a/machines/issuersMachine.ts b/machines/issuersMachine.ts index c28e2bb4b3..ca4d11f0a7 100644 --- a/machines/issuersMachine.ts +++ b/machines/issuersMachine.ts @@ -548,9 +548,9 @@ export function selectIssuers(state: State) { export function selectErrorMessageType(state: State) { return state.context.errorMessage === '' || - state.context.errorMessage === 'noInternetConnection' + state.context.errorMessage === ErrorMessage.NO_INTERNET ? state.context.errorMessage - : 'generic'; + : ErrorMessage.GENERIC; } export function selectLoadingReason(state: State) { diff --git a/screens/Issuers/IssuersScreen.tsx b/screens/Issuers/IssuersScreen.tsx index 07fa901d99..398cb31998 100644 --- a/screens/Issuers/IssuersScreen.tsx +++ b/screens/Issuers/IssuersScreen.tsx @@ -11,6 +11,7 @@ import {HomeRouteProps} from '../../routes/main'; import {useIssuerScreenController} from './IssuerScreenController'; import {Loader} from '../../components/ui/Loader'; import testIDProps, {removeWhiteSpace} from '../../shared/commonUtil'; +import {ErrorMessage} from '../../shared/openId4VCI/Utils'; export const IssuersScreen: React.FC< HomeRouteProps | RootRouteProps @@ -54,7 +55,7 @@ export const IssuersScreen: React.FC< }; const isGenericError = () => { - return controller.errorMessageType === 'generic'; + return controller.errorMessageType === ErrorMessage.GENERIC; }; const goBack = () => {