Merge branch 'master' into fix/intl-losing-local-state

pull/486/head
slowbackspace 5 years ago
commit 7d609c741f

@ -3,6 +3,7 @@ build
coverage coverage
cache/** cache/**
node_modules node_modules
scripts/solidity/**
src/flowtype/npm src/flowtype/npm
scripts/solidity/.* scripts/solidity/.*
**/_old/* **/_old/*

@ -2,6 +2,7 @@ public
build build
coverage coverage
cache/** cache/**
scripts/solidity/**
node_modules node_modules
src/flowtype/npm src/flowtype/npm
scripts/solidity/.* scripts/solidity/.*

@ -1,4 +1,4 @@
module.exports = (api) => { module.exports = api => {
// api.cache.forever(); // api.cache.forever();
const presets = [ const presets = [
@ -27,13 +27,9 @@ module.exports = (api) => {
[ [
'module-resolver', 'module-resolver',
{ {
root: [ root: ['./src'],
'./src',
],
alias: { alias: {
public: [ public: ['./public'],
'./public',
],
}, },
}, },
], ],
@ -45,19 +41,17 @@ module.exports = (api) => {
} }
if (api.env('translations')) { if (api.env('translations')) {
plugins.push( plugins.push([
[ 'react-intl',
'react-intl', {
{ messagesDir: './translations/extractedMessages/',
messagesDir: './translations/extractedMessages/', extractSourceLocation: true,
extractSourceLocation: true, },
}, ]);
],
);
} }
return { return {
presets, presets,
plugins, plugins,
}; };
}; };

@ -11,10 +11,7 @@ module.exports = {
'utils/promiseUtils.js', 'utils/promiseUtils.js',
'utils/networkUtils.js', 'utils/networkUtils.js',
], ],
collectCoverageFrom: [ collectCoverageFrom: ['utils/**.js', 'reducers/utils/**.js'],
'utils/**.js',
'reducers/utils/**.js',
],
// coverageThreshold: { // coverageThreshold: {
// global: { // global: {
// branches: 100, // branches: 100,
@ -23,9 +20,7 @@ module.exports = {
// statements: 100, // statements: 100,
// }, // },
// }, // },
setupFiles: [ setupFiles: ['./support/setupJest.js'],
'./support/setupJest.js',
],
transform: { transform: {
'^.+\\.jsx?$': 'babel-jest', '^.+\\.jsx?$': 'babel-jest',
}, },

@ -19,7 +19,7 @@
"translations:download": "yarn ttm build-translations && sleep 1 && yarn ttm export-translations", "translations:download": "yarn ttm build-translations && sleep 1 && yarn ttm export-translations",
"flow": "flow check src", "flow": "flow check src",
"lint": "run-s lint:*", "lint": "run-s lint:*",
"lint:js": "npx eslint ./src ./webpack", "lint:js": "npx eslint .",
"lint:css": "npx stylelint './src/**/*.js'", "lint:css": "npx stylelint './src/**/*.js'",
"lint-fix": "npx eslint ./src ./webpack --fix", "lint-fix": "npx eslint ./src ./webpack --fix",
"test": "run-s test:*", "test": "run-s test:*",

@ -19,7 +19,11 @@ const app = express();
const PORT = process.env.PORT || 8080; const PORT = process.env.PORT || 8080;
// Setup logger // Setup logger
app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms')); app.use(
morgan(
':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms'
)
);
// Serve static assets // Serve static assets
app.use(express.static(path.resolve(__dirname, '..', 'build', commander.buildType))); app.use(express.static(path.resolve(__dirname, '..', 'build', commander.buildType)));

@ -1,38 +1,48 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html>
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Trezor Wallet</title> <title>Trezor Wallet</title>
<meta name="title" content="Trezor Wallet" /> <meta name="title" content="Trezor Wallet" />
<meta name="description" content="Trezor Wallet" /> <meta name="description" content="Trezor Wallet" />
<meta name="keywords" content="trezor wallet" /> <meta name="keywords" content="trezor wallet" />
<meta name="author" content="SatoshiLabs s.r.o." /> <meta name="author" content="SatoshiLabs s.r.o." />
<meta name="google" value="notranslate" /> <meta name="google" value="notranslate" />
<link media="all" rel="stylesheet" href="./fonts/fonts.css" /> <link media="all" rel="stylesheet" href="./fonts/fonts.css" />
<!--[if lt IE 8]> <!--[if lt IE 8]>
<link media="all" rel="stylesheet" href="./unsupported-browsers/style.css" /> <link media="all" rel="stylesheet" href="./unsupported-browsers/style.css" />
<![endif]--> <![endif]-->
</head> </head>
<body> <body>
<!--[if lt IE 8]> <!--[if lt IE 8]>
<div class="unsupported-browsers"> <div class="unsupported-browsers">
<div class="header"></div> <div class="header"></div>
<h1>Your browser is not supported</h1> <h1>Your browser is not supported</h1>
<p>Please choose one of the supported browsers</p> <p>Please choose one of the supported browsers</p>
<div class="main"> <div class="main">
<div class="box left"> <div class="box left">
<img src="./unsupported-browsers/browser-chrome.png"> <img src="./unsupported-browsers/browser-chrome.png" />
<a href="https://www.google.com/chrome/" target="_blank" rel="noreferrer noopener">Get Chrome</a> <a
href="https://www.google.com/chrome/"
target="_blank"
rel="noreferrer noopener"
>Get Chrome</a
>
</div>
<div class="box right">
<img src="./unsupported-browsers/browser-firefox.png" />
<a
href="https://www.mozilla.org/en-US/firefox/new/"
target="_blank"
rel="noreferrer noopener"
>Get Firefox</a
>
</div>
</div>
</div> </div>
<div class="box right"> <![endif]-->
<img src="./unsupported-browsers/browser-firefox.png"> <div id="trezor-wallet-root"></div>
<a href="https://www.mozilla.org/en-US/firefox/new/" target="_blank" rel="noreferrer noopener">Get Firefox</a> </body>
</div>
</div>
</div>
<![endif]-->
<div id="trezor-wallet-root"></div>
</body>
</html> </html>

@ -110,7 +110,7 @@ const Body = styled.div`
`; `;
const Wallet = (props: Props) => ( const Wallet = (props: Props) => (
<AppWrapper> <AppWrapper lang={props.wallet.language}>
<Header <Header
sidebarEnabled={!!props.wallet.selectedDevice} sidebarEnabled={!!props.wallet.selectedDevice}
sidebarOpened={props.wallet.showSidebar} sidebarOpened={props.wallet.showSidebar}

@ -23,4 +23,4 @@ describe('Dashboard page', () => {
.should('be.visible') .should('be.visible')
.matchImageSnapshot(); .matchImageSnapshot();
}); });
}); });

@ -1,7 +1,5 @@
const { const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin');
addMatchImageSnapshotPlugin,
} = require('cypress-image-snapshot/plugin');
module.exports = (on) => { module.exports = on => {
addMatchImageSnapshotPlugin(on); addMatchImageSnapshotPlugin(on);
}; };

@ -3,4 +3,4 @@ import { initSeedAllDevice } from 'trezor-bridge-communicator';
(async () => { (async () => {
await initSeedAllDevice(); await initSeedAllDevice();
})(); })();

@ -3,4 +3,4 @@ import './commands';
beforeEach(() => { beforeEach(() => {
window.localStorage.setItem('/betaModalPrivacy', true); window.localStorage.setItem('/betaModalPrivacy', true);
}); });

Loading…
Cancel
Save