Skip to content

Commit

Permalink
[#509 #752] Fix after CR
Browse files Browse the repository at this point in the history
  • Loading branch information
JanJaroszczak committed Apr 18, 2024
1 parent 8bfe972 commit 0498513
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions govtool/frontend/src/hooks/useWalletErrorModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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",
Expand Down

0 comments on commit 0498513

Please sign in to comment.