diff --git a/Cargo.lock b/Cargo.lock index 948dbb888..7722751d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1273,7 +1273,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#55a2cc4707bf9f8bacde3c3f68e32b4a5ac777cf" +source = "git+https://github.com/ethcore/js-precompiled.git#7700411d2b0ba1372e0d6cf72a84ecf873a181f3" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/ethcore/res/authority_round.json b/ethcore/res/authority_round.json index 9ab782395..a0f88b85b 100644 --- a/ethcore/res/authority_round.json +++ b/ethcore/res/authority_round.json @@ -21,8 +21,7 @@ "genesis": { "seal": { "generic": { - "fields": 2, - "rlp": "0x200" + "rlp": "0xc28080" } }, "difficulty": "0x20000", diff --git a/ethcore/res/instant_seal.json b/ethcore/res/instant_seal.json index a6b24faf9..fbb650102 100644 --- a/ethcore/res/instant_seal.json +++ b/ethcore/res/instant_seal.json @@ -12,7 +12,6 @@ "genesis": { "seal": { "generic": { - "fields": 0, "rlp": "0x0" } }, diff --git a/ethcore/src/spec/seal.rs b/ethcore/src/spec/seal.rs index e25f174d2..f3e5dca95 100644 --- a/ethcore/src/spec/seal.rs +++ b/ethcore/src/spec/seal.rs @@ -30,11 +30,9 @@ pub struct Ethereum { impl Into for Ethereum { fn into(self) -> Generic { - let mut s = RlpStream::new(); - s.append(&self.mix_hash); - s.append(&self.nonce); + let mut s = RlpStream::new_list(2); + s.append(&self.mix_hash).append(&self.nonce); Generic { - fields: 2, rlp: s.out() } } @@ -42,8 +40,6 @@ impl Into for Ethereum { /// Generic seal. pub struct Generic { - /// Number of seal fields. - pub fields: usize, /// Seal rlp. pub rlp: Vec, } @@ -64,7 +60,6 @@ impl From for Seal { mix_hash: eth.mix_hash.into() }), ethjson::spec::Seal::Generic(g) => Seal::Generic(Generic { - fields: g.fields, rlp: g.rlp.into() }) } diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index 71c15bca2..63a692701 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -94,8 +94,6 @@ pub struct Spec { pub receipts_root: H256, /// The genesis block's extra data field. pub extra_data: Bytes, - /// The number of seal fields in the genesis block. - pub seal_fields: usize, /// Each seal field, expressed as RLP, concatenated. pub seal_rlp: Bytes, @@ -127,7 +125,6 @@ impl From for Spec { gas_used: g.gas_used, timestamp: g.timestamp, extra_data: g.extra_data, - seal_fields: seal.fields, seal_rlp: seal.rlp, state_root_memo: RwLock::new(g.state_root), genesis_state: From::from(s.accounts), @@ -192,13 +189,8 @@ impl Spec { header.set_gas_limit(self.gas_limit.clone()); header.set_difficulty(self.difficulty.clone()); header.set_seal({ - let seal = { - let mut s = RlpStream::new_list(self.seal_fields); - s.append_raw(&self.seal_rlp, self.seal_fields); - s.out() - }; - let r = Rlp::new(&seal); - (0..self.seal_fields).map(|i| r.at(i).as_raw().to_vec()).collect() + let r = Rlp::new(&self.seal_rlp); + r.iter().map(|f| f.as_raw().to_vec()).collect() }); trace!(target: "spec", "Header hash is {}", header.hash()); header @@ -227,7 +219,6 @@ impl Spec { self.gas_used = g.gas_used; self.timestamp = g.timestamp; self.extra_data = g.extra_data; - self.seal_fields = seal.fields; self.seal_rlp = seal.rlp; self.state_root_memo = RwLock::new(g.state_root); } diff --git a/js/.npmrc b/js/.npmrc index 3f7b4cf25..a00908d4f 100644 --- a/js/.npmrc +++ b/js/.npmrc @@ -1 +1 @@ -save-prefix='~' +save-prefix='' diff --git a/js/package.json b/js/package.json index 4007afea2..5341cee31 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.89", + "version": "0.2.91", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team ", @@ -47,132 +47,127 @@ "prepush": "npm run lint:cached" }, "devDependencies": { - "babel-cli": "~6.18.0", - "babel-core": "~6.18.2", - "babel-eslint": "~7.1.0", - "babel-loader": "~6.2.3", - "babel-plugin-lodash": "~3.2.2", - "babel-plugin-transform-class-properties": "~6.19.0", - "babel-plugin-transform-decorators-legacy": "~1.3.4", - "babel-plugin-transform-react-remove-prop-types": "~0.2.9", - "babel-plugin-transform-runtime": "~6.15.0", - "babel-polyfill": "~6.16.0", - "babel-preset-es2015": "~6.18.0", - "babel-preset-es2015-rollup": "~1.2.0", - "babel-preset-es2016": "~6.16.0", - "babel-preset-es2017": "~6.16.0", - "babel-preset-react": "~6.16.0", - "babel-preset-stage-0": "~6.16.0", + "babel-cli": "6.18.0", + "babel-core": "6.18.2", + "babel-eslint": "7.1.1", + "babel-loader": "6.2.8", + "babel-plugin-lodash": "3.2.10", + "babel-plugin-transform-class-properties": "6.19.0", + "babel-plugin-transform-decorators-legacy": "1.3.4", + "babel-plugin-transform-react-remove-prop-types": "0.2.11", + "babel-plugin-transform-runtime": "6.15.0", + "babel-polyfill": "6.16.0", + "babel-preset-es2015": "6.18.0", + "babel-preset-es2015-rollup": "1.2.0", + "babel-preset-es2016": "6.16.0", + "babel-preset-es2017": "6.16.0", + "babel-preset-react": "6.16.0", + "babel-preset-stage-0": "6.16.0", "babel-register": "6.18.0", - "babel-runtime": "~6.18.0", - "chai": "~3.5.0", - "chai-enzyme": "0.4.2", - "cheerio": "0.20.0", - "copy-webpack-plugin": "~4.0.0", - "core-js": "~2.4.1", - "coveralls": "~2.11.11", - "css-loader": "~0.26.0", - "ejs-loader": "~0.3.0", - "enzyme": "2.3.0", - "eslint": "~3.10.2", - "eslint-config-semistandard": "~7.0.0", - "eslint-config-standard": "~6.2.1", - "eslint-config-standard-react": "~4.2.0", - "eslint-plugin-promise": "~3.4.0", - "eslint-plugin-react": "~6.7.1", - "eslint-plugin-standard": "~2.0.0", - "express": "~4.14.0", + "babel-runtime": "6.18.0", + "chai": "3.5.0", + "chai-enzyme": "0.6.1", + "copy-webpack-plugin": "4.0.1", + "core-js": "2.4.1", + "coveralls": "2.11.15", + "css-loader": "0.26.1", + "ejs-loader": "0.3.0", + "enzyme": "2.6.0", + "eslint": "3.11.1", + "eslint-config-semistandard": "7.0.0", + "eslint-config-standard": "6.2.1", + "eslint-config-standard-react": "4.2.0", + "eslint-plugin-promise": "3.4.0", + "eslint-plugin-react": "6.7.1", + "eslint-plugin-standard": "2.0.1", + "express": "4.14.0", "extract-loader": "0.1.0", - "extract-text-webpack-plugin": "~2.0.0-beta.4", - "file-loader": "~0.9.0", - "fs-extra": "~0.30.0", - "happypack": "~3.0.0", - "history": "~2.0.0", - "html-loader": "~0.4.4", - "html-webpack-plugin": "~2.24.1", - "http-proxy-middleware": "~0.17.2", - "husky": "~0.11.9", - "ignore-styles": "2.0.0", - "image-webpack-loader": "~3.0.0", - "istanbul": "~1.0.0-alpha.2", - "jsdom": "9.2.1", - "json-loader": "~0.5.4", - "mocha": "~3.0.0-1", + "extract-text-webpack-plugin": "2.0.0-beta.4", + "file-loader": "0.9.0", + "happypack": "3.0.0", + "html-loader": "0.4.4", + "html-webpack-plugin": "2.24.1", + "http-proxy-middleware": "0.17.2", + "husky": "0.11.9", + "ignore-styles": "5.0.1", + "image-webpack-loader": "3.0.0", + "istanbul": "1.0.0-alpha.2", + "jsdom": "9.8.3", + "json-loader": "0.5.4", + "mocha": "3.2.0", "mock-local-storage": "1.0.2", - "mock-socket": "~3.0.1", - "nock": "~8.0.0", + "mock-socket": "6.0.3", + "nock": "9.0.2", "postcss-import": "8.1.0", - "postcss-loader": "~1.1.1", - "postcss-nested": "~1.0.0", - "postcss-simple-vars": "~3.0.0", - "progress": "~1.1.8", - "raw-loader": "~0.5.1", - "react-addons-perf": "~15.4.1", - "react-addons-test-utils": "~15.4.1", - "react-hot-loader": "~3.0.0-beta.6", - "rucksack-css": "~0.8.6", - "sinon": "~1.17.4", - "sinon-as-promised": "~4.0.2", - "sinon-chai": "~2.8.0", - "style-loader": "~0.13.0", - "url-loader": "~0.5.7", - "webpack": "~2.1.0-beta.27", - "webpack-dev-middleware": "~1.8.4", + "postcss-loader": "1.1.1", + "postcss-nested": "1.0.0", + "postcss-simple-vars": "3.0.0", + "progress": "1.1.8", + "raw-loader": "0.5.1", + "react-addons-perf": "15.4.1", + "react-addons-test-utils": "15.4.1", + "react-hot-loader": "3.0.0-beta.6", + "rucksack-css": "0.9.1", + "sinon": "1.17.6", + "sinon-as-promised": "4.0.2", + "sinon-chai": "2.8.0", + "style-loader": "0.13.1", + "url-loader": "0.5.7", + "webpack": "2.1.0-beta.27", + "webpack-dev-middleware": "1.8.4", "webpack-error-notification": "0.1.6", - "webpack-hot-middleware": "~2.13.2", - "websocket": "~1.0.23" + "webpack-hot-middleware": "2.13.2", + "websocket": "1.0.23" }, "dependencies": { - "bignumber.js": "~2.3.0", + "bignumber.js": "3.0.1", "blockies": "0.0.2", - "brace": "~0.9.0", - "bytes": "~2.4.0", - "chart.js": "~2.3.0", - "es6-error": "~4.0.0", - "es6-promise": "~3.2.1", - "ethereumjs-tx": "~1.1.2", - "eventemitter3": "~2.0.2", - "file-saver": "~1.3.3", - "format-json": "~1.0.3", - "format-number": "~2.0.1", - "geopattern": "~1.2.3", - "isomorphic-fetch": "~2.2.1", - "js-sha3": "~0.5.2", - "lodash": "~4.11.1", - "marked": "~0.3.6", - "material-ui": "~0.16.4", - "material-ui-chip-input": "~0.11.1", - "mobx": "~2.6.1", - "mobx-react": "~3.5.8", - "mobx-react-devtools": "~4.2.9", - "moment": "~2.14.1", - "phoneformat.js": "~1.0.3", - "qs": "~6.3.0", - "react": "~15.4.1", - "react-ace": "~4.0.0", - "react-addons-css-transition-group": "~15.4.1", - "react-chartjs-2": "~1.5.0", - "react-copy-to-clipboard": "~4.2.3", - "react-dom": "~15.4.1", - "react-dropzone": "~3.7.3", - "react-redux": "~4.4.5", - "react-router": "~2.6.1", - "react-router-redux": "~4.0.5", - "react-tap-event-plugin": "~2.0.1", - "react-tooltip": "~2.0.3", - "recharts": "~0.15.2", - "redux": "~3.5.2", - "redux-actions": "~0.10.1", - "redux-thunk": "~2.1.0", - "rlp": "~2.0.0", - "scryptsy": "~2.0.0", + "brace": "0.9.0", + "bytes": "2.4.0", + "es6-error": "4.0.0", + "es6-promise": "4.0.5", + "ethereumjs-tx": "1.1.4", + "eventemitter3": "2.0.2", + "file-saver": "1.3.3", + "format-json": "1.0.3", + "format-number": "2.0.1", + "geopattern": "1.2.3", + "isomorphic-fetch": "2.2.1", + "js-sha3": "0.5.5", + "lodash": "4.17.2", + "marked": "0.3.6", + "material-ui": "0.16.4", + "material-ui-chip-input": "0.11.1", + "mobx": "2.6.4", + "mobx-react": "4.0.3", + "mobx-react-devtools": "4.2.10", + "moment": "2.17.0", + "phoneformat.js": "1.0.3", + "qs": "6.3.0", + "react": "15.4.1", + "react-ace": "4.1.0", + "react-addons-css-transition-group": "15.4.1", + "react-copy-to-clipboard": "4.2.3", + "react-dom": "15.4.1", + "react-dropzone": "3.7.3", + "react-redux": "4.4.6", + "react-router": "3.0.0", + "react-router-redux": "4.0.7", + "react-tap-event-plugin": "2.0.1", + "react-tooltip": "3.2.2", + "recharts": "0.15.2", + "redux": "3.6.0", + "redux-actions": "1.1.0", + "redux-thunk": "2.1.0", + "rlp": "2.0.0", + "scryptsy": "2.0.0", "solc": "ngotchac/solc-js", - "store": "~1.3.20", - "utf8": "~2.1.1", - "valid-url": "~1.0.9", - "validator": "~5.7.0", - "web3": "~0.17.0-beta", - "whatwg-fetch": "~1.0.0", - "worker-loader": "~0.7.1" + "store": "1.3.20", + "utf8": "2.1.2", + "valid-url": "1.0.9", + "validator": "6.2.0", + "web3": "0.17.0-beta", + "whatwg-fetch": "2.0.1", + "worker-loader": "0.7.1" } } diff --git a/js/src/contracts/badgereg.js b/js/src/contracts/badgereg.js index f8dbefa78..45760b277 100644 --- a/js/src/contracts/badgereg.js +++ b/js/src/contracts/badgereg.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -import { bytesToHex, hex2Ascii } from '../api/util/format'; +import { bytesToHex, hex2Ascii } from '~/api/util/format'; import ABI from './abi/certifier.json'; diff --git a/js/src/dapps/basiccoin.js b/js/src/dapps/basiccoin.js index a64afa0b9..eb3213c79 100644 --- a/js/src/dapps/basiccoin.js +++ b/js/src/dapps/basiccoin.js @@ -16,8 +16,7 @@ import ReactDOM from 'react-dom'; import React from 'react'; -import { createHashHistory } from 'history'; -import { Redirect, Router, Route, useRouterHistory } from 'react-router'; +import { Redirect, Router, Route, hashHistory } from 'react-router'; import injectTapEventPlugin from 'react-tap-event-plugin'; injectTapEventPlugin(); @@ -27,14 +26,12 @@ import Application from './basiccoin/Application'; import Overview from './basiccoin/Overview'; import Transfer from './basiccoin/Transfer'; -const routerHistory = useRouterHistory(createHashHistory)({}); - import '../../assets/fonts/Roboto/font.css'; import '../../assets/fonts/RobotoMono/font.css'; import './style.css'; ReactDOM.render( - + diff --git a/js/src/dapps/basiccoin/Transfer/Send/send.js b/js/src/dapps/basiccoin/Transfer/Send/send.js index a9c05a228..f10807b2e 100644 --- a/js/src/dapps/basiccoin/Transfer/Send/send.js +++ b/js/src/dapps/basiccoin/Transfer/Send/send.js @@ -17,7 +17,7 @@ import BigNumber from 'bignumber.js'; import React, { Component, PropTypes } from 'react'; -import { eip20 } from '../../../../contracts/abi'; +import { eip20 } from '~/contracts/abi'; import { api } from '../../parity'; import { loadBalances } from '../../services'; diff --git a/js/src/dapps/basiccoin/services.js b/js/src/dapps/basiccoin/services.js index 3dd5202a7..f76b7fb61 100644 --- a/js/src/dapps/basiccoin/services.js +++ b/js/src/dapps/basiccoin/services.js @@ -16,7 +16,7 @@ import BigNumber from 'bignumber.js'; -import * as abis from '../../contracts/abi'; +import * as abis from '~/contracts/abi'; import { api } from './parity'; let managerInstance; diff --git a/js/src/dapps/dappreg/dappsStore.js b/js/src/dapps/dappreg/dappsStore.js index 4baf7337c..382f5cdc4 100644 --- a/js/src/dapps/dappreg/dappsStore.js +++ b/js/src/dapps/dappreg/dappsStore.js @@ -17,8 +17,8 @@ import BigNumber from 'bignumber.js'; import { action, computed, observable, transaction } from 'mobx'; -import * as abis from '../../contracts/abi'; -import builtins from '../../views/Dapps/builtin.json'; +import * as abis from '~/contracts/abi'; +import builtins from '~/views/Dapps/builtin.json'; import { api } from './parity'; diff --git a/js/src/dapps/githubhint/services.js b/js/src/dapps/githubhint/services.js index d4f7fc6b2..fc889b7f6 100644 --- a/js/src/dapps/githubhint/services.js +++ b/js/src/dapps/githubhint/services.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -import * as abis from '../../contracts/abi'; +import * as abis from '~/contracts/abi'; import { api } from './parity'; export function attachInterface () { diff --git a/js/src/dapps/registry/actions.js b/js/src/dapps/registry/actions.js index b1390926b..dd6652d76 100644 --- a/js/src/dapps/registry/actions.js +++ b/js/src/dapps/registry/actions.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -import { registry as registryAbi } from '../../contracts/abi'; +import { registry as registryAbi } from '~/contracts/abi'; import { api } from './parity.js'; import * as addresses from './addresses/actions.js'; diff --git a/js/src/dapps/signaturereg/services.js b/js/src/dapps/signaturereg/services.js index eab498fc4..82dba383b 100644 --- a/js/src/dapps/signaturereg/services.js +++ b/js/src/dapps/signaturereg/services.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -import * as abis from '../../contracts/abi'; +import * as abis from '~/contracts/abi'; import { api } from './parity'; const sortEvents = (a, b) => b.blockNumber.cmp(a.blockNumber) || b.logIndex.cmp(a.logIndex); diff --git a/js/src/dapps/tokenreg/Status/actions.js b/js/src/dapps/tokenreg/Status/actions.js index 027de57af..76fae17e5 100644 --- a/js/src/dapps/tokenreg/Status/actions.js +++ b/js/src/dapps/tokenreg/Status/actions.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -import Contracts from '../../../contracts'; +import Contracts from '~/contracts'; import { loadToken, setTokenPending, deleteToken, setTokenData } from '../Tokens/actions'; diff --git a/js/src/dapps/tokenreg/utils.js b/js/src/dapps/tokenreg/utils.js index 0f4e192f0..f156b78dd 100644 --- a/js/src/dapps/tokenreg/utils.js +++ b/js/src/dapps/tokenreg/utils.js @@ -16,7 +16,7 @@ import { api } from './parity'; -import { eip20 as eip20Abi } from '../../contracts/abi'; +import { eip20 as eip20Abi } from '~/contracts/abi'; export const getTokenTotalSupply = (tokenAddress) => { return api diff --git a/js/src/index.js b/js/src/index.js index 2f38f8c17..6938a46f8 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -25,19 +25,18 @@ import ReactDOM from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import injectTapEventPlugin from 'react-tap-event-plugin'; -import { createHashHistory } from 'history'; -import { useRouterHistory } from 'react-router'; +import { hashHistory } from 'react-router'; import qs from 'querystring'; import SecureApi from './secureApi'; -import ContractInstances from './contracts'; +import ContractInstances from '~/contracts'; import { initStore } from './redux'; -import ContextProvider from './ui/ContextProvider'; -import muiTheme from './ui/Theme'; +import ContextProvider from '~/ui/ContextProvider'; +import muiTheme from '~/ui/Theme'; import MainApplication from './main'; -import { setApi } from './redux/providers/apiActions'; +import { setApi } from '~/redux/providers/apiActions'; import './environment'; @@ -74,13 +73,11 @@ store.dispatch(setApi(api)); window.secureApi = api; -const routerHistory = useRouterHistory(createHashHistory)({}); - ReactDOM.render( , @@ -88,24 +85,6 @@ ReactDOM.render( ); if (module.hot) { - // module.hot.accept('./redux', () => { - // // redux store has a method replaceReducer - // // const newStore = initStore(api); - // console.warn('REDUX UPDATE'); - // // store.replaceReducer(appReducer); - - // // ReactDOM.render( - // // - // // - // // - // // - // // , - // // document.querySelector('#container') - // // ); - // }); - module.hot.accept('./main.js', () => { require('./main.js'); @@ -113,7 +92,7 @@ if (module.hot) { , diff --git a/js/src/main.js b/js/src/main.js index 106cf06f9..ae785cbb6 100644 --- a/js/src/main.js +++ b/js/src/main.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { Redirect, Router, Route } from 'react-router'; -import { Accounts, Account, Addresses, Address, Application, Contract, Contracts, WriteContract, Dapp, Dapps, Settings, SettingsBackground, SettingsParity, SettingsProxy, SettingsViews, Signer, Status } from './views'; +import { Accounts, Account, Addresses, Address, Application, Contract, Contracts, WriteContract, Dapp, Dapps, Settings, SettingsBackground, SettingsParity, SettingsProxy, SettingsViews, Signer, Status } from '~/views'; import styles from './reset.css'; diff --git a/js/src/modals/AddAddress/addAddress.js b/js/src/modals/AddAddress/addAddress.js index c8845aa13..9b31d4a42 100644 --- a/js/src/modals/AddAddress/addAddress.js +++ b/js/src/modals/AddAddress/addAddress.js @@ -18,7 +18,7 @@ import React, { Component, PropTypes } from 'react'; import ContentAdd from 'material-ui/svg-icons/content/add'; import ContentClear from 'material-ui/svg-icons/content/clear'; -import { Button, Modal, Form, Input, InputAddress } from '../../ui'; +import { Button, Modal, Form, Input, InputAddress } from '~/ui'; import { ERRORS, validateAddress, validateName } from '../../util/validation'; export default class AddAddress extends Component { diff --git a/js/src/modals/AddContract/addContract.js b/js/src/modals/AddContract/addContract.js index 110a91837..70a1fd7dc 100644 --- a/js/src/modals/AddContract/addContract.js +++ b/js/src/modals/AddContract/addContract.js @@ -20,10 +20,10 @@ import ContentClear from 'material-ui/svg-icons/content/clear'; import NavigationArrowForward from 'material-ui/svg-icons/navigation/arrow-forward'; import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; -import { Button, Modal, Form, Input, InputAddress, RadioButtons } from '../../ui'; +import { Button, Modal, Form, Input, InputAddress, RadioButtons } from '~/ui'; import { ERRORS, validateAbi, validateAddress, validateName } from '../../util/validation'; -import { eip20, wallet } from '../../contracts/abi'; +import { eip20, wallet } from '~/contracts/abi'; const ABI_TYPES = [ { diff --git a/js/src/modals/CreateAccount/AccountDetails/accountDetails.js b/js/src/modals/CreateAccount/AccountDetails/accountDetails.js index 14c858c06..f869e3ec5 100644 --- a/js/src/modals/CreateAccount/AccountDetails/accountDetails.js +++ b/js/src/modals/CreateAccount/AccountDetails/accountDetails.js @@ -16,7 +16,7 @@ import React, { Component, PropTypes } from 'react'; -import { Form, Input, InputAddress } from '../../../ui'; +import { Form, Input, InputAddress } from '~/ui'; export default class AccountDetails extends Component { static propTypes = { diff --git a/js/src/modals/CreateAccount/NewAccount/newAccount.js b/js/src/modals/CreateAccount/NewAccount/newAccount.js index 8c476634f..a100ab19a 100644 --- a/js/src/modals/CreateAccount/NewAccount/newAccount.js +++ b/js/src/modals/CreateAccount/NewAccount/newAccount.js @@ -19,7 +19,7 @@ import IconButton from 'material-ui/IconButton'; import { RadioButton, RadioButtonGroup } from 'material-ui/RadioButton'; import ActionAutorenew from 'material-ui/svg-icons/action/autorenew'; -import { Form, Input, IdentityIcon } from '../../../ui'; +import { Form, Input, IdentityIcon } from '~/ui'; import styles from '../createAccount.css'; diff --git a/js/src/modals/CreateAccount/NewGeth/newGeth.js b/js/src/modals/CreateAccount/NewGeth/newGeth.js index 4b6cc2c96..2159277c5 100644 --- a/js/src/modals/CreateAccount/NewGeth/newGeth.js +++ b/js/src/modals/CreateAccount/NewGeth/newGeth.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { Checkbox } from 'material-ui'; -import { IdentityIcon } from '../../../ui'; +import { IdentityIcon } from '~/ui'; import styles from './newGeth.css'; diff --git a/js/src/modals/CreateAccount/NewImport/newImport.js b/js/src/modals/CreateAccount/NewImport/newImport.js index 60c80fd00..e8d0bb8d6 100644 --- a/js/src/modals/CreateAccount/NewImport/newImport.js +++ b/js/src/modals/CreateAccount/NewImport/newImport.js @@ -19,7 +19,7 @@ import ReactDOM from 'react-dom'; import { FloatingActionButton } from 'material-ui'; import EditorAttachFile from 'material-ui/svg-icons/editor/attach-file'; -import { Form, Input } from '../../../ui'; +import { Form, Input } from '~/ui'; import styles from '../createAccount.css'; diff --git a/js/src/modals/CreateAccount/RawKey/rawKey.js b/js/src/modals/CreateAccount/RawKey/rawKey.js index 458925c72..fed028bf9 100644 --- a/js/src/modals/CreateAccount/RawKey/rawKey.js +++ b/js/src/modals/CreateAccount/RawKey/rawKey.js @@ -16,7 +16,7 @@ import React, { Component, PropTypes } from 'react'; -import { Form, Input } from '../../../ui'; +import { Form, Input } from '~/ui'; import styles from '../createAccount.css'; diff --git a/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js b/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js index b766e247f..4088fac53 100644 --- a/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js +++ b/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { Checkbox } from 'material-ui'; -import { Form, Input } from '../../../ui'; +import { Form, Input } from '~/ui'; import styles from '../createAccount.css'; diff --git a/js/src/modals/CreateAccount/createAccount.js b/js/src/modals/CreateAccount/createAccount.js index 40b7fbcd2..d8413cee7 100644 --- a/js/src/modals/CreateAccount/createAccount.js +++ b/js/src/modals/CreateAccount/createAccount.js @@ -22,7 +22,7 @@ import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; import NavigationArrowForward from 'material-ui/svg-icons/navigation/arrow-forward'; import PrintIcon from 'material-ui/svg-icons/action/print'; -import { Button, Modal } from '../../ui'; +import { Button, Modal } from '~/ui'; import AccountDetails from './AccountDetails'; import AccountDetailsGeth from './AccountDetailsGeth'; @@ -33,7 +33,7 @@ import NewImport from './NewImport'; import RawKey from './RawKey'; import RecoveryPhrase from './RecoveryPhrase'; -import { createIdentityImg } from '../../api/util/identity'; +import { createIdentityImg } from '~/api/util/identity'; import print from './print'; import recoveryPage from './recovery-page.ejs'; import ParityLogo from '../../../assets/images/parity-logo-black-no-text.svg'; diff --git a/js/src/modals/DeleteAccount/deleteAccount.js b/js/src/modals/DeleteAccount/deleteAccount.js index f3bd880c1..d828ea166 100644 --- a/js/src/modals/DeleteAccount/deleteAccount.js +++ b/js/src/modals/DeleteAccount/deleteAccount.js @@ -18,7 +18,7 @@ import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { ConfirmDialog, IdentityIcon, IdentityName, Input } from '../../ui'; +import { ConfirmDialog, IdentityIcon, IdentityName, Input } from '~/ui'; import { newError } from '../../redux/actions'; import styles from './deleteAccount.css'; diff --git a/js/src/modals/DeployContract/DetailsStep/detailsStep.js b/js/src/modals/DeployContract/DetailsStep/detailsStep.js index 8d0a2457c..54ef8f850 100644 --- a/js/src/modals/DeployContract/DetailsStep/detailsStep.js +++ b/js/src/modals/DeployContract/DetailsStep/detailsStep.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { MenuItem } from 'material-ui'; -import { AddressSelect, Form, Input, Select } from '../../../ui'; +import { AddressSelect, Form, Input, Select } from '~/ui'; import { validateAbi } from '../../../util/validation'; import { parseAbiType } from '../../../util/abi'; diff --git a/js/src/modals/DeployContract/ParametersStep/parametersStep.js b/js/src/modals/DeployContract/ParametersStep/parametersStep.js index 7916c9f5a..4c7228b67 100644 --- a/js/src/modals/DeployContract/ParametersStep/parametersStep.js +++ b/js/src/modals/DeployContract/ParametersStep/parametersStep.js @@ -31,7 +31,7 @@ import React, { Component, PropTypes } from 'react'; -import { Form, TypedInput } from '../../../ui'; +import { Form, TypedInput } from '~/ui'; import { parseAbiType } from '../../../util/abi'; import styles from '../deployContract.css'; diff --git a/js/src/modals/DeployContract/deployContract.js b/js/src/modals/DeployContract/deployContract.js index 7a4979489..ae5578e40 100644 --- a/js/src/modals/DeployContract/deployContract.js +++ b/js/src/modals/DeployContract/deployContract.js @@ -18,7 +18,7 @@ import React, { Component, PropTypes } from 'react'; import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; import ContentClear from 'material-ui/svg-icons/content/clear'; -import { BusyStep, CompletedStep, CopyToClipboard, Button, IdentityIcon, Modal, TxHash } from '../../ui'; +import { BusyStep, CompletedStep, CopyToClipboard, Button, IdentityIcon, Modal, TxHash } from '~/ui'; import { ERRORS, validateAbi, validateCode, validateName } from '../../util/validation'; import DetailsStep from './DetailsStep'; @@ -27,7 +27,7 @@ import ErrorStep from './ErrorStep'; import styles from './deployContract.css'; -import { ERROR_CODES } from '../../api/transport/error'; +import { ERROR_CODES } from '~/api/transport/error'; const STEPS = { CONTRACT_DETAILS: { title: 'contract details' }, diff --git a/js/src/modals/EditMeta/editMeta.js b/js/src/modals/EditMeta/editMeta.js index 7f0a061e2..ad26c19fe 100644 --- a/js/src/modals/EditMeta/editMeta.js +++ b/js/src/modals/EditMeta/editMeta.js @@ -18,7 +18,7 @@ import React, { Component, PropTypes } from 'react'; import ContentClear from 'material-ui/svg-icons/content/clear'; import ContentSave from 'material-ui/svg-icons/content/save'; -import { Button, Form, Input, InputChip, Modal } from '../../ui'; +import { Button, Form, Input, InputChip, Modal } from '~/ui'; import { validateName } from '../../util/validation'; export default class EditMeta extends Component { diff --git a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js index aad54e360..082fac6a7 100644 --- a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js +++ b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { MenuItem } from 'material-ui'; -import { AddressSelect, Form, Input, InputAddressSelect, Select } from '../../../ui'; +import { AddressSelect, Form, Input, InputAddressSelect, Select } from '~/ui'; import styles from '../executeContract.css'; diff --git a/js/src/modals/ExecuteContract/executeContract.js b/js/src/modals/ExecuteContract/executeContract.js index 97d44a029..c3b64d738 100644 --- a/js/src/modals/ExecuteContract/executeContract.js +++ b/js/src/modals/ExecuteContract/executeContract.js @@ -20,14 +20,14 @@ import { bindActionCreators } from 'redux'; import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; import ContentClear from 'material-ui/svg-icons/content/clear'; -import { BusyStep, CompletedStep, Button, IdentityIcon, Modal, TxHash } from '../../ui'; +import { BusyStep, CompletedStep, Button, IdentityIcon, Modal, TxHash } from '~/ui'; import { MAX_GAS_ESTIMATION } from '../../util/constants'; import { validateAddress, validateUint } from '../../util/validation'; import DetailsStep from './DetailsStep'; import ERRORS from '../Transfer/errors'; -import { ERROR_CODES } from '../../api/transport/error'; +import { ERROR_CODES } from '~/api/transport/error'; class ExecuteContract extends Component { static contextTypes = { diff --git a/js/src/modals/FirstRun/firstRun.js b/js/src/modals/FirstRun/firstRun.js index cf1a5a093..ee1a97a6e 100644 --- a/js/src/modals/FirstRun/firstRun.js +++ b/js/src/modals/FirstRun/firstRun.js @@ -20,7 +20,7 @@ import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; import NavigationArrowForward from 'material-ui/svg-icons/navigation/arrow-forward'; import PrintIcon from 'material-ui/svg-icons/action/print'; -import { Button, Modal } from '../../ui'; +import { Button, Modal } from '~/ui'; import { NewAccount, AccountDetails } from '../CreateAccount'; @@ -28,7 +28,7 @@ import Completed from './Completed'; import TnC from './TnC'; import Welcome from './Welcome'; -import { createIdentityImg } from '../../api/util/identity'; +import { createIdentityImg } from '~/api/util/identity'; import print from '../CreateAccount/print'; import recoveryPage from '../CreateAccount/recovery-page.ejs'; import ParityLogo from '../../../assets/images/parity-logo-black-no-text.svg'; diff --git a/js/src/modals/LoadContract/loadContract.js b/js/src/modals/LoadContract/loadContract.js index b530f601a..a2d1bdba2 100644 --- a/js/src/modals/LoadContract/loadContract.js +++ b/js/src/modals/LoadContract/loadContract.js @@ -24,7 +24,7 @@ import { List, ListItem, makeSelectable } from 'material-ui/List'; import { Subheader, IconButton, Tabs, Tab } from 'material-ui'; import moment from 'moment'; -import { Button, Modal, Editor } from '../../ui'; +import { Button, Modal, Editor } from '~/ui'; import styles from './loadContract.css'; diff --git a/js/src/modals/PasswordManager/passwordManager.js b/js/src/modals/PasswordManager/passwordManager.js index eab2c3316..96ff38c60 100644 --- a/js/src/modals/PasswordManager/passwordManager.js +++ b/js/src/modals/PasswordManager/passwordManager.js @@ -24,10 +24,10 @@ import Paper from 'material-ui/Paper'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { showSnackbar } from '../../redux/providers/snackbarActions'; +import { showSnackbar } from '~/redux/providers/snackbarActions'; -import Form, { Input } from '../../ui/Form'; -import { Button, Modal, IdentityName, IdentityIcon } from '../../ui'; +import Form, { Input } from '~/ui/Form'; +import { Button, Modal, IdentityName, IdentityIcon } from '~/ui'; import styles from './passwordManager.css'; diff --git a/js/src/modals/SMSVerification/GatherData/gatherData.js b/js/src/modals/SMSVerification/GatherData/gatherData.js index 3d90fa2ba..87213b1fc 100644 --- a/js/src/modals/SMSVerification/GatherData/gatherData.js +++ b/js/src/modals/SMSVerification/GatherData/gatherData.js @@ -22,8 +22,8 @@ import InfoIcon from 'material-ui/svg-icons/action/info-outline'; import SuccessIcon from 'material-ui/svg-icons/navigation/check'; import ErrorIcon from 'material-ui/svg-icons/navigation/close'; -import { fromWei } from '../../../api/util/wei'; -import { Form, Input } from '../../../ui'; +import { fromWei } from '~/api/util/wei'; +import { Form, Input } from '~/ui'; import { termsOfService } from '../../../3rdparty/sms-verification'; import styles from './gatherData.css'; diff --git a/js/src/modals/SMSVerification/QueryCode/queryCode.js b/js/src/modals/SMSVerification/QueryCode/queryCode.js index 9598fe358..03b228367 100644 --- a/js/src/modals/SMSVerification/QueryCode/queryCode.js +++ b/js/src/modals/SMSVerification/QueryCode/queryCode.js @@ -16,7 +16,7 @@ import React, { Component, PropTypes } from 'react'; -import { Form, Input } from '../../../ui'; +import { Form, Input } from '~/ui'; export default class QueryCode extends Component { static propTypes = { diff --git a/js/src/modals/SMSVerification/SMSVerification.js b/js/src/modals/SMSVerification/SMSVerification.js index 7bf7d67ae..86f027a52 100644 --- a/js/src/modals/SMSVerification/SMSVerification.js +++ b/js/src/modals/SMSVerification/SMSVerification.js @@ -19,7 +19,7 @@ import { observer } from 'mobx-react'; import DoneIcon from 'material-ui/svg-icons/action/done-all'; import CancelIcon from 'material-ui/svg-icons/content/clear'; -import { Button, IdentityIcon, Modal } from '../../ui'; +import { Button, IdentityIcon, Modal } from '~/ui'; import { LOADING, diff --git a/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js b/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js index a3c8e3e18..50c3aa17a 100644 --- a/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js +++ b/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import nullable from '../../../util/nullable-proptype'; -import TxHash from '../../../ui/TxHash'; +import TxHash from '~/ui/TxHash'; import { POSTING_CONFIRMATION, POSTED_CONFIRMATION } from '../store'; diff --git a/js/src/modals/SMSVerification/SendRequest/sendRequest.js b/js/src/modals/SMSVerification/SendRequest/sendRequest.js index 1c9a90f6b..9ba24f0e8 100644 --- a/js/src/modals/SMSVerification/SendRequest/sendRequest.js +++ b/js/src/modals/SMSVerification/SendRequest/sendRequest.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import nullable from '../../../util/nullable-proptype'; -import TxHash from '../../../ui/TxHash'; +import TxHash from '~/ui/TxHash'; import { POSTING_REQUEST, POSTED_REQUEST, REQUESTING_SMS } from '../store'; diff --git a/js/src/modals/SMSVerification/store.js b/js/src/modals/SMSVerification/store.js index 76045d814..49b91fa70 100644 --- a/js/src/modals/SMSVerification/store.js +++ b/js/src/modals/SMSVerification/store.js @@ -16,11 +16,11 @@ import { observable, computed, autorun, action } from 'mobx'; import phone from 'phoneformat.js'; -import { sha3 } from '../../api/util/sha3'; +import { sha3 } from '~/api/util/sha3'; -import Contracts from '../../contracts'; +import Contracts from '~/contracts'; -import { checkIfVerified, checkIfRequested, awaitPuzzle } from '../../contracts/sms-verification'; +import { checkIfVerified, checkIfRequested, awaitPuzzle } from '~/contracts/sms-verification'; import { postToServer } from '../../3rdparty/sms-verification'; import checkIfTxFailed from '../../util/check-if-tx-failed'; import waitForConfirmations from '../../util/wait-for-block-confirmations'; diff --git a/js/src/modals/SaveContract/saveContract.js b/js/src/modals/SaveContract/saveContract.js index 36b959198..c73fd8a21 100644 --- a/js/src/modals/SaveContract/saveContract.js +++ b/js/src/modals/SaveContract/saveContract.js @@ -19,7 +19,7 @@ import React, { Component, PropTypes } from 'react'; import SaveIcon from 'material-ui/svg-icons/content/save'; import ContentClear from 'material-ui/svg-icons/content/clear'; -import { Button, Modal, Editor, Form, Input } from '../../ui'; +import { Button, Modal, Editor, Form, Input } from '~/ui'; import { ERRORS, validateName } from '../../util/validation'; import styles from './saveContract.css'; diff --git a/js/src/modals/Shapeshift/OptionsStep/optionsStep.js b/js/src/modals/Shapeshift/OptionsStep/optionsStep.js index b9b029ce5..fc4dabfc0 100644 --- a/js/src/modals/Shapeshift/OptionsStep/optionsStep.js +++ b/js/src/modals/Shapeshift/OptionsStep/optionsStep.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { Checkbox, MenuItem } from 'material-ui'; -import { Form, Input, Select } from '../../../ui'; +import { Form, Input, Select } from '~/ui'; import Price from '../Price'; diff --git a/js/src/modals/Shapeshift/shapeshift.js b/js/src/modals/Shapeshift/shapeshift.js index 11409d848..562c8cbf3 100644 --- a/js/src/modals/Shapeshift/shapeshift.js +++ b/js/src/modals/Shapeshift/shapeshift.js @@ -18,7 +18,7 @@ import React, { Component, PropTypes } from 'react'; import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; import ContentClear from 'material-ui/svg-icons/content/clear'; -import { Button, IdentityIcon, Modal } from '../../ui'; +import { Button, IdentityIcon, Modal } from '~/ui'; import initShapeshift from '../../3rdparty/shapeshift'; import shapeshiftLogo from '../../../assets/images/shapeshift-logo.png'; diff --git a/js/src/modals/Transfer/Details/details.js b/js/src/modals/Transfer/Details/details.js index dcc786422..e9e1b9ee5 100644 --- a/js/src/modals/Transfer/Details/details.js +++ b/js/src/modals/Transfer/Details/details.js @@ -20,7 +20,7 @@ import { Checkbox, MenuItem } from 'material-ui'; import { isEqual } from 'lodash'; -import Form, { Input, InputAddressSelect, Select } from '../../../ui/Form'; +import Form, { Input, InputAddressSelect, Select } from '~/ui/Form'; import imageUnknown from '../../../../assets/images/contracts/unknown-64x64.png'; import styles from '../transfer.css'; diff --git a/js/src/modals/Transfer/Extras/extras.js b/js/src/modals/Transfer/Extras/extras.js index 56904b00a..f7ff4612b 100644 --- a/js/src/modals/Transfer/Extras/extras.js +++ b/js/src/modals/Transfer/Extras/extras.js @@ -16,7 +16,7 @@ import React, { Component, PropTypes } from 'react'; -import Form, { Input } from '../../../ui/Form'; +import Form, { Input } from '~/ui/Form'; import GasPriceSelector from '../GasPriceSelector'; import styles from '../transfer.css'; diff --git a/js/src/modals/Transfer/store.js b/js/src/modals/Transfer/store.js index 20dc52e5f..96553f7fa 100644 --- a/js/src/modals/Transfer/store.js +++ b/js/src/modals/Transfer/store.js @@ -18,7 +18,7 @@ import { observable, computed, action, transaction } from 'mobx'; import BigNumber from 'bignumber.js'; import ERRORS from './errors'; -import { ERROR_CODES } from '../../api/transport/error'; +import { ERROR_CODES } from '~/api/transport/error'; import { DEFAULT_GAS, DEFAULT_GASPRICE, MAX_GAS_ESTIMATION } from '../../util/constants'; const TITLES = { diff --git a/js/src/modals/Transfer/transfer.js b/js/src/modals/Transfer/transfer.js index 529cebd10..ea1f95a3d 100644 --- a/js/src/modals/Transfer/transfer.js +++ b/js/src/modals/Transfer/transfer.js @@ -24,8 +24,8 @@ import ContentClear from 'material-ui/svg-icons/content/clear'; import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; import NavigationArrowForward from 'material-ui/svg-icons/navigation/arrow-forward'; -import { newError } from '../../ui/Errors/actions'; -import { BusyStep, CompletedStep, Button, IdentityIcon, Modal, TxHash } from '../../ui'; +import { newError } from '~/ui/Errors/actions'; +import { BusyStep, CompletedStep, Button, IdentityIcon, Modal, TxHash } from '~/ui'; import Details from './Details'; import Extras from './Extras'; diff --git a/js/src/redux/actions.js b/js/src/redux/actions.js index 0e2412c58..76b363796 100644 --- a/js/src/redux/actions.js +++ b/js/src/redux/actions.js @@ -14,10 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -import { newError } from '../ui/Errors/actions'; +import { newError } from '~/ui/Errors/actions'; import { setAddressImage } from './providers/imagesActions'; import { clearStatusLogs, toggleStatusLogs, toggleStatusRefresh } from './providers/statusActions'; -import { toggleView } from '../views/Settings/actions'; +import { toggleView } from '~/views/Settings/actions'; export { newError, diff --git a/js/src/redux/middleware.js b/js/src/redux/middleware.js index c48c64673..bb11cf32f 100644 --- a/js/src/redux/middleware.js +++ b/js/src/redux/middleware.js @@ -15,11 +15,11 @@ // along with Parity. If not, see . import thunk from 'redux-thunk'; -import ErrorsMiddleware from '../ui/Errors/middleware'; -import SettingsMiddleware from '../views/Settings/middleware'; +import ErrorsMiddleware from '~/ui/Errors/middleware'; +import SettingsMiddleware from '~/views/Settings/middleware'; import SignerMiddleware from './providers/signerMiddleware'; -import statusMiddleware from '../views/Status/middleware'; +import statusMiddleware from '~/views/Status/middleware'; import CertificationsMiddleware from './providers/certifications/middleware'; export default function (api) { diff --git a/js/src/redux/providers/balances.js b/js/src/redux/providers/balances.js index 6b1084934..bce1c6077 100644 --- a/js/src/redux/providers/balances.js +++ b/js/src/redux/providers/balances.js @@ -17,9 +17,9 @@ import { throttle } from 'lodash'; import { loadTokens, setTokenReg, fetchBalances, fetchTokens, fetchTokensBalances } from './balancesActions'; -import { padRight } from '../../api/util/format'; +import { padRight } from '~/api/util/format'; -import Contracts from '../../contracts'; +import Contracts from '~/contracts'; export default class Balances { constructor (store, api) { diff --git a/js/src/redux/providers/balancesActions.js b/js/src/redux/providers/balancesActions.js index 2d00cf00d..7e276ac6d 100644 --- a/js/src/redux/providers/balancesActions.js +++ b/js/src/redux/providers/balancesActions.js @@ -19,7 +19,7 @@ import { range, uniq, isEqual } from 'lodash'; import { hashToImageUrl } from './imagesReducer'; import { setAddressImage } from './imagesActions'; -import * as ABIS from '../../contracts/abi'; +import * as ABIS from '~/contracts/abi'; import imagesEthereum from '../../../assets/images/contracts/ethereum-black-64x64.png'; const ETH = { diff --git a/js/src/redux/providers/blockchainActions.js b/js/src/redux/providers/blockchainActions.js index eac2bf62b..1dc1e076d 100644 --- a/js/src/redux/providers/blockchainActions.js +++ b/js/src/redux/providers/blockchainActions.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -import Contracts from '../../contracts'; +import Contracts from '~/contracts'; export function setBlock (blockNumber, block) { return { diff --git a/js/src/redux/providers/certifications/middleware.js b/js/src/redux/providers/certifications/middleware.js index c2f36931c..a5406051f 100644 --- a/js/src/redux/providers/certifications/middleware.js +++ b/js/src/redux/providers/certifications/middleware.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -import Contracts from '../../../contracts'; +import Contracts from '~/contracts'; import { addCertification } from './actions'; const knownCertifiers = [ 'smsverification' ]; diff --git a/js/src/redux/providers/imagesReducer.js b/js/src/redux/providers/imagesReducer.js index 3f91f262f..8738f7b0e 100644 --- a/js/src/redux/providers/imagesReducer.js +++ b/js/src/redux/providers/imagesReducer.js @@ -15,7 +15,7 @@ // along with Parity. If not, see . import { handleActions } from 'redux-actions'; -import { bytesToHex } from '../../api/util/format'; +import { bytesToHex } from '~/api/util/format'; const ZERO = '0x0000000000000000000000000000000000000000000000000000000000000000'; diff --git a/js/src/redux/providers/signerMiddleware.js b/js/src/redux/providers/signerMiddleware.js index f5cbbd8f9..1a6cbb129 100644 --- a/js/src/redux/providers/signerMiddleware.js +++ b/js/src/redux/providers/signerMiddleware.js @@ -16,7 +16,7 @@ import * as actions from './signerActions'; -import { inHex } from '../../api/format/input'; +import { inHex } from '~/api/format/input'; import { Wallet } from '../../util/wallet'; export default class SignerMiddleware { diff --git a/js/src/redux/reducers.js b/js/src/redux/reducers.js index 3c7a10fe9..49b83c465 100644 --- a/js/src/redux/reducers.js +++ b/js/src/redux/reducers.js @@ -20,9 +20,9 @@ import { routerReducer } from 'react-router-redux'; import { apiReducer, balancesReducer, blockchainReducer, compilerReducer, imagesReducer, personalReducer, signerReducer, statusReducer as nodeStatusReducer, snackbarReducer } from './providers'; import certificationsReducer from './providers/certifications/reducer'; -import errorReducer from '../ui/Errors/reducers'; -import settingsReducer from '../views/Settings/reducers'; -import tooltipReducer from '../ui/Tooltips/reducers'; +import errorReducer from '~/ui/Errors/reducers'; +import settingsReducer from '~/views/Settings/reducers'; +import tooltipReducer from '~/ui/Tooltips/reducers'; export default function () { return combineReducers({ diff --git a/js/src/redux/util.js b/js/src/redux/util.js index 0c45c4b09..37cb4f0a3 100644 --- a/js/src/redux/util.js +++ b/js/src/redux/util.js @@ -15,7 +15,7 @@ // along with Parity. If not, see . import { hashToImageUrl } from './providers/imagesReducer'; -import { withError } from '../ui/Errors/middleware'; +import { withError } from '~/ui/Errors/middleware'; export { hashToImageUrl, diff --git a/js/src/ui/Certifications/certifications.js b/js/src/ui/Certifications/certifications.js index d2f06398e..871b14e9c 100644 --- a/js/src/ui/Certifications/certifications.js +++ b/js/src/ui/Certifications/certifications.js @@ -18,8 +18,8 @@ import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { hashToImageUrl } from '../../redux/providers/imagesReducer'; -import { fetchCertifications } from '../../redux/providers/certifications/actions'; +import { hashToImageUrl } from '~/redux/providers/imagesReducer'; +import { fetchCertifications } from '~/redux/providers/certifications/actions'; import defaultIcon from '../../../assets/images/certifications/unknown.svg'; diff --git a/js/src/ui/CopyToClipboard/copyToClipboard.js b/js/src/ui/CopyToClipboard/copyToClipboard.js index 3ad316435..7a654f9ce 100644 --- a/js/src/ui/CopyToClipboard/copyToClipboard.js +++ b/js/src/ui/CopyToClipboard/copyToClipboard.js @@ -23,7 +23,7 @@ import Clipboard from 'react-copy-to-clipboard'; import CopyIcon from 'material-ui/svg-icons/content/content-copy'; import Theme from '../Theme'; -import { showSnackbar } from '../../redux/providers/snackbarActions'; +import { showSnackbar } from '~/redux/providers/snackbarActions'; const { textColor, disabledTextColor } = Theme.flatButton; diff --git a/js/src/ui/Form/InputAddress/inputAddress.js b/js/src/ui/Form/InputAddress/inputAddress.js index a3f61739f..3d8f26394 100644 --- a/js/src/ui/Form/InputAddress/inputAddress.js +++ b/js/src/ui/Form/InputAddress/inputAddress.js @@ -20,7 +20,7 @@ import { bindActionCreators } from 'redux'; import Input from '../Input'; import IdentityIcon from '../../IdentityIcon'; -import util from '../../../api/util'; +import util from '~/api/util'; import styles from './inputAddress.css'; diff --git a/js/src/ui/Form/TypedInput/typedInput.js b/js/src/ui/Form/TypedInput/typedInput.js index e93a97fc2..c099c9c6b 100644 --- a/js/src/ui/Form/TypedInput/typedInput.js +++ b/js/src/ui/Form/TypedInput/typedInput.js @@ -22,9 +22,9 @@ import IconButton from 'material-ui/IconButton'; import AddIcon from 'material-ui/svg-icons/content/add'; import RemoveIcon from 'material-ui/svg-icons/content/remove'; -import Input from '../../../ui/Form/Input'; -import InputAddressSelect from '../../../ui/Form/InputAddressSelect'; -import Select from '../../../ui/Form/Select'; +import Input from '~/ui/Form/Input'; +import InputAddressSelect from '~/ui/Form/InputAddressSelect'; +import Select from '~/ui/Form/Select'; import { ABI_TYPES } from '../../../util/abi'; diff --git a/js/src/ui/MethodDecoding/methodDecoding.js b/js/src/ui/MethodDecoding/methodDecoding.js index 1ec231611..70258f744 100644 --- a/js/src/ui/MethodDecoding/methodDecoding.js +++ b/js/src/ui/MethodDecoding/methodDecoding.js @@ -20,7 +20,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import CircularProgress from 'material-ui/CircularProgress'; -import Contracts from '../../contracts'; +import Contracts from '~/contracts'; import { Input, InputAddress } from '../Form'; import styles from './methodDecoding.css'; diff --git a/js/src/util/validation.js b/js/src/util/validation.js index c0a58655d..0666f1ad3 100644 --- a/js/src/util/validation.js +++ b/js/src/util/validation.js @@ -16,7 +16,7 @@ import BigNumber from 'bignumber.js'; -import util from '../api/util'; +import util from '~/api/util'; export const ERRORS = { invalidAddress: 'address is an invalid network address', diff --git a/js/src/util/wallet.js b/js/src/util/wallet.js index 14c3a6016..123f9f592 100644 --- a/js/src/util/wallet.js +++ b/js/src/util/wallet.js @@ -19,8 +19,8 @@ import Transaction from 'ethereumjs-tx'; import { pbkdf2Sync } from 'crypto'; import { createDecipheriv } from 'browserify-aes'; -import { inHex } from '../api/format/input'; -import { sha3 } from '../api/util/sha3'; +import { inHex } from '~/api/format/input'; +import { sha3 } from '~/api/util/sha3'; // Adapted from https://github.com/kvhnuke/etherwallet/blob/mercury/app/scripts/myetherwallet.js diff --git a/js/src/views/Account/Header/header.js b/js/src/views/Account/Header/header.js index 808998c17..3baf0e646 100644 --- a/js/src/views/Account/Header/header.js +++ b/js/src/views/Account/Header/header.js @@ -16,9 +16,9 @@ import React, { Component, PropTypes } from 'react'; -import { Balance, Container, ContainerTitle, IdentityIcon, IdentityName, Tags } from '../../../ui'; -import CopyToClipboard from '../../../ui/CopyToClipboard'; -import Certifications from '../../../ui/Certifications'; +import { Balance, Container, ContainerTitle, IdentityIcon, IdentityName, Tags } from '~/ui'; +import CopyToClipboard from '~/ui/CopyToClipboard'; +import Certifications from '~/ui/Certifications'; import styles from './header.css'; diff --git a/js/src/views/Account/Transactions/transactions.js b/js/src/views/Account/Transactions/transactions.js index 8a205b343..e71781adf 100644 --- a/js/src/views/Account/Transactions/transactions.js +++ b/js/src/views/Account/Transactions/transactions.js @@ -19,7 +19,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import etherscan from '../../../3rdparty/etherscan'; -import { Container, TxList } from '../../../ui'; +import { Container, TxList } from '~/ui'; import styles from './transactions.css'; diff --git a/js/src/views/Account/account.js b/js/src/views/Account/account.js index 835b9358c..98b0a5e97 100644 --- a/js/src/views/Account/account.js +++ b/js/src/views/Account/account.js @@ -23,16 +23,16 @@ import ContentSend from 'material-ui/svg-icons/content/send'; import LockIcon from 'material-ui/svg-icons/action/lock'; import VerifyIcon from 'material-ui/svg-icons/action/verified-user'; -import { EditMeta, DeleteAccount, Shapeshift, SMSVerification, Transfer, PasswordManager } from '../../modals'; -import { Actionbar, Button, Page } from '../../ui'; +import { EditMeta, DeleteAccount, Shapeshift, SMSVerification, Transfer, PasswordManager } from '~/modals'; +import { Actionbar, Button, Page } from '~/ui'; import shapeshiftBtn from '../../../assets/images/shapeshift-btn.png'; import Header from './Header'; import Transactions from './Transactions'; -import { setVisibleAccounts } from '../../redux/providers/personalActions'; +import { setVisibleAccounts } from '~/redux/providers/personalActions'; -import VerificationStore from '../../modals/SMSVerification/store'; +import VerificationStore from '~/modals/SMSVerification/store'; import styles from './account.css'; diff --git a/js/src/views/Accounts/List/list.js b/js/src/views/Accounts/List/list.js index ebb834584..c2e961bb8 100644 --- a/js/src/views/Accounts/List/list.js +++ b/js/src/views/Accounts/List/list.js @@ -16,7 +16,7 @@ import React, { Component, PropTypes } from 'react'; -import { Container } from '../../../ui'; +import { Container } from '~/ui'; import Summary from '../Summary'; import styles from './list.css'; diff --git a/js/src/views/Accounts/Summary/summary.js b/js/src/views/Accounts/Summary/summary.js index 4baf838ce..842629c6f 100644 --- a/js/src/views/Accounts/Summary/summary.js +++ b/js/src/views/Accounts/Summary/summary.js @@ -18,7 +18,7 @@ import React, { Component, PropTypes } from 'react'; import { Link } from 'react-router'; import { isEqual } from 'lodash'; -import { Balance, Container, ContainerTitle, IdentityIcon, IdentityName, Tags, Input } from '../../../ui'; +import { Balance, Container, ContainerTitle, IdentityIcon, IdentityName, Tags, Input } from '~/ui'; export default class Summary extends Component { static contextTypes = { diff --git a/js/src/views/Accounts/accounts.js b/js/src/views/Accounts/accounts.js index f947e8301..c32aa153e 100644 --- a/js/src/views/Accounts/accounts.js +++ b/js/src/views/Accounts/accounts.js @@ -21,9 +21,9 @@ import ContentAdd from 'material-ui/svg-icons/content/add'; import { uniq, isEqual } from 'lodash'; import List from './List'; -import { CreateAccount } from '../../modals'; -import { Actionbar, ActionbarExport, ActionbarSearch, ActionbarSort, Button, Page, Tooltip } from '../../ui'; -import { setVisibleAccounts } from '../../redux/providers/personalActions'; +import { CreateAccount } from '~/modals'; +import { Actionbar, ActionbarExport, ActionbarSearch, ActionbarSort, Button, Page, Tooltip } from '~/ui'; +import { setVisibleAccounts } from '~/redux/providers/personalActions'; import styles from './accounts.css'; diff --git a/js/src/views/Address/Delete/delete.js b/js/src/views/Address/Delete/delete.js index 8aeaf48e2..a04d6b4e0 100644 --- a/js/src/views/Address/Delete/delete.js +++ b/js/src/views/Address/Delete/delete.js @@ -18,7 +18,7 @@ import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { ConfirmDialog, IdentityIcon, IdentityName } from '../../../ui'; +import { ConfirmDialog, IdentityIcon, IdentityName } from '~/ui'; import { newError } from '../../../redux/actions'; import styles from '../address.css'; diff --git a/js/src/views/Address/address.js b/js/src/views/Address/address.js index f0a452185..6c0ff0920 100644 --- a/js/src/views/Address/address.js +++ b/js/src/views/Address/address.js @@ -20,13 +20,13 @@ import { bindActionCreators } from 'redux'; import ActionDelete from 'material-ui/svg-icons/action/delete'; import ContentCreate from 'material-ui/svg-icons/content/create'; -import { EditMeta } from '../../modals'; -import { Actionbar, Button, Page } from '../../ui'; +import { EditMeta } from '~/modals'; +import { Actionbar, Button, Page } from '~/ui'; import Header from '../Account/Header'; import Transactions from '../Account/Transactions'; import Delete from './Delete'; -import { setVisibleAccounts } from '../../redux/providers/personalActions'; +import { setVisibleAccounts } from '~/redux/providers/personalActions'; import styles from './address.css'; diff --git a/js/src/views/Addresses/addresses.js b/js/src/views/Addresses/addresses.js index 685d21857..4edfb0e6e 100644 --- a/js/src/views/Addresses/addresses.js +++ b/js/src/views/Addresses/addresses.js @@ -22,9 +22,9 @@ import { uniq, isEqual } from 'lodash'; import List from '../Accounts/List'; import Summary from '../Accounts/Summary'; -import { AddAddress } from '../../modals'; -import { Actionbar, ActionbarExport, ActionbarImport, ActionbarSearch, ActionbarSort, Button, Page } from '../../ui'; -import { setVisibleAccounts } from '../../redux/providers/personalActions'; +import { AddAddress } from '~/modals'; +import { Actionbar, ActionbarExport, ActionbarImport, ActionbarSearch, ActionbarSort, Button, Page } from '~/ui'; +import { setVisibleAccounts } from '~/redux/providers/personalActions'; import styles from './addresses.css'; diff --git a/js/src/views/Application/Container/container.js b/js/src/views/Application/Container/container.js index d3908f570..592e5a340 100644 --- a/js/src/views/Application/Container/container.js +++ b/js/src/views/Application/Container/container.js @@ -16,8 +16,8 @@ import React, { Component, PropTypes } from 'react'; -import { FirstRun } from '../../../modals'; -import { Errors, ParityBackground, Tooltips } from '../../../ui'; +import { FirstRun } from '~/modals'; +import { Errors, ParityBackground, Tooltips } from '~/ui'; import styles from '../application.css'; diff --git a/js/src/views/Application/DappContainer/dappContainer.js b/js/src/views/Application/DappContainer/dappContainer.js index 7681355b5..13ecde190 100644 --- a/js/src/views/Application/DappContainer/dappContainer.js +++ b/js/src/views/Application/DappContainer/dappContainer.js @@ -16,7 +16,7 @@ import React, { Component, PropTypes } from 'react'; -import { Errors } from '../../../ui'; +import { Errors } from '~/ui'; import styles from '../application.css'; diff --git a/js/src/views/Application/Snackbar/snackbar.js b/js/src/views/Application/Snackbar/snackbar.js index fdeb48c57..f7232069a 100644 --- a/js/src/views/Application/Snackbar/snackbar.js +++ b/js/src/views/Application/Snackbar/snackbar.js @@ -21,7 +21,7 @@ import { bindActionCreators } from 'redux'; import { Snackbar as SnackbarMUI } from 'material-ui'; import { darkBlack, grey800 } from 'material-ui/styles/colors'; -import { closeSnackbar } from '../../../redux/providers/snackbarActions'; +import { closeSnackbar } from '~/redux/providers/snackbarActions'; const bodyStyle = { backgroundColor: darkBlack, diff --git a/js/src/views/Application/Status/status.js b/js/src/views/Application/Status/status.js index 287e7a6ee..bb48ce6f8 100644 --- a/js/src/views/Application/Status/status.js +++ b/js/src/views/Application/Status/status.js @@ -18,8 +18,8 @@ import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { BlockStatus } from '../../../ui'; -import CopyToClipboard from '../../../ui/CopyToClipboard'; +import { BlockStatus } from '~/ui'; +import CopyToClipboard from '~/ui/CopyToClipboard'; import styles from './status.css'; diff --git a/js/src/views/Application/TabBar/tabBar.js b/js/src/views/Application/TabBar/tabBar.js index ac8a28866..8eadcc4d4 100644 --- a/js/src/views/Application/TabBar/tabBar.js +++ b/js/src/views/Application/TabBar/tabBar.js @@ -21,7 +21,7 @@ import { Toolbar, ToolbarGroup } from 'material-ui/Toolbar'; import { Tab as MUITab } from 'material-ui/Tabs'; import { isEqual } from 'lodash'; -import { Badge, Tooltip } from '../../../ui'; +import { Badge, Tooltip } from '~/ui'; import styles from './tabBar.css'; import imagesEthcoreBlock from '../../../../assets/images/parity-logo-white-no-text.svg'; diff --git a/js/src/views/Connection/connection.js b/js/src/views/Connection/connection.js index 2929b38b8..451624a2b 100644 --- a/js/src/views/Connection/connection.js +++ b/js/src/views/Connection/connection.js @@ -23,7 +23,7 @@ import ActionDashboard from 'material-ui/svg-icons/action/dashboard'; import HardwareDesktopMac from 'material-ui/svg-icons/hardware/desktop-mac'; import NotificationVpnLock from 'material-ui/svg-icons/notification/vpn-lock'; -import { Input } from '../../ui'; +import { Input } from '~/ui'; import styles from './connection.css'; diff --git a/js/src/views/Contract/Events/Event/event.js b/js/src/views/Contract/Events/Event/event.js index 17fd56051..b42295198 100644 --- a/js/src/views/Contract/Events/Event/event.js +++ b/js/src/views/Contract/Events/Event/event.js @@ -18,8 +18,8 @@ import BigNumber from 'bignumber.js'; import moment from 'moment'; import React, { Component, PropTypes } from 'react'; -import { IdentityIcon, IdentityName, Input, InputAddress } from '../../../../ui'; -import ShortenedHash from '../../../../ui/ShortenedHash'; +import { IdentityIcon, IdentityName, Input, InputAddress } from '~/ui'; +import ShortenedHash from '~/ui/ShortenedHash'; import { txLink } from '../../../../3rdparty/etherscan/links'; import styles from '../../contract.css'; diff --git a/js/src/views/Contract/Events/events.js b/js/src/views/Contract/Events/events.js index 5558be499..f0bee3e25 100644 --- a/js/src/views/Contract/Events/events.js +++ b/js/src/views/Contract/Events/events.js @@ -16,7 +16,7 @@ import React, { Component, PropTypes } from 'react'; -import { Container } from '../../../ui'; +import { Container } from '~/ui'; import Event from './Event'; import styles from '../contract.css'; diff --git a/js/src/views/Contract/Queries/inputQuery.js b/js/src/views/Contract/Queries/inputQuery.js index 708f4a652..4ebdc62db 100644 --- a/js/src/views/Contract/Queries/inputQuery.js +++ b/js/src/views/Contract/Queries/inputQuery.js @@ -19,7 +19,7 @@ import React, { Component, PropTypes } from 'react'; import LinearProgress from 'material-ui/LinearProgress'; import { Card, CardActions, CardTitle, CardText } from 'material-ui/Card'; -import { Button, Input, InputAddress, InputAddressSelect } from '../../../ui'; +import { Button, Input, InputAddress, InputAddressSelect } from '~/ui'; import styles from './queries.css'; diff --git a/js/src/views/Contract/Queries/queries.js b/js/src/views/Contract/Queries/queries.js index 5c69ab76e..9a13037f6 100644 --- a/js/src/views/Contract/Queries/queries.js +++ b/js/src/views/Contract/Queries/queries.js @@ -19,7 +19,7 @@ import React, { Component, PropTypes } from 'react'; import { Card, CardTitle, CardText } from 'material-ui/Card'; import InputQuery from './inputQuery'; -import { Container, Input, InputAddress } from '../../../ui'; +import { Container, Input, InputAddress } from '~/ui'; import styles from './queries.css'; diff --git a/js/src/views/Contract/contract.js b/js/src/views/Contract/contract.js index 54d06f228..ce30496d4 100644 --- a/js/src/views/Contract/contract.js +++ b/js/src/views/Contract/contract.js @@ -24,10 +24,10 @@ import EyeIcon from 'material-ui/svg-icons/image/remove-red-eye'; import ContentClear from 'material-ui/svg-icons/content/clear'; import { newError } from '../../redux/actions'; -import { setVisibleAccounts } from '../../redux/providers/personalActions'; +import { setVisibleAccounts } from '~/redux/providers/personalActions'; -import { EditMeta, ExecuteContract } from '../../modals'; -import { Actionbar, Button, Page, Modal, Editor } from '../../ui'; +import { EditMeta, ExecuteContract } from '~/modals'; +import { Actionbar, Button, Page, Modal, Editor } from '~/ui'; import Header from '../Account/Header'; import Delete from '../Address/Delete'; diff --git a/js/src/views/Contracts/Summary/summary.js b/js/src/views/Contracts/Summary/summary.js index 4df795797..5b34a6b51 100644 --- a/js/src/views/Contracts/Summary/summary.js +++ b/js/src/views/Contracts/Summary/summary.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { Link } from 'react-router'; -import { Container, ContainerTitle, IdentityIcon, IdentityName } from '../../../ui'; +import { Container, ContainerTitle, IdentityIcon, IdentityName } from '~/ui'; export default class Summary extends Component { static contextTypes = { diff --git a/js/src/views/Contracts/contracts.js b/js/src/views/Contracts/contracts.js index 2f7ac2478..d97d88b09 100644 --- a/js/src/views/Contracts/contracts.js +++ b/js/src/views/Contracts/contracts.js @@ -22,9 +22,9 @@ import ContentAdd from 'material-ui/svg-icons/content/add'; import FileIcon from 'material-ui/svg-icons/action/description'; import { uniq, isEqual } from 'lodash'; -import { Actionbar, ActionbarSearch, ActionbarSort, Button, Page } from '../../ui'; -import { AddContract, DeployContract } from '../../modals'; -import { setVisibleAccounts } from '../../redux/providers/personalActions'; +import { Actionbar, ActionbarSearch, ActionbarSort, Button, Page } from '~/ui'; +import { AddContract, DeployContract } from '~/modals'; +import { setVisibleAccounts } from '~/redux/providers/personalActions'; import List from '../Accounts/List'; diff --git a/js/src/views/Dapps/AddDapps/AddDapps.js b/js/src/views/Dapps/AddDapps/AddDapps.js index b18e31704..71d03dc50 100644 --- a/js/src/views/Dapps/AddDapps/AddDapps.js +++ b/js/src/views/Dapps/AddDapps/AddDapps.js @@ -20,7 +20,7 @@ import DoneIcon from 'material-ui/svg-icons/action/done'; import { List, ListItem } from 'material-ui/List'; import Checkbox from 'material-ui/Checkbox'; -import { Modal, Button } from '../../../ui'; +import { Modal, Button } from '~/ui'; import styles from './AddDapps.css'; diff --git a/js/src/views/Dapps/Summary/summary.js b/js/src/views/Dapps/Summary/summary.js index b0963a560..76045ff70 100644 --- a/js/src/views/Dapps/Summary/summary.js +++ b/js/src/views/Dapps/Summary/summary.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { Link } from 'react-router'; -import { Container, ContainerTitle, Tags } from '../../../ui'; +import { Container, ContainerTitle, Tags } from '~/ui'; import styles from './summary.css'; diff --git a/js/src/views/Dapps/dapps.js b/js/src/views/Dapps/dapps.js index 7faead576..cf847202a 100644 --- a/js/src/views/Dapps/dapps.js +++ b/js/src/views/Dapps/dapps.js @@ -18,7 +18,7 @@ import React, { Component, PropTypes } from 'react'; import { Checkbox } from 'material-ui'; import { observer } from 'mobx-react'; -import { Actionbar, Page } from '../../ui'; +import { Actionbar, Page } from '~/ui'; import FlatButton from 'material-ui/FlatButton'; import EyeIcon from 'material-ui/svg-icons/image/remove-red-eye'; diff --git a/js/src/views/Dapps/dappsStore.js b/js/src/views/Dapps/dappsStore.js index 697a9e2cc..0b3faeb68 100644 --- a/js/src/views/Dapps/dappsStore.js +++ b/js/src/views/Dapps/dappsStore.js @@ -18,7 +18,7 @@ import BigNumber from 'bignumber.js'; import { action, computed, observable, transaction } from 'mobx'; import store from 'store'; -import Contracts from '../../contracts'; +import Contracts from '~/contracts'; import { hashToImageUrl } from '../../redux/util'; import builtinApps from './builtin.json'; diff --git a/js/src/views/ParityBar/parityBar.js b/js/src/views/ParityBar/parityBar.js index 40fe659ad..14b71aa10 100644 --- a/js/src/views/ParityBar/parityBar.js +++ b/js/src/views/ParityBar/parityBar.js @@ -21,7 +21,7 @@ import { bindActionCreators } from 'redux'; import ActionFingerprint from 'material-ui/svg-icons/action/fingerprint'; import ContentClear from 'material-ui/svg-icons/content/clear'; -import { Badge, Button, ContainerTitle, ParityBackground } from '../../ui'; +import { Badge, Button, ContainerTitle, ParityBackground } from '~/ui'; import { Embedded as Signer } from '../Signer'; import imagesEthcoreBlock from '../../../assets/images/parity-logo-white-no-text.svg'; diff --git a/js/src/views/Settings/Background/background.js b/js/src/views/Settings/Background/background.js index d771c4239..0551a6145 100644 --- a/js/src/views/Settings/Background/background.js +++ b/js/src/views/Settings/Background/background.js @@ -19,7 +19,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import NavigationRefresh from 'material-ui/svg-icons/navigation/refresh'; -import { Button, Container, ParityBackground } from '../../../ui'; +import { Button, Container, ParityBackground } from '~/ui'; import { updateBackground } from '../actions'; diff --git a/js/src/views/Settings/Parity/parity.js b/js/src/views/Settings/Parity/parity.js index e5e5233d0..1535f6cf2 100644 --- a/js/src/views/Settings/Parity/parity.js +++ b/js/src/views/Settings/Parity/parity.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { MenuItem } from 'material-ui'; -import { Select, Container } from '../../../ui'; +import { Select, Container } from '~/ui'; import layout from '../layout.css'; diff --git a/js/src/views/Settings/Proxy/proxy.js b/js/src/views/Settings/Proxy/proxy.js index 3d2a607bc..cc7fad370 100644 --- a/js/src/views/Settings/Proxy/proxy.js +++ b/js/src/views/Settings/Proxy/proxy.js @@ -16,7 +16,7 @@ import React, { Component, PropTypes } from 'react'; -import { Container } from '../../../ui'; +import { Container } from '~/ui'; import layout from '../layout.css'; import styles from './proxy.css'; diff --git a/js/src/views/Settings/Views/views.js b/js/src/views/Settings/Views/views.js index e5fdedf5c..261109664 100644 --- a/js/src/views/Settings/Views/views.js +++ b/js/src/views/Settings/Views/views.js @@ -19,7 +19,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { Checkbox } from 'material-ui'; -import { Container } from '../../../ui'; +import { Container } from '~/ui'; import { toggleView } from '../actions'; diff --git a/js/src/views/Settings/settings.js b/js/src/views/Settings/settings.js index 4b38b1ccf..54b4fa6dd 100644 --- a/js/src/views/Settings/settings.js +++ b/js/src/views/Settings/settings.js @@ -20,7 +20,7 @@ import ActionSettingsEthernet from 'material-ui/svg-icons/action/settings-ethern import ImageBlurOn from 'material-ui/svg-icons/image/blur-on'; import ImageRemoveRedEye from 'material-ui/svg-icons/image/remove-red-eye'; -import { Actionbar, Page } from '../../ui'; +import { Actionbar, Page } from '~/ui'; import imagesEthcoreBlock from '../../../assets/images/parity-logo-white-no-text.svg'; import styles from './settings.css'; diff --git a/js/src/views/Signer/components/Account/Account.js b/js/src/views/Signer/components/Account/Account.js index b6e7f2e48..05ca180c6 100644 --- a/js/src/views/Signer/components/Account/Account.js +++ b/js/src/views/Signer/components/Account/Account.js @@ -16,7 +16,7 @@ import React, { Component, PropTypes } from 'react'; -import { IdentityIcon, IdentityName } from '../../../../ui'; +import { IdentityIcon, IdentityName } from '~/ui'; import AccountLink from './AccountLink'; import styles from './Account.css'; diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.js index f2cc0f910..7d2d660df 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.js @@ -20,7 +20,7 @@ import { bindActionCreators } from 'redux'; import RaisedButton from 'material-ui/RaisedButton'; import ReactTooltip from 'react-tooltip'; -import { Form, Input, IdentityIcon } from '../../../../../ui'; +import { Form, Input, IdentityIcon } from '~/ui'; import styles from './TransactionPendingFormConfirm.css'; diff --git a/js/src/views/Signer/containers/Embedded/embedded.js b/js/src/views/Signer/containers/Embedded/embedded.js index af008609c..57639ea11 100644 --- a/js/src/views/Signer/containers/Embedded/embedded.js +++ b/js/src/views/Signer/containers/Embedded/embedded.js @@ -20,8 +20,8 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import Store from '../../store'; -import * as RequestsActions from '../../../../redux/providers/signerActions'; -import { Container } from '../../../../ui'; +import * as RequestsActions from '~/redux/providers/signerActions'; +import { Container } from '~/ui'; import RequestPending from '../../components/RequestPending'; diff --git a/js/src/views/Signer/containers/RequestsPage/RequestsPage.js b/js/src/views/Signer/containers/RequestsPage/RequestsPage.js index 1ee88fc09..ecb2ccd43 100644 --- a/js/src/views/Signer/containers/RequestsPage/RequestsPage.js +++ b/js/src/views/Signer/containers/RequestsPage/RequestsPage.js @@ -21,8 +21,8 @@ import { connect } from 'react-redux'; import { observer } from 'mobx-react'; import Store from '../../store'; -import * as RequestsActions from '../../../../redux/providers/signerActions'; -import { Container, Page, TxList } from '../../../../ui'; +import * as RequestsActions from '~/redux/providers/signerActions'; +import { Container, Page, TxList } from '~/ui'; import RequestPending from '../../components/RequestPending'; diff --git a/js/src/views/Signer/signer.js b/js/src/views/Signer/signer.js index 32aca9c82..536cf1d37 100644 --- a/js/src/views/Signer/signer.js +++ b/js/src/views/Signer/signer.js @@ -16,7 +16,7 @@ import React, { Component } from 'react'; -import { Actionbar } from '../../ui'; +import { Actionbar } from '~/ui'; import RequestsPage from './containers/RequestsPage'; import styles from './signer.css'; diff --git a/js/src/views/Status/components/Debug/Debug.js b/js/src/views/Status/components/Debug/Debug.js index d0e0c1d79..84ce1bb87 100644 --- a/js/src/views/Status/components/Debug/Debug.js +++ b/js/src/views/Status/components/Debug/Debug.js @@ -20,7 +20,7 @@ import AvPlay from 'material-ui/svg-icons/av/play-arrow'; import AvReplay from 'material-ui/svg-icons/av/replay'; import ReorderIcon from 'material-ui/svg-icons/action/reorder'; -import { Container } from '../../../../ui'; +import { Container } from '~/ui'; import styles from './Debug.css'; diff --git a/js/src/views/Status/components/MiningSettings/MiningSettings.js b/js/src/views/Status/components/MiningSettings/MiningSettings.js index 163c103f5..52cab63b9 100644 --- a/js/src/views/Status/components/MiningSettings/MiningSettings.js +++ b/js/src/views/Status/components/MiningSettings/MiningSettings.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import formatNumber from 'format-number'; -import { ContainerTitle, Input } from '../../../../ui'; +import { ContainerTitle, Input } from '~/ui'; import { numberFromString } from './numberFromString'; import { decodeExtraData } from './decodeExtraData'; diff --git a/js/src/views/Status/components/Status/Status.js b/js/src/views/Status/components/Status/Status.js index 949efc85d..e2d65cb9a 100644 --- a/js/src/views/Status/components/Status/Status.js +++ b/js/src/views/Status/components/Status/Status.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import bytes from 'bytes'; -import { Container, ContainerTitle, Input } from '../../../../ui'; +import { Container, ContainerTitle, Input } from '~/ui'; import styles from './Status.css'; import MiningSettings from '../MiningSettings'; diff --git a/js/src/views/Status/status.js b/js/src/views/Status/status.js index 881c125ba..ff13f1a07 100644 --- a/js/src/views/Status/status.js +++ b/js/src/views/Status/status.js @@ -16,7 +16,7 @@ import React, { Component } from 'react'; -import { Actionbar, Page } from '../../ui'; +import { Actionbar, Page } from '~/ui'; import StatusPage from './containers/StatusPage'; diff --git a/js/src/views/WriteContract/writeContract.js b/js/src/views/WriteContract/writeContract.js index 9598c4d43..7b0902c1f 100644 --- a/js/src/views/WriteContract/writeContract.js +++ b/js/src/views/WriteContract/writeContract.js @@ -28,10 +28,10 @@ import ListIcon from 'material-ui/svg-icons/action/view-list'; import SettingsIcon from 'material-ui/svg-icons/action/settings'; import SendIcon from 'material-ui/svg-icons/content/send'; -import { Actionbar, ActionbarExport, ActionbarImport, Button, Editor, Page, Select, Input } from '../../ui'; -import { DeployContract, SaveContract, LoadContract } from '../../modals'; +import { Actionbar, ActionbarExport, ActionbarImport, Button, Editor, Page, Select, Input } from '~/ui'; +import { DeployContract, SaveContract, LoadContract } from '~/modals'; -import { setupWorker } from '../../redux/providers/compilerActions'; +import { setupWorker } from '~/redux/providers/compilerActions'; import WriteContractStore from './writeContractStore'; import styles from './writeContract.css'; diff --git a/js/test/mocha.config.js b/js/test/mocha.config.js index 28d2ac2a5..adc43530e 100644 --- a/js/test/mocha.config.js +++ b/js/test/mocha.config.js @@ -24,7 +24,7 @@ import 'mock-local-storage'; import chai from 'chai'; import chaiEnzyme from 'chai-enzyme'; import sinonChai from 'sinon-chai'; -import { w3cwebsocket } from 'websocket'; +import { WebSocket } from 'mock-socket'; import jsdom from 'jsdom'; chai.use(chaiEnzyme()); @@ -32,7 +32,7 @@ chai.use(sinonChai); // expose expect to global so we won't have to manually import & define it in every test global.expect = chai.expect; -global.WebSocket = w3cwebsocket; +global.WebSocket = WebSocket; // setup jsdom global.document = jsdom.jsdom(''); diff --git a/js/webpack/app.js b/js/webpack/app.js index 5a7d8cb5d..5998cf30b 100644 --- a/js/webpack/app.js +++ b/js/webpack/app.js @@ -112,6 +112,9 @@ module.exports = { }, resolve: { + alias: { + '~': path.resolve(__dirname, '../src') + }, modules: [ path.join(__dirname, '../node_modules') ], diff --git a/js/webpack/vendor.js b/js/webpack/vendor.js index dfef25464..535edd970 100644 --- a/js/webpack/vendor.js +++ b/js/webpack/vendor.js @@ -28,7 +28,6 @@ let modules = [ 'blockies', 'brace', 'browserify-aes', - 'chart.js', 'ethereumjs-tx', 'lodash', 'material-ui', diff --git a/json/src/spec/seal.rs b/json/src/spec/seal.rs index a1a53819a..0daea1ba4 100644 --- a/json/src/spec/seal.rs +++ b/json/src/spec/seal.rs @@ -32,9 +32,7 @@ pub struct Ethereum { /// Generic seal. #[derive(Debug, PartialEq, Deserialize)] pub struct Generic { - /// Number of fields. - pub fields: usize, - /// Their rlp. + /// Seal rlp. pub rlp: Bytes, } @@ -63,8 +61,7 @@ mod tests { } },{ "generic": { - "fields": 1, - "rlp": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa" + "rlp": "0xe011bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa" } }]"#; let _deserialized: Vec = serde_json::from_str(s).unwrap();