diff --git a/app/components/Views/AesCryptoTestForm/AesCryptoTestForm.test.tsx b/app/components/Views/AesCryptoTestForm/AesCryptoTestForm.test.tsx index 162bb706cea..ec653e301a9 100644 --- a/app/components/Views/AesCryptoTestForm/AesCryptoTestForm.test.tsx +++ b/app/components/Views/AesCryptoTestForm/AesCryptoTestForm.test.tsx @@ -3,6 +3,11 @@ import { render } from '@testing-library/react-native'; import AesCryptoTestForm from './AesCryptoTestForm'; +jest.mock('react-redux', () => ({ + ...jest.requireActual('react-redux'), + useSelector: jest.fn(), +})); + jest.mock('@react-navigation/native', () => { const actualReactNavigation = jest.requireActual('@react-navigation/native'); return { diff --git a/app/components/Views/AesCryptoTestForm/AesCryptoTestForm.tsx b/app/components/Views/AesCryptoTestForm/AesCryptoTestForm.tsx index c2217f4e5a3..6768dbf1f0c 100644 --- a/app/components/Views/AesCryptoTestForm/AesCryptoTestForm.tsx +++ b/app/components/Views/AesCryptoTestForm/AesCryptoTestForm.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useCallback } from 'react'; -import { SafeAreaView, ScrollView } from 'react-native'; +import { SafeAreaView, ScrollView, View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; import { @@ -19,7 +19,13 @@ import { aesCryptoFormResponses, aesCryptoFormButtons, aesCryptoFormScrollIdentifier, + accountAddress, } from '../../../../e2e/selectors/AesCrypto.selectors'; +import Text, { + TextVariant, +} from '../../../component-library/components/Texts/Text'; +import { selectSelectedInternalAccountFormattedAddress } from '../../../selectors/accountsController'; +import { useSelector } from 'react-redux'; const AesCryptoTestForm = () => { const navigation = useNavigation(); @@ -35,6 +41,10 @@ const AesCryptoTestForm = () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const [keyEncryptedData, setKeyEncryptedData] = useState(); + const selectedFormattedAddress = useSelector( + selectSelectedInternalAccountFormattedAddress, + ); + useEffect(() => { const encryptorInstance = new Encryptor({ keyDerivationOptions: DERIVATION_OPTIONS_DEFAULT_OWASP2023, @@ -136,6 +146,14 @@ const AesCryptoTestForm = () => { return ( + + + Current selected address + + + {selectedFormattedAddress} + + + + + Current selected address + + +