From 9f2bab45dff6fd4ab260319f54b917582f74eec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=B3vis=20Neto?= Date: Tue, 17 Sep 2024 13:41:04 +0200 Subject: [PATCH] fix: eslint errors --- src/components/tx/DecodedTx/index.tsx | 3 +-- .../__test__/ExecuteThroughRoleForm.test.tsx | 5 ++++- .../__tests__/ExecuteForm.test.tsx | 1 + .../__tests__/SignForm.test.tsx | 1 + .../__tests__/SignOrExecuteForm.test.tsx | 18 ++++++++++++++++-- src/components/tx/SignOrExecuteForm/hooks.ts | 2 +- 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/components/tx/DecodedTx/index.tsx b/src/components/tx/DecodedTx/index.tsx index a3d42fc37f..63353cd5e2 100644 --- a/src/components/tx/DecodedTx/index.tsx +++ b/src/components/tx/DecodedTx/index.tsx @@ -1,6 +1,6 @@ import { type SyntheticEvent, type ReactElement, memo } from 'react' import { isCustomTxInfo } from '@/utils/transaction-guards' -import { Accordion, AccordionDetails, AccordionSummary, Box, Skeleton, Stack } from '@mui/material' +import { Accordion, AccordionDetails, AccordionSummary, Box, Stack } from '@mui/material' import { OperationType, type SafeTransaction } from '@safe-global/safe-core-sdk-types' import type { DecodedDataResponse, TransactionDetails } from '@safe-global/safe-gateway-typescript-sdk' import { Operation } from '@safe-global/safe-gateway-typescript-sdk' @@ -11,7 +11,6 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore' import DecodedData from '@/components/transactions/TxDetails/TxData/DecodedData' import accordionCss from '@/styles/accordion.module.css' import HelpToolTip from './HelpTooltip' -import { asError } from '@/services/exceptions/utils' type DecodedTxProps = { tx?: SafeTransaction diff --git a/src/components/tx/SignOrExecuteForm/ExecuteThroughRoleForm/__test__/ExecuteThroughRoleForm.test.tsx b/src/components/tx/SignOrExecuteForm/ExecuteThroughRoleForm/__test__/ExecuteThroughRoleForm.test.tsx index 5c17fc5922..1ab148b9b4 100644 --- a/src/components/tx/SignOrExecuteForm/ExecuteThroughRoleForm/__test__/ExecuteThroughRoleForm.test.tsx +++ b/src/components/tx/SignOrExecuteForm/ExecuteThroughRoleForm/__test__/ExecuteThroughRoleForm.test.tsx @@ -143,6 +143,7 @@ describe('ExecuteThroughRoleForm', () => { const { findByText, getByText } = render( , @@ -170,7 +171,9 @@ describe('ExecuteThroughRoleForm', () => { const onSubmit = jest.fn() - const { findByText } = render() + const { findByText } = render( + , + ) fireEvent.click(await findByText('Execute')) diff --git a/src/components/tx/SignOrExecuteForm/__tests__/ExecuteForm.test.tsx b/src/components/tx/SignOrExecuteForm/__tests__/ExecuteForm.test.tsx index d8060ab927..3b85d1baee 100644 --- a/src/components/tx/SignOrExecuteForm/__tests__/ExecuteForm.test.tsx +++ b/src/components/tx/SignOrExecuteForm/__tests__/ExecuteForm.test.tsx @@ -31,6 +31,7 @@ describe('ExecuteForm', () => { const defaultProps = { onSubmit: jest.fn(), isOwner: true, + txId: '0x123123', isExecutionLoop: false, relays: [undefined, undefined, false] as AsyncResult, txActions: { diff --git a/src/components/tx/SignOrExecuteForm/__tests__/SignForm.test.tsx b/src/components/tx/SignOrExecuteForm/__tests__/SignForm.test.tsx index 2f7017c8d0..0b4f58851a 100644 --- a/src/components/tx/SignOrExecuteForm/__tests__/SignForm.test.tsx +++ b/src/components/tx/SignOrExecuteForm/__tests__/SignForm.test.tsx @@ -24,6 +24,7 @@ describe('SignForm', () => { const defaultProps = { onSubmit: jest.fn(), + txId: '0x01231', isOwner: true, txActions: { proposeTx: jest.fn(), diff --git a/src/components/tx/SignOrExecuteForm/__tests__/SignOrExecuteForm.test.tsx b/src/components/tx/SignOrExecuteForm/__tests__/SignOrExecuteForm.test.tsx index 077e80a8a9..58686852f8 100644 --- a/src/components/tx/SignOrExecuteForm/__tests__/SignOrExecuteForm.test.tsx +++ b/src/components/tx/SignOrExecuteForm/__tests__/SignOrExecuteForm.test.tsx @@ -22,6 +22,7 @@ describe('SignOrExecute', () => { it('should display a safeTxError', () => { const { getByText } = render( { const { getByText } = render( { const { getByText } = render( { const { queryByTestId } = render( { const { queryByTestId } = render( { const { queryByTestId } = render( { const { queryByTestId } = render( { const { queryByText } = render( { const { getByTestId, getByText } = render( , @@ -195,7 +203,13 @@ describe('SignOrExecute', () => { it('should not display safeTxError message for valid transactions', () => { const { queryByText } = render( - , + , ) expect( diff --git a/src/components/tx/SignOrExecuteForm/hooks.ts b/src/components/tx/SignOrExecuteForm/hooks.ts index 050df4b14c..4111c6bf52 100644 --- a/src/components/tx/SignOrExecuteForm/hooks.ts +++ b/src/components/tx/SignOrExecuteForm/hooks.ts @@ -49,7 +49,7 @@ export const useProposeTx = (safeTx?: SafeTransaction, txId?: string, origin?: s return proposeTx(safeTx, txId, origin) }, - [safeTx, txId, origin, proposeTx], + [safeTx, txId, origin, safe.chainId, proposeTx], false, ) }