From 0498513b8769f74a12ab21ad7d72b8c07a62937a Mon Sep 17 00:00:00 2001 From: Jan Jaroszczak Date: Thu, 18 Apr 2024 14:39:31 +0200 Subject: [PATCH] [#509 #752] Fix after CR --- govtool/frontend/src/hooks/useWalletErrorModal.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/govtool/frontend/src/hooks/useWalletErrorModal.tsx b/govtool/frontend/src/hooks/useWalletErrorModal.tsx index a0265ebd4..78f7a2896 100644 --- a/govtool/frontend/src/hooks/useWalletErrorModal.tsx +++ b/govtool/frontend/src/hooks/useWalletErrorModal.tsx @@ -2,8 +2,7 @@ import { useModal } from "@context"; import { useTranslation } from "react-i18next"; type WalletErrorModalProps = { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - error: any; + error: unknown; onSumbit?: () => void; title?: string; buttonText?: string; @@ -21,7 +20,7 @@ export const useWalletErrorModal = () => { buttonText, dataTestId, }: WalletErrorModalProps) => { - const errorMessage = error.info ? error.info : error; + const errorMessage = (error && typeof error === 'object' && 'info' in error) ? error.info : error; openModal({ type: "statusModal",