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 @@ -