From d2d184773da05bb7714adf39911b45c1e34ffc49 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Fri, 19 Oct 2018 13:21:55 +0200 Subject: [PATCH 01/11] quickfix: remove unnecessary condition from ModalReducer TrezorConnect will emit UI.CLOSE_UI_WINDOW which will close modal window --- src/reducers/ModalReducer.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/reducers/ModalReducer.js b/src/reducers/ModalReducer.js index a425676a..4f3168df 100644 --- a/src/reducers/ModalReducer.js +++ b/src/reducers/ModalReducer.js @@ -44,14 +44,6 @@ export default function modal(state: State = initialState, action: Action): Stat windowType: action.type, }; - // device acquired - // close modal - case DEVICE.CHANGED: - if (state.context === MODAL.CONTEXT_DEVICE && action.device.path === state.device.path && action.device.status === 'occupied') { - return initialState; - } - return state; - // device connected // close modal if modal context is not 'device' case DEVICE.CONNECT: From fa5fbf890361b3c959690ff0b84c2917603e313c Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Fri, 19 Oct 2018 01:10:24 +0200 Subject: [PATCH 02/11] Better account title --- src/config/variables.js | 1 + src/views/Wallet/views/Account/Summary/index.js | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/config/variables.js b/src/config/variables.js index 4c900387..5435a7ee 100644 --- a/src/config/variables.js +++ b/src/config/variables.js @@ -3,6 +3,7 @@ export const FONT_SIZE = { SMALLER: '12px', SMALL: '14px', BASE: '16px', + WALLET_TITLE: '18px', TOP_MENU: '17px', BIG: '21px', BIGGER: '32px', diff --git a/src/views/Wallet/views/Account/Summary/index.js b/src/views/Wallet/views/Account/Summary/index.js index 6dc91de2..36a88475 100644 --- a/src/views/Wallet/views/Account/Summary/index.js +++ b/src/views/Wallet/views/Account/Summary/index.js @@ -13,10 +13,11 @@ import Content from 'views/Wallet/components/Content'; import CoinLogo from 'components/images/CoinLogo'; import * as stateUtils from 'reducers/utils'; import Link from 'components/Link'; +import { FONT_WEIGHT, FONT_SIZE } from 'config/variables'; import AccountBalance from './components/Balance'; import AddedToken from './components/Token'; -import type { Props } from './Container'; +import { Props } from './Container'; const AccountHeading = styled.div` padding: 0 0 30px 0; @@ -38,9 +39,16 @@ const StyledTooltip = styled(Tooltip)` const AccountName = styled.div` display: flex; + justify-content: center; align-items: center; `; +const AccountTitle = styled.div` + font-size: ${FONT_SIZE.WALLET_TITLE}; + font-weight: ${FONT_WEIGHT.BASE}; + color: ${colors.WALLET_TITLE}; +`; + const StyledCoinLogo = styled(CoinLogo)` margin-right: 10px; `; @@ -82,7 +90,7 @@ const AccountSummary = (props: Props) => { -

Account #{parseInt(account.index, 10) + 1}

