Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge #1

Open
wants to merge 27 commits into
base: echo_version
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
REACT_APP_RELAYER_URL='http://localhost:3001/api/v2'
REACT_APP_FEE_RECIPIENT='0x0000000000000000000000000000000000000000'
REACT_APP_NOTIFICATIONS_LIMIT=20
REACT_APP_START_BLOCK_LIMIT=100000
REACT_APP_START_BLOCK_LIMIT=100
# 0 is disabled
REACT_APP_UI_UPDATE_CHECK_INTERVAL=5000
# 0 is disabled
Expand All @@ -16,5 +16,5 @@ REACT_APP_COLLECTIBLE_NAME='CryptoKitties'
REACT_APP_COLLECTIBLE_DESCRIPTION='CryptoKitties is a state of the art blockchain-based game, enabling users to trade and sell their cards freely, with the same level of ownership as if they were real, tangible cards.'
REACT_APP_ERC20_THEME_NAME = 'DARK_THEME'
REACT_APP_ERC721_THEME_NAME = 'LIGHT_THEME'
REACT_APP_DEFAULT_BASE_PATH='/erc721'
REACT_APP_NETWORK_ID=50
REACT_APP_DEFAULT_BASE_PATH='/erc20'
REACT_APP_NETWORK_ID=3
26 changes: 16 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
FROM node:11-alpine as yarn-install
# Stage 1
FROM node:8-alpine as react-build
WORKDIR /app
COPY package.json yarn.lock ./

RUN apk update && \
apk upgrade && \
apk add --no-cache --virtual build-dependencies bash git openssh python make g++ && \
yarn --no-cache && \
apk del build-dependencies && \
yarn cache clean
apk add --no-cache --virtual build-dependencies bash git openssh python make g++ musl-dev \
gcc python3-dev libusb-dev eudev-dev linux-headers libc-dev
RUN git clone https://github.com/echoprotocol/0x-monorepo.git

# Stage 1
FROM node:11-alpine as react-build
WORKDIR /app
COPY --from=yarn-install /app/node_modules /app/node_modules
COPY . .

RUN cd ./0x-monorepo && yarn install && yarn build && yarn workspaces run link
RUN yarn link 0x.js @0x/web3-wrapper @0x/connect @0x/order-utils @0x/typescript-typings
RUN yarn cache clean

RUN yarn --no-cache --frozen-lockfile
RUN yarn remove babel-jest
RUN yarn add [email protected]
RUN yarn build

RUN apk del build-dependencies

# Stage 2 - the production environment
FROM nginx:alpine
COPY --from=react-build /app/build /usr/share/nginx/html
Expand Down
17 changes: 5 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"0x.js": "^6.0.11",
"@0x/connect": "^5.0.12",
"@0x/order-utils": "^8.2.3",
"@0x/web3-wrapper": "^6.0.6",
"@types/async-retry": "^1.4.1",
"@types/recharts": "^1.1.16",
"async-retry": "^1.2.3",
Expand All @@ -18,6 +14,7 @@
"logdown": "^3.2.8",
"query-string": "^6.4.0",
"react": "^16.8.6",
"echo-web3": "0.1.10",
"react-copy-to-clipboard": "^5.0.1",
"react-dom": "^16.8.6",
"react-modal": "^3.8.1",
Expand All @@ -34,10 +31,11 @@
"reselect": "^4.0.0",
"sanitize.css": "^8.0.0",
"styled-components": "^4.1.3",
"typesafe-actions": "^3.0.0"
"typesafe-actions": "^3.0.0",
"web3": "0.20.7"
},
"scripts": {
"start": "cross-env PORT=3001 react-scripts start",
"start": "cross-env PORT=3002 react-scripts start",
"build": "GENERATE_SOURCEMAP=false react-scripts build",
"test": "REACT_APP_NETWORK_ID=50 react-scripts test --env=node",
"test-once": "cross-env CI=true react-scripts test --coverage",
Expand All @@ -50,12 +48,6 @@
"eslintConfig": {
"extends": "react-app"
},
"husky": {
"hooks": {
"pre-commit": "npm run prettier-check",
"pre-push": "npm run lint && npm run test-once"
}
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx,ts,tsx}",
Expand Down Expand Up @@ -85,6 +77,7 @@
"@types/react-timeago": "^4.1.0",
"@types/redux-mock-store": "^1.0.0",
"@types/styled-components": "^4.1.6",
"babel-jest": "24.7.1",
"coveralls": "^3.0.3",
"cross-env": "^5.2.0",
"enzyme": "^3.8.0",
Expand Down
10 changes: 10 additions & 0 deletions public/assets/icons/wecho.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
141 changes: 69 additions & 72 deletions src/assets/icons/install_metamask.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/icons/wecho.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export const TX_DEFAULTS = {
shouldValidate: true,
};

export const ECHO_ASSET_ID = '1.3.0';
export const EETH_ASSET_ID = '1.3.1';
export const EBTC_ASSET_ID = '1.3.2';

export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';

export const FEE_RECIPIENT = process.env.REACT_APP_FEE_RECIPIENT || ZERO_ADDRESS;
Expand All @@ -21,17 +25,18 @@ export const AFFILIATE_FEE_PERCENTAGE: number = process.env.REACT_APP_AFFILIATE_
: 0;

export const ETH_DECIMALS = 18;
export const EBTC_DECIMALS = 18;

export const UI_DECIMALS_DISPLAYED_ON_STEP_MODALS = 3;
export const UI_DECIMALS_DISPLAYED_ON_STEP_MODALS = 8;
export const UI_DECIMALS_DISPLAYED_SPREAD_PERCENT = 2;
export const UI_DECIMALS_DISPLAYED_DEFAULT_PRECISION = 2;
export const UI_DECIMALS_DISPLAYED_ORDER_SIZE = 4;
export const UI_DECIMALS_DISPLAYED_PRICE_ETH = 7;
export const UI_GENERAL_TITLE = 'Launch Kit';

export const METAMASK_EXTENSION_URL = 'https://metamask.io/';
export const METAMASK_EXTENSION_URL = 'https://chrome.google.com/webstore/detail/echo-bridge/ginklfodpcgldnicehmlpehfmgjhbdcl';
export const METAMASK_CHROME_EXTENSION_DOWNLOAD_URL =
'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn';
'https://chrome.google.com/webstore/detail/echo-bridge/ginklfodpcgldnicehmlpehfmgjhbdcl';

// Default value is enabled, 0 is disabled
export const UI_UPDATE_CHECK_INTERVAL: number = process.env.REACT_APP_UI_UPDATE_CHECK_INTERVAL
Expand Down
1 change: 1 addition & 0 deletions src/common/tokens_meta_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ export interface TokenMetaData {
primaryColor: string;
icon?: string;
displayDecimals?: number;
assetId?: string;
}
export const KNOWN_TOKENS_META_DATA: TokenMetaData[] = Config.getConfig().tokens;
2 changes: 2 additions & 0 deletions src/components/account/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export * from './wallet_token_balances';
export * from './wallet_weth_balance';
export * from './wallet_weeth_balance';
export * from './wallet_webtc_balance';
Loading