From 96e837fe55da809726ff3b6b38cb961076acef35 Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Wed, 28 May 2025 20:21:47 +0200 Subject: [PATCH] Add catch error --- src/components/Group/AddGroup.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/Group/AddGroup.tsx b/src/components/Group/AddGroup.tsx index cc3e487..3e94755 100644 --- a/src/components/Group/AddGroup.tsx +++ b/src/components/Group/AddGroup.tsx @@ -40,6 +40,7 @@ import { subscribeToEvent, unsubscribeFromEvent } from '../../utils/events'; import { useTranslation } from 'react-i18next'; import { useSetAtom } from 'jotai'; import { txListAtom } from '../../atoms/global'; +import { ErrorRounded } from '@mui/icons-material'; export const Label = styled('label')` display: block; @@ -123,13 +124,17 @@ export const AddGroup = ({ address, open, setOpen }) => { const fee = await getFee('CREATE_GROUP'); - await show({ - message: t('core:message.question.perform_transaction', { - action: 'CREATE_GROUP', - postProcess: 'capitalizeFirstChar', - }), - publishFee: fee.fee + ' QORT', - }); + try { + await show({ + message: t('core:message.question.perform_transaction', { + action: 'CREATE_GROUP', + postProcess: 'capitalizeFirstChar', + }), + publishFee: fee.fee + ' QORT', + }); + } catch (error) { + console.log(error); + } await new Promise((res, rej) => { window