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!
-
+ {/* Temporarily hiding button - https://github.com/TryQuiet/quiet/issues/2025 */}
)
diff --git a/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.stories.tsx b/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.stories.tsx
index c989eaf969..fa1a93c8f7 100644
--- a/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.stories.tsx
+++ b/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.stories.tsx
@@ -3,5 +3,5 @@ import React from 'react'
import PossibleImpersonationAttackComponent from './PossibleImpersonationAttack.component'
storiesOf('PossibleImpersonationAttack', module).add('Default', () => (
- {}} handleBackButton={() => {}} />
+ {}} />
))
diff --git a/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.test.tsx b/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.test.tsx
index 088afdc2e7..cb2e334f0c 100644
--- a/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.test.tsx
+++ b/packages/mobile/src/components/PossibleImpersonationAttack/PossibleImpersonationAttack.test.tsx
@@ -5,11 +5,7 @@ import PossibleImpersonationAttackComponent from './PossibleImpersonationAttack.
describe('PossibleImpersonationAttack component', () => {
it('renders properly', () => {
const { toJSON } = renderComponent(
- {}}
- leaveCommunity={() => {}}
- />
+ {}} />
)
expect(toJSON()).toMatchInlineSnapshot(`
@@ -263,59 +259,6 @@ describe('PossibleImpersonationAttack component', () => {
>
This should never happen and we recommend leaving this community immediately!
-
-
- Leave community
-
-
`)
diff --git a/packages/mobile/src/screens/PossibleImpersonationAttack/PossibleImpersonationAttack.screen.tsx b/packages/mobile/src/screens/PossibleImpersonationAttack/PossibleImpersonationAttack.screen.tsx
index c6148bd8eb..b9942e9700 100644
--- a/packages/mobile/src/screens/PossibleImpersonationAttack/PossibleImpersonationAttack.screen.tsx
+++ b/packages/mobile/src/screens/PossibleImpersonationAttack/PossibleImpersonationAttack.screen.tsx
@@ -1,10 +1,8 @@
import React, { FC, useCallback } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { navigationActions } from '../../store/navigation/navigation.slice'
-import { ScreenNames } from '../../const/ScreenNames.enum'
import { capitalizeFirstLetter } from '@quiet/common'
import { communities } from '@quiet/state-manager'
-import { nativeServicesActions } from '../../store/nativeServices/nativeServices.slice'
import { PossibleImpersonationAttackScreenProps } from './PossibleImpersonationAttack.types'
import PossibleImpersonationAttackComponent from '../../components/PossibleImpersonationAttack/PossibleImpersonationAttack.component'
@@ -18,19 +16,9 @@ export const PossibleImpersonationAttackScreen: FC {
- dispatch(nativeServicesActions.leaveCommunity())
- }, [dispatch])
-
const handleBackButton = useCallback(() => {
dispatch(navigationActions.pop())
}, [dispatch])
- return (
-
- )
+ return
}
diff --git a/packages/mobile/src/screens/PossibleImpersonationAttack/PossibleImpersonationAttack.types.ts b/packages/mobile/src/screens/PossibleImpersonationAttack/PossibleImpersonationAttack.types.ts
index 4a0638b6c8..3fa12a4344 100644
--- a/packages/mobile/src/screens/PossibleImpersonationAttack/PossibleImpersonationAttack.types.ts
+++ b/packages/mobile/src/screens/PossibleImpersonationAttack/PossibleImpersonationAttack.types.ts
@@ -6,5 +6,4 @@ export interface PossibleImpersonationAttackScreenProps {
export interface PossibleImpersonationAttackComponentProps {
handleBackButton: () => void
communityName: string
- leaveCommunity: () => void
}