From dd7313b77cc0499ed5eba4f24ecfa60f53e8ccde Mon Sep 17 00:00:00 2001
From: Imamah-Zafar <88320460+Imamah-Zafar@users.noreply.github.com>
Date: Wed, 30 Nov 2022 12:23:31 +0500
Subject: [PATCH 1/2] change gateway and fix onboarding ui
---
src/app/routes/index.tsx | 2 +-
src/app/screens/createPassword/index.tsx | 2 +-
src/app/screens/createWalletSuccess/index.tsx | 7 ++++---
src/app/screens/legalLinks/index.tsx | 21 ++++++++++++++-----
src/app/screens/restoreWallet/index.tsx | 2 +-
src/app/utils/helper.ts | 7 ++-----
src/locales/en.json | 4 +++-
src/theme/index.ts | 7 +++++++
8 files changed, 35 insertions(+), 17 deletions(-)
diff --git a/src/app/routes/index.tsx b/src/app/routes/index.tsx
index e22360ed8..cb6bf8e93 100644
--- a/src/app/routes/index.tsx
+++ b/src/app/routes/index.tsx
@@ -106,7 +106,7 @@ const router = createHashRouter([
element: ,
},
{
- path: 'create-wallet-success',
+ path: 'wallet-success/:action',
element: ,
},
{
diff --git a/src/app/screens/createPassword/index.tsx b/src/app/screens/createPassword/index.tsx
index facb62283..d4a3eded5 100644
--- a/src/app/screens/createPassword/index.tsx
+++ b/src/app/screens/createPassword/index.tsx
@@ -63,7 +63,7 @@ function CreatePassword(): JSX.Element {
if (confirmPassword === password) {
const encryptedSeed = await encryptSeedPhrase(seedPhrase, password);
dispatch(storeEncryptedSeedAction(encryptedSeed));
- navigate('/create-wallet-success');
+ navigate('/wallet-success/create');
}
} catch (err) {
setError(t('CONFIRM_PASSWORD_MATCH_ERROR'));
diff --git a/src/app/screens/createWalletSuccess/index.tsx b/src/app/screens/createWalletSuccess/index.tsx
index c4a643dfd..0924f88f2 100644
--- a/src/app/screens/createWalletSuccess/index.tsx
+++ b/src/app/screens/createWalletSuccess/index.tsx
@@ -4,6 +4,7 @@ import Pin from '@assets/img/createWalletSuccess/pin.svg';
import Logo from '@assets/img/createWalletSuccess/logo.svg';
import { useTranslation } from 'react-i18next';
import styled from 'styled-components';
+import { useParams } from 'react-router-dom';
const InstructionsContainer = styled.div((props) => ({
display: 'flex',
@@ -72,7 +73,7 @@ const ContinueButton = styled.button((props) => ({
function CreateWalletSuccess(): JSX.Element {
const { t } = useTranslation('translation', { keyPrefix: 'WALLET_SUCCESS_SCREEN' });
-
+ const { action } = useParams();
const handleOpenWallet = () => {
window.close();
};
@@ -81,8 +82,8 @@ function CreateWalletSuccess(): JSX.Element {
<>
- {t('SCREEN_TITLE')}
- {t('SCREEN_SUBTITLE')}
+ {action === 'restore' ? t('RESTORE_SCREEN_TITLE') : t('SCREEN_TITLE')}
+ {action === 'restore' ? t('RESTORE_SCREEN_SUBTITLE') : t('SCREEN_SUBTITLE')}
{t('CLOSE_TAB')}
diff --git a/src/app/screens/legalLinks/index.tsx b/src/app/screens/legalLinks/index.tsx
index ac643cd42..b610cb7fc 100644
--- a/src/app/screens/legalLinks/index.tsx
+++ b/src/app/screens/legalLinks/index.tsx
@@ -3,6 +3,7 @@ import styled from 'styled-components';
import LinkIcon from '@assets/img/linkIcon.svg';
import { useNavigate } from 'react-router-dom';
import { saveIsTermsAccepted } from '@utils/localStorage';
+import Seperator from '@components/seperator';
import { PRIVACY_POLICY_LINK, TERMS_LINK } from '@utils/constants';
const Container = styled.div((props) => ({
@@ -15,7 +16,7 @@ const Container = styled.div((props) => ({
}));
const Title = styled.h1((props) => ({
- ...props.theme.tile_text,
+ ...props.theme.bold_tile_text,
color: props.theme.colors.white['0'],
marginTop: props.theme.spacing(20),
}));
@@ -34,6 +35,15 @@ const ActionButton = styled.a((props) => ({
color: props.theme.colors.white['0'],
}));
+const CustomisedActionButton = styled(ActionButton)`
+ :hover {
+ opacity: 0.8;
+ }
+ :active {
+ opacity: 1;
+ }
+`;
+
const ActionButtonsContainer = styled.div((props) => ({
marginTop: props.theme.spacing(20),
}));
@@ -71,14 +81,15 @@ function LegalLinks() {
{t('SCREEN_TITLE')}
{t('SCREEN_SUBTITLE')}
-
+
{t('TERMS_SERVICES_LINK_BUTTON')}
-
-
+
+
+
{t('PRIVACY_POLICY_LINK_BUTTON')}
-
+
{t('ACCEPT_LEGAL_BUTTON')}
diff --git a/src/app/screens/restoreWallet/index.tsx b/src/app/screens/restoreWallet/index.tsx
index 4c1fa6bf8..e2eacc443 100644
--- a/src/app/screens/restoreWallet/index.tsx
+++ b/src/app/screens/restoreWallet/index.tsx
@@ -74,7 +74,7 @@ function RestoreWallet(): JSX.Element {
setError('');
const seed = cleanMnemonic(seedPhrase);
await restoreWallet(seed, password);
- navigate('/create-wallet-success');
+ navigate('/wallet-success/restore');
} else {
setError(t('CREATE_PASSWORD_SCREEN.CONFIRM_PASSWORD_MATCH_ERROR'));
}
diff --git a/src/app/utils/helper.ts b/src/app/utils/helper.ts
index fa4f52bc9..e0aca325a 100644
--- a/src/app/utils/helper.ts
+++ b/src/app/utils/helper.ts
@@ -1,10 +1,7 @@
-import { FungibleToken, Account, StxMempoolTransactionData } from '@secretkeylabs/xverse-core/types';
+import { Account, StxMempoolTransactionData } from '@secretkeylabs/xverse-core/types';
import { NftData } from '@secretkeylabs/xverse-core/types/api/stacks/assets';
import { getStacksInfo } from '@secretkeylabs/xverse-core/api';
import BigNumber from 'bignumber.js';
-import {
- btcToSats, getBtcFiatEquivalent, getStxFiatEquivalent, stxToMicrostacks,
-} from '@secretkeylabs/xverse-core';
const validUrl = require('valid-url');
@@ -69,7 +66,7 @@ export function getExplorerUrl(stxAddress: string): string {
}
export function getFetchableUrl(uri: string, protocol: string): string | undefined {
- const publicIpfs = 'https://ipfs.io/ipfs';
+ const publicIpfs = 'https:/cf-ipfs.com/ipfs';
if (protocol === 'http') return uri;
if (protocol === 'ipfs') {
const url = uri.split('//');
diff --git a/src/locales/en.json b/src/locales/en.json
index 28414342b..89fd7cfdf 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -155,7 +155,9 @@
"CLOSE_TAB": "Close this tab",
"CLICK": "Click",
"THEN": "then",
- "OPEN_WALLET":"to open your wallet"
+ "OPEN_WALLET":"to open your wallet",
+ "RESTORE_SCREEN_TITLE": "Wallet restored",
+ "RESTORE_SCREEN_SUBTITLE": "Your wallet has been successfully restored, you can now log in to it."
},
"LOGIN_SCREEN": {
"WELCOME_MESSAGE_FIRST_LOGIN": "Welcome!",
diff --git a/src/theme/index.ts b/src/theme/index.ts
index dfebbd4a5..4c2966443 100644
--- a/src/theme/index.ts
+++ b/src/theme/index.ts
@@ -97,6 +97,13 @@ const Theme = {
fontSize: 18,
letterSpacing: 0.02,
},
+ bold_tile_text: {
+ fontFamily: 'Satoshi-Bold',
+ fontStyle: 'normal',
+ fontWeight: '700',
+ fontSize: 18,
+ letterSpacing: 0.02,
+ },
headline_l: {
fontFamily: 'Satoshi-Bold',
fontStyle: 'normal',
From a303764c5e49ea4346e812bf9ca193f518ac2c12 Mon Sep 17 00:00:00 2001
From: Imamah-Zafar <88320460+Imamah-Zafar@users.noreply.github.com>
Date: Wed, 30 Nov 2022 13:01:21 +0500
Subject: [PATCH 2/2] update copy
---
src/app/utils/helper.ts | 2 +-
src/locales/en.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/utils/helper.ts b/src/app/utils/helper.ts
index e0aca325a..1f4f6fc1c 100644
--- a/src/app/utils/helper.ts
+++ b/src/app/utils/helper.ts
@@ -66,7 +66,7 @@ export function getExplorerUrl(stxAddress: string): string {
}
export function getFetchableUrl(uri: string, protocol: string): string | undefined {
- const publicIpfs = 'https:/cf-ipfs.com/ipfs';
+ const publicIpfs = 'https://cf-ipfs.com/ipfs';
if (protocol === 'http') return uri;
if (protocol === 'ipfs') {
const url = uri.split('//');
diff --git a/src/locales/en.json b/src/locales/en.json
index 89fd7cfdf..1aa3e42be 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -157,7 +157,7 @@
"THEN": "then",
"OPEN_WALLET":"to open your wallet",
"RESTORE_SCREEN_TITLE": "Wallet restored",
- "RESTORE_SCREEN_SUBTITLE": "Your wallet has been successfully restored, you can now log in to it."
+ "RESTORE_SCREEN_SUBTITLE": "Your wallet has been successfully restored."
},
"LOGIN_SCREEN": {
"WELCOME_MESSAGE_FIRST_LOGIN": "Welcome!",