Merge branch 'develop' into sitemap
This commit is contained in:
commit
226dbddb26
|
@ -1,53 +0,0 @@
|
||||||
@import 'common/sass/variables';
|
|
||||||
@import 'common/sass/mixins';
|
|
||||||
|
|
||||||
.AppAlpha {
|
|
||||||
@include cover-message;
|
|
||||||
background: color(brand-info);
|
|
||||||
left: $electron-sidebar-width - 1;
|
|
||||||
|
|
||||||
&-content {
|
|
||||||
h2 {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
text-align: justify;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-btn {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
max-width: 280px;
|
|
||||||
margin: 40px auto 0;
|
|
||||||
border: none;
|
|
||||||
padding: 0;
|
|
||||||
transition: $transition;
|
|
||||||
height: 60px;
|
|
||||||
line-height: 60px;
|
|
||||||
font-size: 22px;
|
|
||||||
background: #fff;
|
|
||||||
color: #333;
|
|
||||||
opacity: 0.96;
|
|
||||||
border-radius: 4px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fade out
|
|
||||||
&.is-fading {
|
|
||||||
pointer-events: none;
|
|
||||||
opacity: 0;
|
|
||||||
background: color(control-bg);
|
|
||||||
transition: all 500ms ease 400ms;
|
|
||||||
|
|
||||||
.AppAlpha-content {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(15px);
|
|
||||||
transition: all 500ms ease;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,73 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import moment from 'moment';
|
|
||||||
|
|
||||||
import { discordURL, APP_ALPHA_EXPIRATION } from 'config';
|
|
||||||
import { NewTabLink } from 'components/ui';
|
|
||||||
import './AlphaNotice.scss';
|
|
||||||
|
|
||||||
interface State {
|
|
||||||
isFading: boolean;
|
|
||||||
isClosed: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
let hasAcknowledged = false;
|
|
||||||
|
|
||||||
export default class AppAlphaNotice extends React.PureComponent<{}, State> {
|
|
||||||
public state = {
|
|
||||||
isFading: false,
|
|
||||||
isClosed: hasAcknowledged
|
|
||||||
};
|
|
||||||
|
|
||||||
public render() {
|
|
||||||
if (this.state.isClosed) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const isFading = this.state.isFading ? 'is-fading' : '';
|
|
||||||
const expDate = moment(APP_ALPHA_EXPIRATION).format('MMMM Do, YYYY');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={`AppAlpha ${isFading}`}>
|
|
||||||
<div className="AppAlpha-content">
|
|
||||||
<h2>Welcome to the MyCrypto Desktop App Alpha</h2>
|
|
||||||
<p>
|
|
||||||
Thank you for testing out the new MyCrypto desktop app. This is an early release to be
|
|
||||||
tested by the community before a full launch. We recommend continuing to use the
|
|
||||||
production site for large or otherwise important transactions.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Because this is for testing purposes only,{' '}
|
|
||||||
<strong>this build of the app will only be accessible until {expDate}</strong>. You’ll
|
|
||||||
then be required to update the application to continue using it.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Feedback and bug reports are greatly appreciated. You can file issues on our{' '}
|
|
||||||
<NewTabLink href="https://github.com/MyCryptoHQ/MyCrypto/issues">
|
|
||||||
GitHub repository
|
|
||||||
</NewTabLink>{' '}
|
|
||||||
or join our <NewTabLink href={discordURL}>Discord server</NewTabLink> to discuss the
|
|
||||||
app.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<b>
|
|
||||||
For critical reports & vulnerabilities, please use{' '}
|
|
||||||
<NewTabLink href="https://hackerone.com/MyCrypto">HackerOne</NewTabLink>.
|
|
||||||
</b>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<button className="AppAlpha-content-btn is-continue" onClick={this.doContinue}>
|
|
||||||
Continue to the Alpha
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private doContinue = () => {
|
|
||||||
hasAcknowledged = true;
|
|
||||||
this.setState({ isFading: true });
|
|
||||||
setTimeout(() => {
|
|
||||||
this.setState({ isClosed: true });
|
|
||||||
}, 1000);
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
@import 'common/sass/variables';
|
|
||||||
@import 'common/sass/mixins';
|
|
||||||
|
|
||||||
.AppExpired {
|
|
||||||
@include cover-message;
|
|
||||||
background: color(brand-danger);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
&-content {
|
|
||||||
padding-bottom: 60px;
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
text-align: justify;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-btn {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
max-width: 280px;
|
|
||||||
margin: 40px auto 0;
|
|
||||||
text-align: center;
|
|
||||||
border: none;
|
|
||||||
padding: 0;
|
|
||||||
transition: $transition;
|
|
||||||
height: 60px;
|
|
||||||
line-height: 60px;
|
|
||||||
font-size: 22px;
|
|
||||||
background: #fff;
|
|
||||||
color: #333;
|
|
||||||
border-radius: 4px;
|
|
||||||
text-shadow: none;
|
|
||||||
opacity: 0.95;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
import { NewTabLink } from 'components/ui';
|
|
||||||
import './AppExpired.scss';
|
|
||||||
|
|
||||||
const AppExpired: React.SFC<{}> = () => (
|
|
||||||
<div className="AppExpired">
|
|
||||||
<div className="AppExpired-content">
|
|
||||||
<h2>Your Alpha Build Has Expired</h2>
|
|
||||||
<p>
|
|
||||||
To ensure the safety of your funds, we are expiring alpha builds one month after release and
|
|
||||||
requiring users to update. All you have to do is download a new build from our GitHub, and
|
|
||||||
you can continue to use the app. Sorry for the hassle!
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<NewTabLink
|
|
||||||
href="https://github.com/MyCryptoHQ/MyCrypto/releases/latest"
|
|
||||||
className="AppExpired-content-btn"
|
|
||||||
>
|
|
||||||
Download a New Build
|
|
||||||
</NewTabLink>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
|
|
||||||
export default AppExpired;
|
|
|
@ -1,15 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
import { APP_ALPHA_EXPIRATION } from 'config';
|
|
||||||
import AlphaNotice from './AlphaNotice';
|
|
||||||
import AppExpired from './AppExpired';
|
|
||||||
|
|
||||||
const AppAlphaNotice: React.SFC<{}> = () => {
|
|
||||||
if (APP_ALPHA_EXPIRATION < Date.now()) {
|
|
||||||
return <AppExpired />;
|
|
||||||
} else {
|
|
||||||
return <AlphaNotice />;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export default AppAlphaNotice;
|
|
|
@ -44,7 +44,6 @@ class ElectronNav extends React.Component<Props, State> {
|
||||||
>
|
>
|
||||||
<div className="ElectronNav-branding">
|
<div className="ElectronNav-branding">
|
||||||
<div className="ElectronNav-branding-logo" onClick={this.toggleTheme} />
|
<div className="ElectronNav-branding-logo" onClick={this.toggleTheme} />
|
||||||
<div className="ElectronNav-branding-beta">Alpha Release</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul className="ElectronNav-links">
|
<ul className="ElectronNav-links">
|
||||||
|
|
|
@ -24,4 +24,3 @@ export { default as ParityQrSigner } from './ParityQrSigner';
|
||||||
export { default as ElectronNav } from './ElectronNav';
|
export { default as ElectronNav } from './ElectronNav';
|
||||||
export { default as AddressBookTable } from './AddressBookTable';
|
export { default as AddressBookTable } from './AddressBookTable';
|
||||||
export { default as Errorable } from './Errorable';
|
export { default as Errorable } from './Errorable';
|
||||||
export { default as AppAlphaNotice } from './AppAlphaNotice';
|
|
||||||
|
|
|
@ -12,12 +12,6 @@ export const discordURL = 'https://discord.gg/VSaTXEA';
|
||||||
export const VERSION = packageJson.version;
|
export const VERSION = packageJson.version;
|
||||||
export const N_FACTOR = 8192;
|
export const N_FACTOR = 8192;
|
||||||
|
|
||||||
// Bricks the app once this date has been exceeded. Remember to update these 2
|
|
||||||
// whenever making a new app release.
|
|
||||||
// It is currently set to: Wednesday, July 25, 2018 12:00:00 AM (GMT)
|
|
||||||
// TODO: Remove me once app alpha / release candidates are done
|
|
||||||
export const APP_ALPHA_EXPIRATION = 1532476800000;
|
|
||||||
|
|
||||||
// Displays at the top of the site, make message empty string to remove.
|
// Displays at the top of the site, make message empty string to remove.
|
||||||
// Type can be primary, warning, danger, success, info, or blank for grey.
|
// Type can be primary, warning, danger, success, info, or blank for grey.
|
||||||
// Message must be a JSX element if you want to use HTML.
|
// Message must be a JSX element if you want to use HTML.
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { AppState } from 'features/reducers';
|
import { AppState } from 'features/reducers';
|
||||||
import { getOffline } from 'features/config';
|
import { getOffline } from 'features/config';
|
||||||
import { ElectronNav, AppAlphaNotice } from 'components';
|
import { ElectronNav } from 'components';
|
||||||
import OfflineTab from './OfflineTab';
|
import OfflineTab from './OfflineTab';
|
||||||
import Notifications from './Notifications';
|
import Notifications from './Notifications';
|
||||||
import './ElectronTemplate.scss';
|
import './ElectronTemplate.scss';
|
||||||
|
@ -33,7 +33,6 @@ class ElectronTemplate extends Component<Props, {}> {
|
||||||
{isUnavailableOffline && isOffline ? <OfflineTab /> : children}
|
{isUnavailableOffline && isOffline ? <OfflineTab /> : children}
|
||||||
</div>
|
</div>
|
||||||
<Notifications />
|
<Notifications />
|
||||||
<AppAlphaNotice />
|
|
||||||
</div>
|
</div>
|
||||||
<div className="ElectronTemplate-draggable" />
|
<div className="ElectronTemplate-draggable" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,7 +12,9 @@ Object {
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`handleChangeNodeRequested* should select getCustomNodeConfig and match race snapshot 1`] = `
|
exports[
|
||||||
|
`handleChangeNodeRequested* should select getCustomNodeConfig and match race snapshot 1`
|
||||||
|
] = `
|
||||||
Object {
|
Object {
|
||||||
"@@redux-saga/IO": true,
|
"@@redux-saga/IO": true,
|
||||||
"SELECT": Object {
|
"SELECT": Object {
|
||||||
|
|
|
@ -29,6 +29,7 @@ import {
|
||||||
} from 'config/dpaths';
|
} from 'config/dpaths';
|
||||||
import { makeExplorer } from 'utils/helpers';
|
import { makeExplorer } from 'utils/helpers';
|
||||||
import { StaticNetworksState } from './types';
|
import { StaticNetworksState } from './types';
|
||||||
|
import { TAB } from 'components/Header/components/constants';
|
||||||
|
|
||||||
const testnetDefaultGasPrice = {
|
const testnetDefaultGasPrice = {
|
||||||
min: 0.1,
|
min: 0.1,
|
||||||
|
@ -393,7 +394,8 @@ export const STATIC_NETWORKS_INITIAL_STATE: StaticNetworksState = {
|
||||||
min: 0.183,
|
min: 0.183,
|
||||||
max: 1.5,
|
max: 1.5,
|
||||||
initial: 0.183
|
initial: 0.183
|
||||||
}
|
},
|
||||||
|
unsupportedTabs: [TAB.ENS]
|
||||||
},
|
},
|
||||||
|
|
||||||
RSK_TESTNET: {
|
RSK_TESTNET: {
|
||||||
|
@ -419,7 +421,8 @@ export const STATIC_NETWORKS_INITIAL_STATE: StaticNetworksState = {
|
||||||
min: 0.183,
|
min: 0.183,
|
||||||
max: 1.5,
|
max: 1.5,
|
||||||
initial: 0.183
|
initial: 0.183
|
||||||
}
|
},
|
||||||
|
unsupportedTabs: [TAB.ENS]
|
||||||
},
|
},
|
||||||
|
|
||||||
GO: {
|
GO: {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`getDeterministicWallets* starting from publicKey & chainCode should match put snapshot 1`] = `
|
exports[
|
||||||
|
`getDeterministicWallets* starting from publicKey & chainCode should match put snapshot 1`
|
||||||
|
] = `
|
||||||
Object {
|
Object {
|
||||||
"@@redux-saga/IO": true,
|
"@@redux-saga/IO": true,
|
||||||
"PUT": Object {
|
"PUT": Object {
|
||||||
|
|
|
@ -37,7 +37,12 @@ export default async function handleMetaMaskPolling(store: Store<AppState>): Pro
|
||||||
const actualChainId = await getActualChainId();
|
const actualChainId = await getActualChainId();
|
||||||
const actualNetwork = configNetworksSelectors.getNetworkByChainId(state, actualChainId);
|
const actualNetwork = configNetworksSelectors.getNetworkByChainId(state, actualChainId);
|
||||||
|
|
||||||
if (web3Wallet && actualNetwork && (web3Wallet as Web3Wallet).network !== actualNetwork.id) {
|
if (
|
||||||
|
web3Wallet &&
|
||||||
|
(web3Wallet as Web3Wallet).network &&
|
||||||
|
actualNetwork &&
|
||||||
|
(web3Wallet as Web3Wallet).network !== actualNetwork.id
|
||||||
|
) {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -91,6 +91,9 @@ window.addEventListener('load', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** @desc When MetaMask is loaded as an extension, watch for network changes. */
|
||||||
|
if ((window as any).web3) {
|
||||||
setInterval(handleMetaMaskPolling.bind(null, store), METAMASK_POLLING_INTERVAL);
|
setInterval(handleMetaMaskPolling.bind(null, store), METAMASK_POLLING_INTERVAL);
|
||||||
|
}
|
||||||
|
|
||||||
export default store;
|
export default store;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>MyCrypto</title>
|
<title>MyCrypto</title>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="<%= htmlWebpackPlugin.options.metaCsp %>" >
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<meta name="description" content="MyCrypto is a free, open-source interface for interacting with the blockchain.">
|
<meta name="description" content="MyCrypto is a free, open-source interface for interacting with the blockchain.">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||||
|
@ -12,7 +13,7 @@
|
||||||
<meta property="og:description" content="<%= htmlWebpackPlugin.options.appDescription %>">
|
<meta property="og:description" content="<%= htmlWebpackPlugin.options.appDescription %>">
|
||||||
<meta property="og:site_name" content="<%= htmlWebpackPlugin.options.title %>">
|
<meta property="og:site_name" content="<%= htmlWebpackPlugin.options.title %>">
|
||||||
<meta property="og:type" content="<%= htmlWebpackPlugin.options.type %>">
|
<meta property="og:type" content="<%= htmlWebpackPlugin.options.type %>">
|
||||||
<meta property="og:image" content="<%= htmlWebpackPlugin.options.image %>">
|
<meta property="og:image" content="/common/assets/images/link-preview.png">
|
||||||
<meta name="twitter:site" content="<%= htmlWebpackPlugin.options.twitter.site %>">
|
<meta name="twitter:site" content="<%= htmlWebpackPlugin.options.twitter.site %>">
|
||||||
<meta name="twitter:creator" content="<%= htmlWebpackPlugin.options.twitter.creator %>">
|
<meta name="twitter:creator" content="<%= htmlWebpackPlugin.options.twitter.creator %>">
|
||||||
<meta name="google-site-verification" content="dRWkvANAUNAhNyMnTyc7M7S3lnucotMY8j8R-gsZhbo" />
|
<meta name="google-site-verification" content="dRWkvANAUNAhNyMnTyc7M7S3lnucotMY8j8R-gsZhbo" />
|
||||||
|
|
|
@ -67,6 +67,10 @@ export default function getWindow() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.webContents.on('will-navigate', (event: any) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
if (isDevelopment) {
|
if (isDevelopment) {
|
||||||
window.webContents.on('did-fail-load', () => {
|
window.webContents.on('did-fail-load', () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
@ -166,7 +166,10 @@ module.exports = function(opts = {}) {
|
||||||
twitter: {
|
twitter: {
|
||||||
site: config.twitter.creator,
|
site: config.twitter.creator,
|
||||||
creator: config.twitter.creator
|
creator: config.twitter.creator
|
||||||
}
|
},
|
||||||
|
metaCsp: options.isProduction
|
||||||
|
? "default-src 'none'; script-src 'self'; worker-src 'self' blob:; style-src 'self' 'unsafe-inline'; manifest-src 'self'; font-src 'self'; img-src 'self' data: https://shapeshift.io; connect-src *;"
|
||||||
|
: ""
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin([
|
||||||
|
|
Loading…
Reference in New Issue