Skip to content

Commit f1fa829

Browse files
committed
fix: replaced getPlatform with getBrowserName
1 parent a6191b4 commit f1fa829

File tree

4 files changed

+2
-20
lines changed

4 files changed

+2
-20
lines changed

ui/components/app/srp-input-import/srp-input-import.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ import {
2424
TextVariant,
2525
} from '../../../helpers/constants/design-system';
2626
import { PLATFORM_FIREFOX } from '../../../../shared/constants/app';
27-
// eslint-disable-next-line import/no-restricted-paths
28-
import { getPlatform } from '../../../../app/scripts/lib/util';
27+
import { getBrowserName } from '../../../../shared/modules/browser-runtime.utils';
2928
import { parseSecretRecoveryPhrase } from './parse-secret-recovery-phrase';
3029

3130
const SRP_LENGTHS = [12, 15, 18, 21, 24];
@@ -187,7 +186,7 @@ export default function SrpInputImport({ onChange }: SrpInputImportProps) {
187186
);
188187

189188
const onTriggerPaste = async () => {
190-
if (getPlatform() === PLATFORM_FIREFOX) {
189+
if (getBrowserName() === PLATFORM_FIREFOX) {
191190
const newSrp = await navigator.clipboard.readText();
192191
if (newSrp.trim().match(/\s/u)) {
193192
onSrpPaste(newSrp);

ui/pages/onboarding-flow/create-password/create-password.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ export default function CreatePassword({
7878
useEffect(() => {
7979
if (currentKeyring && !newAccountCreationInProgress) {
8080
if (firstTimeFlowType === FirstTimeFlowType.import) {
81-
// SOCIAL: change to metametrics when social login is available
8281
history.replace(ONBOARDING_COMPLETION_ROUTE);
8382
} else {
8483
history.replace(ONBOARDING_SECURE_YOUR_WALLET_ROUTE);
@@ -109,10 +108,6 @@ export default function CreatePassword({
109108
firstTimeFlowType === FirstTimeFlowType.import
110109
) {
111110
await importWithRecoveryPhrase(password, secretRecoveryPhrase);
112-
// getBrowserName() === PLATFORM_FIREFOX
113-
// ? history.push(ONBOARDING_COMPLETION_ROUTE)
114-
// : history.push(ONBOARDING_METAMETRICS);
115-
// SOCIAL: change to metametrics when social login is available
116111
history.push(ONBOARDING_COMPLETION_ROUTE);
117112
} else {
118113
// Otherwise we are in create new wallet flow
@@ -122,8 +117,6 @@ export default function CreatePassword({
122117
await createNewAccount(password);
123118
}
124119
if (firstTimeFlowType === FirstTimeFlowType.social) {
125-
// history.push(ONBOARDING_METAMETRICS);
126-
// SOCIAL: change to metametrics when social login is available
127120
history.push(ONBOARDING_COMPLETION_ROUTE);
128121
} else {
129122
history.push(ONBOARDING_SECURE_YOUR_WALLET_ROUTE);

ui/pages/onboarding-flow/recovery-phrase/confirm-recovery-phrase.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,6 @@ export default function ConfirmRecoveryPhrase({ secretRecoveryPhrase = '' }) {
113113
},
114114
});
115115

116-
// getPlatform() === PLATFORM_FIREFOX
117-
// ? history.push(ONBOARDING_COMPLETION_ROUTE)
118-
// : history.push(ONBOARDING_METAMETRICS);
119-
// SOCIAL: change metametrics flow on later PR
120116
history.push(ONBOARDING_COMPLETION_ROUTE);
121117
}, [dispatch, hdEntropyIndex, history, trackEvent]);
122118

ui/pages/onboarding-flow/secure-your-wallet/skip-srp-backup-popover.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ export default function SkipSRPBackup({
5959
},
6060
});
6161

62-
// if (getBrowserName() === PLATFORM_FIREFOX) {
63-
// history.push(ONBOARDING_COMPLETION_ROUTE);
64-
// } else {
65-
// history.push(ONBOARDING_METAMETRICS);
66-
// }
67-
// SOCIAL: change metametrics flow on later PR
6862
history.push(ONBOARDING_COMPLETION_ROUTE);
6963
}, [dispatch, hdEntropyIndex, history, trackEvent]);
7064

0 commit comments

Comments
 (0)