+ Account #{parseInt(account.index, 10) + 1}
See full transaction history
From 81aa4e108b4a28211355e4dbfa0f3231fd307c60 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Fri, 19 Oct 2018 13:32:59 +0200 Subject: [PATCH 03/11] change meta tags in index.html --- src/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.html b/src/index.html index 7278523f..fc560aef 100644 --- a/src/index.html +++ b/src/index.html @@ -4,15 +4,15 @@ - Ethereum Wallet | Trezor + Trezor Wallet - - + + From 46acf38364207e23bbcda821dd66c771b3e68815 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Fri, 19 Oct 2018 13:37:15 +0200 Subject: [PATCH 04/11] flowtype fix for Account/Summary --- src/views/Wallet/views/Account/Summary/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Wallet/views/Account/Summary/index.js b/src/views/Wallet/views/Account/Summary/index.js index 36a88475..90da7d41 100644 --- a/src/views/Wallet/views/Account/Summary/index.js +++ b/src/views/Wallet/views/Account/Summary/index.js @@ -17,7 +17,7 @@ import { FONT_WEIGHT, FONT_SIZE } from 'config/variables'; import AccountBalance from './components/Balance'; import AddedToken from './components/Token'; -import { Props } from './Container'; +import type { Props } from './Container'; const AccountHeading = styled.div` padding: 0 0 30px 0; From df9276903f27ae96e61ec2fda3e9d355490b3437 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Fri, 19 Oct 2018 13:45:46 +0200 Subject: [PATCH 05/11] fix license in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9db39d70..421e79d7 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "bin": { "flow": "./node_modules/flow-bin" }, - "license": "T-RSL", + "license": "SEE LICENSE IN LICENSE.md", "scripts": { "dev": "npx webpack-dev-server --config webpack/dev.babel.js", "dev:local": "npx webpack-dev-server --config webpack/local.babel.js", From ae50572a87969c28b939c4258b27601a10e1e14f Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Fri, 19 Oct 2018 15:28:16 +0200 Subject: [PATCH 06/11] bump trezor-connect 6.0.0 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 421e79d7..d966c6c4 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "styled-components": "^3.4.9", "styled-media-query": "^2.0.2", "styled-normalize": "^8.0.0", - "trezor-connect": "^5.0.32", + "trezor-connect": "6.0.0", "web3": "1.0.0-beta.35", "webpack": "^4.16.3", "webpack-build-notifier": "^0.1.29", diff --git a/yarn.lock b/yarn.lock index 0c415b76..d222ae8a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10211,9 +10211,9 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" -trezor-connect@^5.0.32: - version "5.0.32" - resolved "https://registry.yarnpkg.com/trezor-connect/-/trezor-connect-5.0.32.tgz#a8077f46653fec16d8dc25358e157ed1048a4def" +trezor-connect@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/trezor-connect/-/trezor-connect-6.0.0.tgz#2a45336f29a4a3f2a8ad2d121363b0e7a1b767ef" dependencies: babel-runtime "^6.26.0" events "^1.1.1" From a074d79348dfd3892d9c05f4a7ea2078ccd02a9a Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Fri, 19 Oct 2018 15:32:43 +0200 Subject: [PATCH 07/11] updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e196b09..0b2f694d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Trezor Ethereum Wallet +# Trezor Wallet To install dependencies run `npm install` or `yarn` To start locally run `npm run dev` or `yarn run dev` From cb30af097f1b9d0a885a574a83c0e5288f4beb3f Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Fri, 19 Oct 2018 16:03:58 +0200 Subject: [PATCH 08/11] changed bridge installation package domain --- src/views/Landing/views/InstallBridge/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Landing/views/InstallBridge/index.js b/src/views/Landing/views/InstallBridge/index.js index d0b3834b..e648ae16 100644 --- a/src/views/Landing/views/InstallBridge/index.js +++ b/src/views/Landing/views/InstallBridge/index.js @@ -135,7 +135,7 @@ class InstallBridge extends PureComponent { latestVersion: props.transport.bridge.version.join('.'), installers, target: currentTarget || installers[0], - uri: 'https://wallet.trezor.io/data/', + uri: 'https://data.trezor.io/', }; } From ffbbbee16676d0377597b941d5ec7a349e79f8d7 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Fri, 19 Oct 2018 17:02:30 +0200 Subject: [PATCH 09/11] added Makefile and s3sync script --- Makefile | 5 +++++ scripts/s3sync.sh | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 Makefile create mode 100644 scripts/s3sync.sh diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..8c84f3b5 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +build: + sh ./scripts/docker-build.sh + +sync-%: + sh ./scripts/s3sync.sh $* \ No newline at end of file diff --git a/scripts/s3sync.sh b/scripts/s3sync.sh new file mode 100644 index 00000000..44a141a2 --- /dev/null +++ b/scripts/s3sync.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +# Before first use: +# Install awscli (pip install awscli) +# Configure access credentials (aws configure), region is "eu-central-1" + +function confirm { + read -r -p "Are you sure? [y/N] " response + if [[ $response =~ ^(yes|y)$ ]]; then + echo "let's go!" + else + exit 2 + fi +} + +if [ "x$1" == "x" ]; then + echo "./s3sync.sh stage|beta|wallet [-d]" + exit 1 +fi + +if [ "x$1" == "xstage" ]; then + DIST=../build/beta + BUCKET=stage.mytrezor.com + DISTRIBUTION_ID="E24M0QWO692FQL" + +elif [ "x$1" == "xbeta" ]; then + DIST=../build/beta + BUCKET=beta.mytrezor.com + DISTRIBUTION_ID="E1PONNHWUNCQ9M" + + confirm + +elif [ "x$1" == "xwallet" ]; then + DIST=../build/prod + BUCKET=wallet.mytrezor.com + DISTRIBUTION_ID="EZM01GFTITGVD" + + confirm + +fi + +set -e +cd `dirname $0` + +if [ "x$2" == "x-d" ]; then + aws s3 sync --delete --cache-control 'public, max-age=3600' $DIST s3://$BUCKET/next +else + aws s3 sync --cache-control 'public, max-age=3600' $DIST s3://$BUCKET/next +fi + +aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths '/*' + +echo "DONE" \ No newline at end of file From c7701d3a989b2894dada2bb56440f0b7361ecf42 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Fri, 19 Oct 2018 17:58:12 +0200 Subject: [PATCH 10/11] move solidity from ./public to ./scripts --- {public => scripts}/solidity/erc20.json | 0 {public => scripts}/solidity/grzegorz-token.js | 0 {public => scripts}/solidity/lahodka-token.js | 0 {public => scripts}/solidity/rinkeby-token.js | 0 {public => scripts}/solidity/test-token.js | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename {public => scripts}/solidity/erc20.json (100%) rename {public => scripts}/solidity/grzegorz-token.js (100%) rename {public => scripts}/solidity/lahodka-token.js (100%) rename {public => scripts}/solidity/rinkeby-token.js (100%) rename {public => scripts}/solidity/test-token.js (100%) diff --git a/public/solidity/erc20.json b/scripts/solidity/erc20.json similarity index 100% rename from public/solidity/erc20.json rename to scripts/solidity/erc20.json diff --git a/public/solidity/grzegorz-token.js b/scripts/solidity/grzegorz-token.js similarity index 100% rename from public/solidity/grzegorz-token.js rename to scripts/solidity/grzegorz-token.js diff --git a/public/solidity/lahodka-token.js b/scripts/solidity/lahodka-token.js similarity index 100% rename from public/solidity/lahodka-token.js rename to scripts/solidity/lahodka-token.js diff --git a/public/solidity/rinkeby-token.js b/scripts/solidity/rinkeby-token.js similarity index 100% rename from public/solidity/rinkeby-token.js rename to scripts/solidity/rinkeby-token.js diff --git a/public/solidity/test-token.js b/scripts/solidity/test-token.js similarity index 100% rename from public/solidity/test-token.js rename to scripts/solidity/test-token.js From 1f517733fcf7201b1f11b53edb53fa465a792cd2 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Sat, 20 Oct 2018 00:18:48 +0200 Subject: [PATCH 11/11] eslint and flow ignore ./scripts/solidity --- .eslintignore | 1 + .flowconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintignore b/.eslintignore index 089ce7a5..94a7b116 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,4 +3,5 @@ build coverage node_modules src/flowtype/npm +scripts/solidity/.* **/_old/* \ No newline at end of file diff --git a/.flowconfig b/.flowconfig index e42f6028..a3a80352 100644 --- a/.flowconfig +++ b/.flowconfig @@ -9,7 +9,7 @@ .*/node_modules/react-router-redux/.* .*/node_modules/oboe/test/.* .*/_old/.* -.*/public/solidity/.* +.*/scripts/solidity/.* .*/build/.* [libs]