diff --git a/web/cashtab/src/components/Home/__tests__/__snapshots__/Home.test.js.snap b/web/cashtab/src/components/Home/__tests__/__snapshots__/Home.test.js.snap
index c7e9f4bc0..bbe99b51d 100644
--- a/web/cashtab/src/components/Home/__tests__/__snapshots__/Home.test.js.snap
+++ b/web/cashtab/src/components/Home/__tests__/__snapshots__/Home.test.js.snap
@@ -1,633 +1,621 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP @generated
+// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Wallet with BCH balances 1`] = `
Array [
,
🎉
Congratulations on your new wallet!
🎉
Start using the wallet immediately to receive
XEC
payments, or load it up with
XEC
to send to others
Create eToken
Tokens sent to your
eToken
address will appear here
,
]
`;
exports[`Wallet with BCH balances and tokens 1`] = `
Array [
,
🎉
Congratulations on your new wallet!
🎉
Start using the wallet immediately to receive
XEC
payments, or load it up with
XEC
to send to others
Create eToken
Tokens sent to your
eToken
address will appear here
,
]
`;
exports[`Wallet with BCH balances and tokens and state field 1`] = `
Array [
,
🎉
Congratulations on your new wallet!
🎉
Start using the wallet immediately to receive
XEC
payments, or load it up with
XEC
to send to others
,
]
`;
exports[`Wallet without BCH balance 1`] = `
Array [
,
🎉
Congratulations on your new wallet!
🎉
Start using the wallet immediately to receive
XEC
payments, or load it up with
XEC
to send to others
Create eToken
Tokens sent to your
eToken
address will appear here
,
]
`;
exports[`Without wallet defined 1`] = `
`;
diff --git a/web/cashtab/src/components/OnBoarding/OnBoarding.js b/web/cashtab/src/components/OnBoarding/OnBoarding.js
index c0598ec3a..7994cc85a 100644
--- a/web/cashtab/src/components/OnBoarding/OnBoarding.js
+++ b/web/cashtab/src/components/OnBoarding/OnBoarding.js
@@ -1,170 +1,160 @@
import React, { useState } from 'react';
import styled from 'styled-components';
import { WalletContext } from 'utils/context';
import { Input, Form, Modal } from 'antd';
import { AntdFormWrapper } from 'components/Common/EnhancedInputs';
import {
ExclamationCircleOutlined,
PlusSquareOutlined,
ImportOutlined,
LockOutlined,
} from '@ant-design/icons';
import PrimaryButton, {
SecondaryButton,
SmartButton,
} from 'components/Common/PrimaryButton';
import { currency } from 'components/Common/Ticker.js';
import { Event } from 'utils/GoogleAnalytics';
import { validateMnemonic } from 'utils/validation';
export const WelcomeCtn = styled.div`
margin-top: 20px;
padding: 0px 30px;
color: ${props => props.theme.contrast};
h2 {
color: ${props => props.theme.contrast};
}
`;
export const WelcomeText = styled.p`
width: 100%;
font-size: 16px;
margin-bottom: 60px;
text-align: left;
`;
export const WelcomeLink = styled.a`
text-decoration: underline;
color: ${props => props.theme.eCashBlue};
:hover {
color: ${props => props.theme.eCashPurple} !important;
text-decoration: underline !important;
}
`;
const OnBoarding = () => {
const ContextValue = React.useContext(WalletContext);
const { createWallet } = ContextValue;
const [formData, setFormData] = useState({
dirty: true,
mnemonic: '',
});
const [seedInput, openSeedInput] = useState(false);
const [isValidMnemonic, setIsValidMnemonic] = useState(false);
const { confirm } = Modal;
async function submit() {
setFormData({
...formData,
dirty: false,
});
if (!formData.mnemonic) {
return;
}
// Event("Category", "Action", "Label")
// Track number of created wallets from onboarding
Event('Onboarding.js', 'Create Wallet', 'Imported');
createWallet(formData.mnemonic);
}
const handleChange = e => {
const { value, name } = e.target;
// Validate mnemonic on change
// Import button should be disabled unless mnemonic is valid
setIsValidMnemonic(validateMnemonic(value));
setFormData(p => ({ ...p, [name]: value }));
};
function showBackupConfirmModal() {
confirm({
title: "Don't forget to back up your wallet",
icon: ,
cancelButtonProps: { style: { display: 'none' } },
content: `Once your wallet is created you can back it up by writing down your 12-word seed. You can find your seed on the Settings page. If you are browsing in Incognito mode or if you clear your browser history, you will lose any funds that are not backed up!`,
okText: 'Okay, make me a wallet!',
onOk() {
// Event("Category", "Action", "Label")
// Track number of created wallets from onboarding
Event('Onboarding.js', 'Create Wallet', 'New');
createWallet();
},
});
}
return (
Welcome to Cashtab!
Cashtab is an{' '}
open source,
{' '}
non-custodial web wallet for {currency.name}.
-
-
- Want to learn more?{' '}
-
- Check out the Cashtab documentation.
-
showBackupConfirmModal()}>
New Wallet
openSeedInput(!seedInput)}>
Import Wallet
{seedInput && (
}
type="email"
placeholder="mnemonic (seed phrase)"
name="mnemonic"
autoComplete="off"
onChange={e => handleChange(e)}
required
title=""
/>
submit()}
>
Import
)}
);
};
export default OnBoarding;
diff --git a/web/cashtab/src/components/Receive/__tests__/__snapshots__/Receive.test.js.snap b/web/cashtab/src/components/Receive/__tests__/__snapshots__/Receive.test.js.snap
index bb53c0674..e739bbcb4 100644
--- a/web/cashtab/src/components/Receive/__tests__/__snapshots__/Receive.test.js.snap
+++ b/web/cashtab/src/components/Receive/__tests__/__snapshots__/Receive.test.js.snap
@@ -1,935 +1,923 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP @generated
+// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Wallet with BCH balances 1`] = `
You currently have 0
XEC
Deposit some funds to use this feature
Cashtab now supports receiving eTokens at your eCash address
`;
exports[`Wallet with BCH balances and tokens 1`] = `
You currently have 0
XEC
Deposit some funds to use this feature
Cashtab now supports receiving eTokens at your eCash address
`;
exports[`Wallet with BCH balances and tokens and state field 1`] = `
Cashtab now supports receiving eTokens at your eCash address
`;
exports[`Wallet without BCH balance 1`] = `
You currently have 0
XEC
Deposit some funds to use this feature
Cashtab now supports receiving eTokens at your eCash address
`;
exports[`Without wallet defined 1`] = `
`;