From 4e23acb558328663dd66975713ca888afdfff41c Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Wed, 17 Oct 2018 14:11:10 +0100 Subject: [PATCH] PR feedback --- embark-ui/src/actions/index.js | 5 ++--- embark-ui/src/components/ContractsDeployment.js | 9 +++++---- embark-ui/src/reducers/index.js | 9 ++------- embark-ui/src/services/web3.js | 3 +-- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/embark-ui/src/actions/index.js b/embark-ui/src/actions/index.js index 03100c60..34bb9c4e 100644 --- a/embark-ui/src/actions/index.js +++ b/embark-ui/src/actions/index.js @@ -323,13 +323,13 @@ export const gasOracle = { failure: (error) => action(GAS_ORACLE[FAILURE], {error}) }; -<<<<<<< HEAD export const EXPLORER_SEARCH = createRequestTypes('EXPLORER_SEARCH'); export const explorerSearch = { request: (searchValue) => action(EXPLORER_SEARCH[REQUEST], {searchValue}), success: (searchResult) => action(EXPLORER_SEARCH[SUCCESS], {searchResult}), failure: (error) => action(EXPLORER_SEARCH[FAILURE], {error}) -======= +}; + export const WEB3_CONNECT = createRequestTypes('WEB3_CONNECT'); export const web3Connect = { request: () => action(WEB3_CONNECT[REQUEST]), @@ -349,7 +349,6 @@ export const web3EstimateGas = { request: (contract, args) => action(WEB3_ESTIMAGE_GAS[REQUEST], {contract, args}), success: (gas, payload) => action(WEB3_ESTIMAGE_GAS[SUCCESS], {contract: payload.contract, gas}), failure: (error, payload) => action(WEB3_ESTIMAGE_GAS[FAILURE], {web3Error: error, contract: payload.contract}) ->>>>>>> Adding option to switch deployment pipeline }; // Web Socket diff --git a/embark-ui/src/components/ContractsDeployment.js b/embark-ui/src/components/ContractsDeployment.js index 8521e1fa..c1adfe58 100644 --- a/embark-ui/src/components/ContractsDeployment.js +++ b/embark-ui/src/components/ContractsDeployment.js @@ -1,5 +1,6 @@ import PropTypes from "prop-types"; import React from 'react'; +import FontAwesomeIcon from 'react-fontawesome'; import { Row, Col, @@ -47,7 +48,7 @@ const LayoutContract = ({contract, children}) => ( const DeploymentResult = ({deployment}) => { if (deployment.running) { - return

Deployment is in progress

+ return

Deployment is in progress

} if (deployment.error) { @@ -73,7 +74,7 @@ const DeploymentResult = ({deployment}) => { const GasEstimateResult = ({gasEstimate}) => { if (gasEstimate.running) { - return

Gas Estimation is in progresss

+ return

Gas Estimation is in progresss

} if (gasEstimate.error) { @@ -197,7 +198,7 @@ const ContractsHeader = ({deploymentPipeline, updateDeploymentPipeline}) => ( onChange={() => updateDeploymentPipeline(DEPLOYMENT_PIPELINES.embark)} checked={deploymentPipeline === DEPLOYMENT_PIPELINES.embark} /> Embark - + Embark will deploy the contracts automatically for you each time there is a change in one of them. @@ -210,7 +211,7 @@ const ContractsHeader = ({deploymentPipeline, updateDeploymentPipeline}) => ( onChange={() => updateDeploymentPipeline(DEPLOYMENT_PIPELINES.injectedWeb3)} checked={deploymentPipeline === DEPLOYMENT_PIPELINES.injectedWeb3} /> Injected Web3 - + You will have full control on your deployment diff --git a/embark-ui/src/reducers/index.js b/embark-ui/src/reducers/index.js index 4392dfde..d4d6a8ff 100644 --- a/embark-ui/src/reducers/index.js +++ b/embark-ui/src/reducers/index.js @@ -1,14 +1,9 @@ import {combineReducers} from 'redux'; -<<<<<<< HEAD import {REQUEST, SUCCESS, FAILURE, CONTRACT_COMPILE, FILES, LOGOUT, AUTHENTICATE, FETCH_CREDENTIALS, UPDATE_BASE_ETHER, CHANGE_THEME, FETCH_THEME, EXPLORER_SEARCH, - SIGN_MESSAGE, VERIFY_MESSAGE, TOGGLE_BREAKPOINT} from "../actions"; -import {EMBARK_PROCESS_NAME, DARK_THEME} from '../constants'; -======= -import {REQUEST, SUCCESS, FAILURE, CONTRACT_COMPILE, FILES, LOGOUT, AUTHENTICATE, CHANGE_THEME, FETCH_THEME, - FETCH_CREDENTIALS, UPDATE_BASE_ETHER, UPDATE_DEPLOYMENT_PIPELINE, WEB3_CONNECT, WEB3_DEPLOY, WEB3_ESTIMAGE_GAS} from "../actions"; + SIGN_MESSAGE, VERIFY_MESSAGE, TOGGLE_BREAKPOINT, + UPDATE_DEPLOYMENT_PIPELINE, WEB3_CONNECT, WEB3_DEPLOY, WEB3_ESTIMAGE_GAS} from "../actions"; import {EMBARK_PROCESS_NAME, DARK_THEME, DEPLOYMENT_PIPELINES} from '../constants'; ->>>>>>> Adding option to switch deployment pipeline const BN_FACTOR = 10000; const VOID_ADDRESS = '0x0000000000000000000000000000000000000000'; diff --git a/embark-ui/src/services/web3.js b/embark-ui/src/services/web3.js index 06087c15..3a559a25 100644 --- a/embark-ui/src/services/web3.js +++ b/embark-ui/src/services/web3.js @@ -12,8 +12,7 @@ export const connect = () => { reject(error); } } else if (window.web3) { - const web3 = new Web3(window.web3.currentProvider); - resolve(web3); + resolve(new Web3(window.web3.currentProvider)); } else { reject(Error('Non-Ethereum browser detected. You should use MetaMask!')); }