Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Use Webpack Aliases #3711

Merged
merged 14 commits into from
Dec 5, 2016
2 changes: 1 addition & 1 deletion js/src/contracts/badgereg.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

import { bytesToHex, hex2Ascii } from '../api/util/format';
import { bytesToHex, hex2Ascii } from '~/api/util/format';

import ABI from './abi/certifier.json';

Expand Down
2 changes: 1 addition & 1 deletion js/src/dapps/basiccoin/Transfer/Send/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion js/src/dapps/basiccoin/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions js/src/dapps/dappreg/dappsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion js/src/dapps/githubhint/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

import * as abis from '../../contracts/abi';
import * as abis from '~/contracts/abi';
import { api } from './parity';

export function attachInterface () {
Expand Down
2 changes: 1 addition & 1 deletion js/src/dapps/registry/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

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';
Expand Down
2 changes: 1 addition & 1 deletion js/src/dapps/signaturereg/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

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);
Expand Down
2 changes: 1 addition & 1 deletion js/src/dapps/tokenreg/Status/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

import Contracts from '../../../contracts';
import Contracts from '~/contracts';

import { loadToken, setTokenPending, deleteToken, setTokenData } from '../Tokens/actions';

Expand Down
2 changes: 1 addition & 1 deletion js/src/dapps/tokenreg/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions js/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ import { useRouterHistory } 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';

Expand Down
2 changes: 1 addition & 1 deletion js/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/AddAddress/addAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions js/src/modals/AddContract/addContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/CreateAccount/NewAccount/newAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/CreateAccount/NewGeth/newGeth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/CreateAccount/NewImport/newImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/CreateAccount/RawKey/rawKey.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
4 changes: 2 additions & 2 deletions js/src/modals/CreateAccount/createAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/DeleteAccount/deleteAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/DeployContract/DetailsStep/detailsStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions js/src/modals/DeployContract/deployContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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' },
Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/EditMeta/editMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/ExecuteContract/DetailsStep/detailsStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
4 changes: 2 additions & 2 deletions js/src/modals/ExecuteContract/executeContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
4 changes: 2 additions & 2 deletions js/src/modals/FirstRun/firstRun.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ 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';

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';
Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/LoadContract/loadContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
6 changes: 3 additions & 3 deletions js/src/modals/PasswordManager/passwordManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
4 changes: 2 additions & 2 deletions js/src/modals/SMSVerification/GatherData/gatherData.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/SMSVerification/QueryCode/queryCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/SMSVerification/SMSVerification.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/SMSVerification/SendRequest/sendRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
6 changes: 3 additions & 3 deletions js/src/modals/SMSVerification/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion js/src/modals/SaveContract/saveContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Loading