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] 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/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` diff --git a/package.json b/package.json index 9db39d70..d966c6c4 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", @@ -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/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 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 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/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 - - + + 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: 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/', }; } diff --git a/src/views/Wallet/views/Account/Summary/index.js b/src/views/Wallet/views/Account/Summary/index.js index 6dc91de2..90da7d41 100644 --- a/src/views/Wallet/views/Account/Summary/index.js +++ b/src/views/Wallet/views/Account/Summary/index.js @@ -13,6 +13,7 @@ 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'; @@ -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
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"