diff --git a/CHANGELOG.md b/CHANGELOG.md index f6187fa682..a3fe296403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +[unreleased] + +* Temporarily hiding leave community button from Possible impersonation attack + [2.0.3-alpha.0] * Filter CSRs - remove old csrs and replace with new for each pubkey diff --git a/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.component.tsx b/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.component.tsx index 2c3b45a692..03f6d6b28a 100644 --- a/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.component.tsx +++ b/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.component.tsx @@ -40,14 +40,12 @@ const StyledGrid = styled(Grid)(({ theme }) => ({ export interface PossibleImpersonationAttackModalComponentProps { communityName: string - leaveCommunity: () => void open: boolean handleClose: () => void } const PossibleImpersonationAttackModalComponent: React.FC = ({ communityName, - leaveCommunity, handleClose, open, }) => { @@ -69,9 +67,7 @@ const PossibleImpersonationAttackModalComponent: React.FC This should never happen and we recommend leaving this community immediately! - + {/* Temporarily hiding button - https://github.com/TryQuiet/quiet/issues/2025 */} ) diff --git a/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.container.tsx b/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.container.tsx index bd7b75f913..4fefa42f1f 100644 --- a/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.container.tsx +++ b/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.container.tsx @@ -2,7 +2,6 @@ import { capitalizeFirstLetter } from '@quiet/common' import { communities, users } from '@quiet/state-manager' import React, { useEffect } from 'react' import { useSelector } from 'react-redux' -import { clearCommunity } from '../../..' import { useModal } from '../../../containers/hooks' import { ModalName } from '../../../sagas/modals/modals.types' import PossibleImpersonationAttackModalComponent from './PossibleImpersonationAttackModal.component' @@ -19,10 +18,6 @@ const PossibleImpersonationAttackModalContainer = () => { communityName = capitalizeFirstLetter(community.name) } - const leaveCommunity = async () => { - await clearCommunity() - } - useEffect(() => { if (duplicateCerts) { possibleImpersonationAttackModal.handleOpen() @@ -30,11 +25,7 @@ const PossibleImpersonationAttackModalContainer = () => { }, [duplicateCerts]) return ( - + ) } diff --git a/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.stories.tsx b/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.stories.tsx index bd94e8c525..68ab58500f 100644 --- a/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.stories.tsx +++ b/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.stories.tsx @@ -19,7 +19,6 @@ const args: PossibleImpersonationAttackModalComponentProps = { handleClose: function (): void {}, open: true, communityName: 'devteam', - leaveCommunity: function (): void {}, } Component.args = args diff --git a/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.test.tsx b/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.test.tsx index 5a5e512164..e739fbc416 100644 --- a/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.test.tsx +++ b/packages/desktop/src/renderer/components/widgets/possibleImpersonationAttackModal/PossibleImpersonationAttackModal.test.tsx @@ -8,12 +8,7 @@ describe('PossibleImpersonationAttackModal', () => { it('renderComponent', () => { const result = renderComponent( - {}} - open={true} - communityName={'devteam'} - leaveCommunity={() => {}} - /> + {}} open={true} communityName={'devteam'} /> ) expect(result.baseElement).toMatchInlineSnapshot(` @@ -121,17 +116,6 @@ describe('PossibleImpersonationAttackModal', () => { This should never happen and we recommend leaving this community immediately!

- diff --git a/packages/desktop/src/rtl-tests/possibleImpersonationAttack.test.tsx b/packages/desktop/src/rtl-tests/possibleImpersonationAttack.test.tsx index 4e1a8af679..fb3d7a482f 100644 --- a/packages/desktop/src/rtl-tests/possibleImpersonationAttack.test.tsx +++ b/packages/desktop/src/rtl-tests/possibleImpersonationAttack.test.tsx @@ -98,8 +98,5 @@ describe('Possible Impersonation Attack', () => { const modal = screen.getByTestId('possible-impersonation-attack-modal-component') expect(modal).toBeVisible() - - const button = screen.getByTestId('unregistered-button') - expect(button).toBeVisible() }) }) diff --git a/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.component.tsx b/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.component.tsx index 5899f6b117..a154591ac6 100644 --- a/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.component.tsx +++ b/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.component.tsx @@ -35,7 +35,6 @@ const classes = StyleSheet.create({ const PossibleImpersonationAttackComponent: React.FC = ({ handleBackButton, communityName, - leaveCommunity, }) => { return ( This should never happen and we recommend leaving this community immediately! -