-
+
+
+ {t("Pin Freighter to the toolbar")}
- )}
-
- {
- emitMetric(METRIC_NAMES.recoverAccountFinished);
- if (isChrome()) {
- navigateTo(ROUTES.pinExtension);
- } else {
- window.close();
- }
- }}
- >
- {t("I have my recovery phrase safe")}
-
-
- >
- );
-};
-
-export const FullscreenSuccessMessage = () => {
- const location = useLocation();
- const { t } = useTranslation();
-
- const IS_MNEMONIC_PHRASE_STATE =
- location.pathname === ROUTES.mnemonicPhraseConfirmed;
-
- return (
-
-
-
-
-
- {t("Wallet created successfully!")}
-
-
- {IS_MNEMONIC_PHRASE_STATE ? (
-
- ) : (
-
- )}
+
+
+
+
+
+
+ {t("Freighter - Stellar Wallet")}
+
+
+
-
+
+
+
+
+
+
+
+ {t(
+ "To access your wallet, click Freighter from your browser Extensions browser menu.",
+ )}
+
+
+ }
+ >
+
+
+
+
+
+
+ {t(
+ "Always check the domain of websites you're using Freighter with",
+ )}
+
+
+
+
+
+
+
+ {t(
+ "Freighter cannot recover your account if you lose your recovery phrase, so keep it safe",
+ )}
+
+
+
+
+
+
-
+ >
);
};
diff --git a/extension/src/popup/views/FullscreenSuccessMessage/styles.scss b/extension/src/popup/views/FullscreenSuccessMessage/styles.scss
index 6fad6cbd35..2728225fb0 100644
--- a/extension/src/popup/views/FullscreenSuccessMessage/styles.scss
+++ b/extension/src/popup/views/FullscreenSuccessMessage/styles.scss
@@ -1,3 +1,5 @@
+@use "../../styles/utils.scss" as *;
+
.InfoBlock {
&__header {
color: var(--sds-clr-gray-12);
@@ -27,6 +29,93 @@
}
.FullscreenSuccessMessage {
+ display: flex;
+ height: 100%;
+ align-items: center;
+
+ &__pin {
+ background: var(--sds-clr-gray-03);
+ border-radius: #{pxToRem(12px)};
+ display: flex;
+ flex-direction: column;
+ gap: #{pxToRem(16px)};
+ padding: #{pxToRem(16px)};
+ position: absolute;
+ z-index: var(--z-index-tooltip);
+ width: #{pxToRem(336px)};
+ top: #{pxToRem(24px)};
+ right: #{pxToRem(24px)};
+
+ &__row {
+ display: flex;
+ line-height: #{pxToRem(24px)};
+
+ &:nth-child(2) {
+ gap: #{pxToRem(8px)};
+ }
+
+ &:nth-child(3) {
+ border-radius: #{pxToRem(8px)};
+ align-items: center;
+ background: var(--sds-clr-gray-04);
+ gap: #{pxToRem(12px)};
+ padding: #{pxToRem(8px)};
+ }
+
+ &__gradient {
+ background: linear-gradient(
+ 90deg,
+ var(--sds-clr-gray-03) 0%,
+ var(--sds-clr-gray-04) 49.96%
+ );
+ border-top-right-radius: #{pxToRem(16px)};
+ border-bottom-right-radius: #{pxToRem(16px)};
+ width: #{pxToRem(264px)};
+ height: #{pxToRem(32px)};
+ }
+
+ &__toolbar {
+ align-items: center;
+ display: flex;
+ border: 1px solid var(--sds-clr-gray-06);
+ border-radius: #{pxToRem(16px)};
+ justify-content: center;
+ width: #{pxToRem(32px)};
+ height: #{pxToRem(32px)};
+
+ svg {
+ width: #{pxToRem(20px)};
+ height: #{pxToRem(20px)};
+ }
+ }
+
+ &__logo {
+ display: flex;
+ align-items: center;
+ img {
+ width: #{pxToRem(24px)};
+ height: #{pxToRem(24px)};
+ }
+ }
+
+ &__text {
+ flex: 1 0 0;
+ }
+
+ &__pin-icon {
+ display: flex;
+
+ svg {
+ fill: var(--sds-clr-navy-09);
+ stroke: var(--sds-clr-navy-09);
+ }
+ }
+ }
+ }
+
+ &__text {
+ color: var(--sds-clr-gray-12);
+ }
&__wrapper {
display: flex;
flex-flow: column wrap;
@@ -46,45 +135,44 @@
}
&__infoBlock {
- margin-bottom: 0.5rem;
-
- &__list {
- list-style: inside;
-
- ::before {
- content: none !important;
+ display: flex;
+ flex-direction: column;
+ gap: #{pxToRem(12px)};
+
+ &__row {
+ display: flex;
+ gap: #{pxToRem(12px)};
+
+ &__icon {
+ align-items: center;
+ background: var(--sds-clr-gray-01);
+ border-radius: #{pxToRem(100px)};
+ border: 1px solid var(--sds-clr-gray-06);
+ display: flex;
+ height: #{pxToRem(24px)};
+ justify-content: center;
+ padding: #{pxToRem(4px)};
+ width: #{pxToRem(24px)};
+
+ svg {
+ width: #{pxToRem(16px)};
+ }
}
- li:not(:last-of-type) {
- margin-bottom: 1rem;
+ &__text {
+ color: var(--sds-clr-gray-11);
}
- }
- }
- &__illo-container {
- position: relative;
- }
-
- &__success-image {
- height: 4.25rem;
- }
-
- &__extension-image {
- height: 3.5rem;
- margin-top: 0.5rem;
- }
-
- &__copy {
- font-size: 1rem;
- line-height: 1.5rem;
- font-weight: var(--font-weight-regular);
- margin-bottom: 1.5rem;
-
- p {
- color: var(--sds-clr-gray-12) !important;
+ &:nth-child(1) {
+ svg {
+ stroke: var(--sds-clr-mint-09);
+ }
+ }
- strong {
- color: var(--sds-clr-gray-12) !important;
+ &:nth-child(2) {
+ svg {
+ stroke: var(--sds-clr-lime-09);
+ }
}
}
}
diff --git a/extension/src/popup/views/MnemonicPhrase.tsx b/extension/src/popup/views/MnemonicPhrase.tsx
deleted file mode 100644
index ed0c69f2d7..0000000000
--- a/extension/src/popup/views/MnemonicPhrase.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import React, { useState } from "react";
-import { useSelector } from "react-redux";
-import shuffle from "lodash/shuffle";
-import { Redirect } from "react-router-dom";
-
-import { APPLICATION_STATE } from "@shared/constants/applicationState";
-
-import { ROUTES } from "popup/constants/routes";
-import { Onboarding } from "popup/components/Onboarding";
-import { ConfirmMnemonicPhrase } from "popup/components/mnemonicPhrase/ConfirmMnemonicPhrase";
-import { DisplayMnemonicPhrase } from "popup/components/mnemonicPhrase/DisplayMnemonicPhrase";
-import { applicationStateSelector } from "popup/ducks/accountServices";
-import { View } from "popup/basics/layout/View";
-
-interface MnemonicPhraseProps {
- mnemonicPhrase: string;
-}
-
-export const MnemonicPhrase = ({
- mnemonicPhrase = "",
-}: MnemonicPhraseProps) => {
- const applicationState = useSelector(applicationStateSelector);
- const [isConfirmed, setIsConfirmed] = useState(false);
-
- if (applicationState === APPLICATION_STATE.MNEMONIC_PHRASE_CONFIRMED) {
- return
;
- }
-
- if (mnemonicPhrase) {
- return isConfirmed ? (
-
-
-
-
- setIsConfirmed(false)}
- hasGoBackBtn
- />
-
-
-
- ) : (
-
-
-
-
-
-
-
-
- );
- }
-
- return null;
-};
diff --git a/extension/src/popup/views/MnemonicPhrase/index.tsx b/extension/src/popup/views/MnemonicPhrase/index.tsx
new file mode 100644
index 0000000000..7f2587b034
--- /dev/null
+++ b/extension/src/popup/views/MnemonicPhrase/index.tsx
@@ -0,0 +1,156 @@
+import React, { useState } from "react";
+import { useSelector, useDispatch } from "react-redux";
+import { Redirect } from "react-router-dom";
+import { useTranslation } from "react-i18next";
+import { Button, Text, Icon } from "@stellar/design-system";
+
+import { APPLICATION_STATE } from "@shared/constants/applicationState";
+
+import { ROUTES } from "popup/constants/routes";
+import { Onboarding, OnboardingModal } from "popup/components/Onboarding";
+import { ConfirmMnemonicPhrase } from "popup/components/mnemonicPhrase/ConfirmMnemonicPhrase";
+import { DisplayMnemonicPhrase } from "popup/components/mnemonicPhrase/DisplayMnemonicPhrase";
+import {
+ applicationStateSelector,
+ confirmMnemonicPhrase,
+} from "popup/ducks/accountServices";
+import { View } from "popup/basics/layout/View";
+
+import "./styles.scss";
+
+interface MnemonicPhraseProps {
+ mnemonicPhrase: string;
+}
+
+export const MnemonicPhrase = ({
+ mnemonicPhrase = "",
+}: MnemonicPhraseProps) => {
+ const { t } = useTranslation();
+ const applicationState = useSelector(applicationStateSelector);
+ const [isConfirmed, setIsConfirmed] = useState(false);
+ const [isModalShowing, setIsModalShowing] = useState(true);
+ const dispatch = useDispatch();
+
+ const handleSkip = () => {
+ // confirm the mnemonic phrase for the user
+
+ dispatch(confirmMnemonicPhrase(mnemonicPhrase));
+ };
+
+ if (applicationState === APPLICATION_STATE.MNEMONIC_PHRASE_CONFIRMED) {
+ return
;
+ }
+
+ if (mnemonicPhrase) {
+ if (isModalShowing) {
+ return (
+
+
+
+ {t(
+ "Your recovery phrase gives you access to your account and is the only way to access it in a new browser. ",
+ )}
+
+ {t("Keep it in a safe place.")}
+
+
+
+ {t(
+ "For your security, we'll check if you got it right in the next step.",
+ )}
+
+ >
+ }
+ >
+
+
+
+
+
+
+ {t(
+ "Your recovery phrase gives you full access to your wallets and funds",
+ )}
+
+
+
+
+
+
+
+ {t(
+ "If you forget your password, you can use the recovery phrase to access your wallet",
+ )}
+
+
+
+
+
+
+
+ {t("NEVER share this phrase with anyone")}
+
+
+
+
+
+
+
+ {t(
+ "No one from Stellar Development Foundation will ever ask for your recovery phrase",
+ )}
+
+
+
+
+ setIsModalShowing(false)}
+ >
+ {t("Show recovery phrase")}
+
+
+ {t("Do this later")}
+
+
+
+
+ );
+ }
+ return isConfirmed ? (
+
+
+
+
+
+
+
+ ) : (
+
+
+
+
+
+
+
+ );
+ }
+
+ return null;
+};
diff --git a/extension/src/popup/views/MnemonicPhrase/styles.scss b/extension/src/popup/views/MnemonicPhrase/styles.scss
new file mode 100644
index 0000000000..34fc025c3f
--- /dev/null
+++ b/extension/src/popup/views/MnemonicPhrase/styles.scss
@@ -0,0 +1,81 @@
+@use "../../styles/utils.scss" as *;
+
+.MnemonicPhrase {
+ &__view {
+ &__wrapper {
+ display: flex;
+ height: 100%;
+ align-items: center;
+ }
+ }
+
+ &__modal {
+ &__text {
+ &--highlight {
+ color: var(--sds-clr-gray-12);
+ }
+ }
+
+ &__rows {
+ display: flex;
+ flex-direction: column;
+ gap: #{pxToRem(12px)};
+ margin-bottom: #{pxToRem(32px)};
+ }
+
+ &__row {
+ display: flex;
+ gap: #{pxToRem(12px)};
+
+ &:nth-child(1) {
+ svg {
+ stroke: var(--sds-clr-lime-09);
+ }
+ }
+
+ &:nth-child(2) {
+ svg {
+ stroke: var(--sds-clr-gold-09);
+ }
+ }
+
+ &:nth-child(3) {
+ svg {
+ stroke: var(--sds-clr-pink-09);
+ }
+ }
+
+ &:nth-child(4) {
+ svg {
+ stroke: var(--sds-clr-navy-09);
+ }
+ }
+
+ &__icon {
+ align-items: center;
+ background: var(--sds-clr-gray-01);
+ border-radius: #{pxToRem(100px)};
+ border: 1px solid var(--sds-clr-gray-06);
+ display: flex;
+ height: #{pxToRem(32px)};
+ justify-content: center;
+ padding: #{pxToRem(6px)};
+ width: #{pxToRem(32px)};
+
+ svg {
+ width: #{pxToRem(20px)};
+ }
+ }
+
+ &__text {
+ line-height: #{pxToRem(24px)};
+ }
+ }
+
+ &__footer {
+ display: flex;
+ flex-direction: column;
+ gap: #{pxToRem(12px)};
+ }
+ }
+}
diff --git a/extension/src/popup/views/PinExtension/index.tsx b/extension/src/popup/views/PinExtension/index.tsx
deleted file mode 100644
index eadd5e76c8..0000000000
--- a/extension/src/popup/views/PinExtension/index.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-import React from "react";
-import { useTranslation } from "react-i18next";
-import { Button, Icon } from "@stellar/design-system";
-
-import ExtensionsPin from "popup/assets/illo-pin-extension.svg";
-import { SubmitButtonWrapper } from "popup/basics/Forms";
-import { Onboarding, OnboardingHeader } from "popup/components/Onboarding";
-
-import "./styles.scss";
-import { View } from "popup/basics/layout/View";
-
-export const PinExtension = () => {
- const { t } = useTranslation();
-
- return (
-
-
-
-
-
- {t("Your Freighter install is complete")}
-
-
-
-
-
- 1.{" "}
- {t(
- "Click on the extensions button at the top of your browser’s bar",
- )}
-
-
- 2.{" "}
- {t(
- "Click on Freighter’s pin button to have it always visible",
- )}
-
-
-
-
-
-
- {
- window.close();
- }}
- icon={ }
- iconPosition="right"
- >
- Done, I’m ready to go!
-
-
-
-
-
-
-
- );
-};
diff --git a/extension/src/popup/views/PinExtension/styles.scss b/extension/src/popup/views/PinExtension/styles.scss
deleted file mode 100644
index 25cf251268..0000000000
--- a/extension/src/popup/views/PinExtension/styles.scss
+++ /dev/null
@@ -1,28 +0,0 @@
-.PinExtension {
- width: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
-
- &__wrapper {
- max-width: 31rem;
- }
-
- &__caption {
- line-height: 1.5rem;
- margin-bottom: 2rem;
- color: var(--sds-clr-gray-12);
-
- div:not(:last-child) {
- margin-bottom: 0.4rem;
- }
- }
-
- &__img {
- margin-bottom: 2rem;
-
- img {
- width: 100%;
- }
- }
-}
diff --git a/extension/src/popup/views/Preferences/index.tsx b/extension/src/popup/views/Preferences/index.tsx
index db15afc3e5..261f199735 100644
--- a/extension/src/popup/views/Preferences/index.tsx
+++ b/extension/src/popup/views/Preferences/index.tsx
@@ -36,7 +36,6 @@ export const Preferences = () => {
isDataSharingAllowedValue,
isHideDustEnabledValue,
} = formValue;
- console.log(formValue);
// eslint-disable-next-line
await dispatch(
diff --git a/extension/src/popup/views/Welcome/index.tsx b/extension/src/popup/views/Welcome/index.tsx
index cc3cbc5b31..6825c4bb5c 100644
--- a/extension/src/popup/views/Welcome/index.tsx
+++ b/extension/src/popup/views/Welcome/index.tsx
@@ -1,11 +1,13 @@
import React from "react";
-import { Button, Card, Heading } from "@stellar/design-system";
+import { Button, Heading } from "@stellar/design-system";
import { useTranslation } from "react-i18next";
import { ROUTES } from "popup/constants/routes";
import { navigateTo } from "popup/helpers/navigate";
import { View } from "popup/basics/layout/View";
+import LogoWelcome from "popup/assets/logo-freighter-welcome.svg";
+
import "./styles.scss";
export const Welcome = () => {
@@ -13,54 +15,48 @@ export const Welcome = () => {
return (
-
-
- {t("Welcome! Is this your first time using Freighter?")}
-
-
-
-
-
- {t("I’m new!")}
-
- {t("I’m going to need a seed phrase")}
-
-
- navigateTo(ROUTES.accountCreator)}
- >
- {t("Create Wallet")}
-
-
-
+
+
+
+ {t("Welcome to Freighter")}
+
+
+ {t("Your favorite Stellar wallet")}
+
-
-
-
- {t("I’ve done this before")}
-
-
- {t("I have my 12 word seed phrase")}
-
-
- navigateTo(ROUTES.recoverAccount)}
- >
- {t("Import Wallet")}
-
-
-
+
+ {t("How do you want to get started?")}
+
+ navigateTo(ROUTES.accountCreator)}
+ >
+ {t("Create new wallet")}
+
+ navigateTo(ROUTES.recoverAccount)}
+ >
+ {t("Import wallet")}
+
+
diff --git a/extension/src/popup/views/Welcome/styles.scss b/extension/src/popup/views/Welcome/styles.scss
index 02dfb8cf1f..5b3ffad8b7 100644
--- a/extension/src/popup/views/Welcome/styles.scss
+++ b/extension/src/popup/views/Welcome/styles.scss
@@ -1,10 +1,6 @@
-.Welcome {
- &__button-container {
- display: flex;
- justify-content: space-around;
- padding-top: 1rem;
- }
+@use "../../styles/utils.scss" as *;
+.Welcome {
&__column {
display: flex;
flex-direction: column;
@@ -13,7 +9,6 @@
justify-content: center;
.Heading {
- margin-bottom: 2.5rem !important;
max-width: 30rem;
text-align: center;
}
@@ -24,42 +19,26 @@
justify-content: space-between;
flex-direction: column;
align-items: center;
+ gap: 2rem;
+ margin-bottom: 1.5rem;
}
&__heading {
- &--small {
- color: var(--sds-clr-gray-12);
- font-size: 1.125rem;
- font-weight: var(--font-weight-medium);
- margin-bottom: 0.75rem;
+ font-size: #{pxToRem(40px)};
+ line-height: #{pxToRem(48px)} !important;
+
+ &--subheading {
+ color: var(--sds-clr-gray-11);
}
}
- &__row-screen {
- display: flex;
- justify-content: center;
- gap: 1rem;
- flex-wrap: wrap;
+ &__cta {
+ color: var(--sds-clr-gray-11);
}
- &__half-screen {
- position: relative;
+ &__row-screen {
display: flex;
- flex-direction: column;
justify-content: center;
- padding: 0;
- width: 24rem;
- }
-
- &__import {
- .Card--default {
- background: var(--sds-clr-gray-01);
- }
- }
-
- &__text {
- font-size: 1rem;
- line-height: 1.5rem;
- margin-bottom: 2rem;
+ gap: 0.75rem;
}
}
diff --git a/extension/src/popup/views/__tests__/MnemonicPhrase.test.tsx b/extension/src/popup/views/__tests__/MnemonicPhrase.test.tsx
index db8ca3c53e..85b82b642b 100644
--- a/extension/src/popup/views/__tests__/MnemonicPhrase.test.tsx
+++ b/extension/src/popup/views/__tests__/MnemonicPhrase.test.tsx
@@ -113,7 +113,6 @@ describe.skip("MnemonicPhrase", () => {
screen.getByTestId("display-mnemonic-phrase-confirm-btn"),
);
});
- await waitFor(() => screen.getByText(`redirect ${ROUTES.pinExtension}`));
});
});
});