Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/components/Views/AccountActions/AccountActions.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,9 @@ describe('AccountActions', () => {
);

expect(mockNavigate).toHaveBeenCalledWith(
Routes.SETTINGS.REVEAL_PRIVATE_CREDENTIAL,
Routes.SHEET.MULTICHAIN_ACCOUNT_DETAILS.REVEAL_PRIVATE_CREDENTIAL,
{
credentialName: 'private_key',
shouldUpdateNav: true,
selectedAccount: MOCK_ACCOUNT,
account: MOCK_ACCOUNT,
},
);
});
Expand Down
11 changes: 6 additions & 5 deletions app/components/Views/AccountActions/AccountActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,12 @@ const AccountActions = () => {
).build(),
);

navigate(Routes.SETTINGS.REVEAL_PRIVATE_CREDENTIAL, {
credentialName: 'private_key',
shouldUpdateNav: true,
selectedAccount,
});
navigate(
Routes.SHEET.MULTICHAIN_ACCOUNT_DETAILS.REVEAL_PRIVATE_CREDENTIAL,
{
account: selectedAccount,
},
);
});
};

Expand Down
1 change: 0 additions & 1 deletion app/components/Views/ErrorBoundary/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ class ErrorBoundary extends Component {
return this.state.backupSeedphrase
? this.renderWithSafeArea(
<RevealPrivateCredential
credentialName={'seed_phrase'}
cancel={this.cancelExportSeedphrase}
navigation={this.props.navigation}
/>,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,35 +1,14 @@
import React from 'react';
import { strings } from '../../../../../../locales/i18n';
import { InternalAccount } from '@metamask/keyring-internal-api';
import {
ParamListBase,
RouteProp,
useNavigation,
useRoute,
} from '@react-navigation/native';
import { RevealPrivateCredential } from '../../../RevealPrivateCredential';
import { PRIVATE_KEY } from '../../../RevealPrivateCredential/RevealPrivateCredential';
import { useNavigation } from '@react-navigation/native';
import SheetHeader from '../../../../../component-library/components/Sheet/SheetHeader';
import { SafeAreaView } from 'react-native-safe-area-context';
import styleSheet from './RevealPrivateKey.styles';
import { useStyles } from '../../../../hooks/useStyles';

interface RootNavigationParamList extends ParamListBase {
RevealPrivateKey: {
account: InternalAccount;
};
}

type RevealPrivateKeyProp = RouteProp<
RootNavigationParamList,
'RevealPrivateKey'
>;

export const RevealPrivateKey = () => {
const { styles } = useStyles(styleSheet, {});
const navigation = useNavigation();
const route = useRoute<RevealPrivateKeyProp>();
const { account } = route.params;
const handleOnBack = () => {
navigation.goBack();
};
Expand All @@ -40,20 +19,6 @@ export const RevealPrivateKey = () => {
onBack={handleOnBack}
title={strings('multichain_accounts.reveal_private_key.title')}
/>
<RevealPrivateCredential
credentialName={PRIVATE_KEY}
navigation={navigation}
cancel={handleOnBack}
route={{
key: 'RevealPrivateCredential',
name: 'RevealPrivateCredential',
params: {
credentialName: PRIVATE_KEY,
shouldUpdateNav: false,
selectedAccount: account,
},
}}
/>
</SafeAreaView>
);
};
1 change: 0 additions & 1 deletion app/components/Views/Quiz/SRPQuiz/SRPQuiz.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ describe('SRPQuiz', () => {
expect(mockNavigate).toHaveBeenCalledWith(
Routes.SETTINGS.REVEAL_PRIVATE_CREDENTIAL,
{
credentialName: 'seed_phrase',
shouldUpdateNav: true,
keyringId,
},
Expand Down
1 change: 0 additions & 1 deletion app/components/Views/Quiz/SRPQuiz/SRPQuiz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ const SRPQuiz = (props: SRPQuizProps) => {
);
trackEvent(createEventBuilder(MetaMetricsEvents.REVEAL_SRP_CTA).build());
navigation.navigate(Routes.SETTINGS.REVEAL_PRIVATE_CREDENTIAL, {
credentialName: 'seed_phrase',
shouldUpdateNav: true,
keyringId,
});
Expand Down
Loading
Loading