Fix API references to @parity/api
This commit is contained in:
parent
b3dfc0b6db
commit
23469a99e8
@ -16,7 +16,8 @@
|
||||
|
||||
import secp256k1 from 'secp256k1';
|
||||
import { keccak_256 as keccak256 } from 'js-sha3';
|
||||
import { bytesToHex } from '~/api/util/format';
|
||||
|
||||
import { bytesToHex } from '../../util/format';
|
||||
|
||||
const isWorker = typeof self !== 'undefined';
|
||||
|
||||
|
@ -20,8 +20,9 @@ import { FormattedMessage } from 'react-intl';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
|
||||
import { createIdentityImg } from '@parity/api/util/identity';
|
||||
|
||||
import ParityLogo from '~/../assets/images/parity-logo-black-no-text.svg';
|
||||
import { createIdentityImg } from '~/api/util/identity';
|
||||
import { newError } from '~/redux/actions';
|
||||
import { Button, ModalBox, Portal } from '~/ui';
|
||||
import { CancelIcon, CheckIcon, DoneIcon, NextIcon, PrevIcon, PrintIcon } from '~/ui/Icons';
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import { action, computed, observable, transaction } from 'mobx';
|
||||
|
||||
import apiutil from '~/api/util';
|
||||
import apiutil from '@parity/api/util';
|
||||
|
||||
import ERRORS from './errors';
|
||||
|
||||
|
@ -17,7 +17,8 @@
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { fromWei } from '~/api/util/wei';
|
||||
import { fromWei } from '@parity/api/util/wei';
|
||||
|
||||
import { CompletedStep, IdentityIcon, CopyToClipboard } from '~/ui';
|
||||
|
||||
import styles from '../createWallet.css';
|
||||
|
@ -19,13 +19,14 @@ import { observable, computed, action, transaction } from 'mobx';
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import Contract from '~/api/contract';
|
||||
import Contract from '@parity/api/contract';
|
||||
import { toWei } from '@parity/api/util/wei';
|
||||
|
||||
import Contracts from '~/contracts';
|
||||
import { wallet as walletAbi } from '~/contracts/abi';
|
||||
import { wallet as walletCode, walletLibrary as walletLibraryCode, walletLibraryRegKey, fullWalletCode } from '~/contracts/code/wallet';
|
||||
|
||||
import { validateUint, validateAddress, validateName } from '~/util/validation';
|
||||
import { toWei } from '~/api/util/wei';
|
||||
import { deploy } from '~/util/tx';
|
||||
import WalletsUtils from '~/util/wallets';
|
||||
|
||||
|
@ -19,7 +19,8 @@ import React, { Component, PropTypes } from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { toWei } from '~/api/util/wei';
|
||||
import { toWei } from '@parity/api/util/wei';
|
||||
|
||||
import { Button, GasPriceEditor, IdentityIcon, Portal, Warning } from '~/ui';
|
||||
import { CancelIcon, NextIcon, PrevIcon } from '~/ui/Icons';
|
||||
import { MAX_GAS_ESTIMATION } from '~/util/constants';
|
||||
|
@ -15,7 +15,8 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import { action, computed, observable, transaction } from 'mobx';
|
||||
import apiutil from '~/api/util';
|
||||
|
||||
import apiutil from '@parity/api/util';
|
||||
|
||||
const ENDPOINT = 'http://faucet.kovan.network/api/';
|
||||
|
||||
|
@ -20,8 +20,9 @@ import { FormattedMessage } from 'react-intl';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
|
||||
import { createIdentityImg } from '@parity/api/util/identity';
|
||||
|
||||
import ParityLogo from '~/../assets/images/parity-logo-black-no-text.svg';
|
||||
import { createIdentityImg } from '~/api/util/identity';
|
||||
import { newError } from '~/redux/actions';
|
||||
import { Button, Portal } from '~/ui';
|
||||
import { CheckIcon, DoneIcon, NextIcon, PrintIcon } from '~/ui/Icons';
|
||||
|
@ -18,9 +18,10 @@ import { noop } from 'lodash';
|
||||
import { observable, computed, action, transaction } from 'mobx';
|
||||
import BigNumber from 'bignumber.js';
|
||||
|
||||
import Contract from '@parity/api/contract';
|
||||
import { fromWei } from '@parity/api/util/wei';
|
||||
|
||||
import { eip20 as tokenAbi, wallet as walletAbi } from '~/contracts/abi';
|
||||
import { fromWei } from '~/api/util/wei';
|
||||
import Contract from '~/api/contract';
|
||||
import ERRORS from './errors';
|
||||
import { DEFAULT_GAS, DEFAULT_GASPRICE, MAX_GAS_ESTIMATION } from '~/util/constants';
|
||||
import { ETH_TOKEN } from '~/util/tokens';
|
||||
|
@ -19,7 +19,8 @@ import { FormattedMessage } from 'react-intl';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { Checkbox } from 'material-ui';
|
||||
|
||||
import { fromWei } from '~/api/util/wei';
|
||||
import { fromWei } from '@parity/api/util/wei';
|
||||
|
||||
import { Form, Input } from '~/ui';
|
||||
import { DoneIcon, ErrorIcon, InfoIcon } from '~/ui/Icons';
|
||||
import { nullableProptype } from '~/util/proptypes';
|
||||
|
@ -15,8 +15,9 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import { observable, computed, action } from 'mobx';
|
||||
import { sha3 } from '~/api/util/sha3';
|
||||
import { bytesToHex } from '~/api/util/format';
|
||||
|
||||
import { bytesToHex } from '@parity/api/util/format';
|
||||
import { sha3 } from '@parity/api/util/sha3';
|
||||
|
||||
import EmailVerificationABI from '~/contracts/abi/email-verification.json';
|
||||
import VerificationStore, {
|
||||
|
@ -15,10 +15,11 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import { observable, autorun, action } from 'mobx';
|
||||
import { sha3 } from '~/api/util/sha3';
|
||||
import Contract from '~/api/contract';
|
||||
import Contracts from '~/contracts';
|
||||
|
||||
import Contract from '@parity/api/contract';
|
||||
import { sha3 } from '@parity/api/util/sha3';
|
||||
|
||||
import Contracts from '~/contracts';
|
||||
import { checkIfVerified, findLastRequested, awaitPuzzle } from '~/contracts/verification';
|
||||
import { checkIfTxFailed, waitForConfirmations } from '~/util/tx';
|
||||
|
||||
|
@ -20,9 +20,10 @@ import { connect } from 'react-redux';
|
||||
import { observer } from 'mobx-react';
|
||||
import { pick } from 'lodash';
|
||||
|
||||
import { fromWei } from '@parity/api/util/wei';
|
||||
|
||||
import { AddressSelect, Button, Form, TypedInput, Input, InputAddress, Portal } from '~/ui';
|
||||
import { CancelIcon, NextIcon } from '~/ui/Icons';
|
||||
import { fromWei } from '~/api/util/wei';
|
||||
|
||||
import WalletSettingsStore from './walletSettingsStore.js';
|
||||
import styles from './walletSettings.css';
|
||||
|
@ -16,9 +16,10 @@
|
||||
|
||||
import { throttle } from 'lodash';
|
||||
|
||||
import { padRight } from '@parity/api/util/format';
|
||||
|
||||
import { fetchBalances, fetchTokensBalances, queryTokensFilter } from './balancesActions';
|
||||
import { loadTokens, fetchTokens } from './tokensActions';
|
||||
import { padRight } from '~/api/util/format';
|
||||
|
||||
import Contracts from '~/contracts';
|
||||
|
||||
|
@ -17,10 +17,11 @@
|
||||
import { uniq, isEqual } from 'lodash';
|
||||
import { push } from 'react-router-redux';
|
||||
|
||||
import { sha3 } from '@parity/api/util/sha3';
|
||||
|
||||
import { notifyTransaction } from '~/util/notifications';
|
||||
import { ETH_TOKEN, fetchAccountsBalances } from '~/util/tokens';
|
||||
import { LOG_KEYS, getLogger } from '~/config';
|
||||
import { sha3 } from '~/api/util/sha3';
|
||||
|
||||
const TRANSFER_SIGNATURE = sha3('Transfer(address,address,uint256)');
|
||||
|
||||
|
@ -16,13 +16,14 @@
|
||||
|
||||
import { uniq, range, debounce } from 'lodash';
|
||||
|
||||
import { addCertification, removeCertification } from './actions';
|
||||
import Contract from '@parity/api/contract';
|
||||
|
||||
import { getLogger, LOG_KEYS } from '~/config';
|
||||
import Contract from '~/api/contract';
|
||||
import Contracts from '~/contracts';
|
||||
import CertifierABI from '~/contracts/abi/certifier.json';
|
||||
|
||||
import { addCertification, removeCertification } from './actions';
|
||||
|
||||
const log = getLogger(LOG_KEYS.CertificationsMiddleware);
|
||||
|
||||
// TODO: move this to a more general place
|
||||
|
@ -15,7 +15,8 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import { handleActions } from 'redux-actions';
|
||||
import { bytesToHex } from '~/api/util/format';
|
||||
|
||||
import { bytesToHex } from '@parity/api/util/format';
|
||||
|
||||
const ZERO = '0x0000000000000000000000000000000000000000000000000000000000000000';
|
||||
|
||||
|
@ -16,11 +16,12 @@
|
||||
|
||||
import { isEqual, intersection } from 'lodash';
|
||||
|
||||
import Contract from '@parity/api/contract';
|
||||
|
||||
import BalancesProvider from './balances';
|
||||
import { updateTokensFilter } from './balancesActions';
|
||||
import { attachWallets } from './walletActions';
|
||||
|
||||
import Contract from '~/api/contract';
|
||||
import MethodDecodingStore from '~/ui/MethodDecoding/methodDecodingStore';
|
||||
import WalletsUtils from '~/util/wallets';
|
||||
import { wallet as WalletAbi } from '~/contracts/abi';
|
||||
|
@ -16,7 +16,8 @@
|
||||
|
||||
import BigNumber from 'bignumber.js';
|
||||
|
||||
import { outTransaction } from '~/api/format/output';
|
||||
import { outTransaction } from '@parity/api/format/output';
|
||||
|
||||
import { trackRequest as trackRequestUtil, parseTransactionReceipt } from '~/util/tx';
|
||||
import SavedRequests from '~/views/Application/Requests/savedRequests';
|
||||
|
||||
|
@ -16,7 +16,8 @@
|
||||
|
||||
import * as actions from './signerActions';
|
||||
|
||||
import { inHex } from '~/api/format/input';
|
||||
import { inHex } from '@parity/api/format/input';
|
||||
|
||||
import HardwareStore from '~/mobx/hardwareStore';
|
||||
import { createSignedTx } from '~/util/qrscan';
|
||||
import { Signer } from '~/util/signer';
|
||||
|
@ -16,9 +16,10 @@
|
||||
|
||||
import { isEqual, uniq } from 'lodash';
|
||||
|
||||
import Contract from '~/api/contract';
|
||||
import { bytesToHex, toHex } from '~/api/util/format';
|
||||
import { ERROR_CODES } from '~/api/transport/error';
|
||||
import Contract from '@parity/api/contract';
|
||||
import { ERROR_CODES } from '@parity/api/transport/error';
|
||||
import { bytesToHex, toHex } from '@parity/api/util/format';
|
||||
|
||||
import { wallet as WALLET_ABI } from '~/contracts/abi';
|
||||
import { MAX_GAS_ESTIMATION } from '~/util/constants';
|
||||
import WalletsUtils from '~/util/wallets';
|
||||
|
@ -17,7 +17,7 @@
|
||||
import { uniq } from 'lodash';
|
||||
import store from 'store';
|
||||
|
||||
import Api from './api';
|
||||
import Api from '@parity/api';
|
||||
import { LOG_KEYS, getLogger } from '~/config';
|
||||
|
||||
const log = getLogger(LOG_KEYS.Signer);
|
||||
|
@ -18,7 +18,7 @@ import BigNumber from 'bignumber.js';
|
||||
import { shallow } from 'enzyme';
|
||||
import React from 'react';
|
||||
|
||||
import apiutil from '~/api/util';
|
||||
import apiutil from '@parity/api/util';
|
||||
|
||||
import { Balance } from './balance';
|
||||
|
||||
|
@ -20,10 +20,10 @@ import { connect } from 'react-redux';
|
||||
import keycode, { codes } from 'keycode';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { observer } from 'mobx-react';
|
||||
|
||||
import TextFieldUnderline from 'material-ui/TextField/TextFieldUnderline';
|
||||
|
||||
import apiutil from '~/api/util';
|
||||
import apiutil from '@parity/api/util';
|
||||
|
||||
import AccountCard from '~/ui/AccountCard';
|
||||
import CopyToClipboard from '~/ui/CopyToClipboard';
|
||||
import InputAddress from '~/ui/Form/InputAddress';
|
||||
|
@ -19,8 +19,9 @@ import { observable, action, transaction } from 'mobx';
|
||||
import { flatMap, uniqBy } from 'lodash';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { sha3 } from '@parity/api/util/sha3';
|
||||
|
||||
import Contracts from '~/contracts';
|
||||
import { sha3 } from '~/api/util/sha3';
|
||||
|
||||
const ZERO = /^(0x)?0*$/;
|
||||
|
||||
|
@ -17,7 +17,8 @@
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import util from '~/api/util';
|
||||
import util from '@parity/api/util';
|
||||
|
||||
import { nodeOrStringProptype } from '~/util/proptypes';
|
||||
import { isNullAddress } from '~/util/validation';
|
||||
|
||||
|
@ -23,8 +23,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 { fromWei, toWei } from '~/api/util/wei';
|
||||
import { bytesToHex } from '~/api/util/format';
|
||||
import { fromWei, toWei } from '@parity/api/util/wei';
|
||||
import { bytesToHex } from '@parity/api/util/format';
|
||||
|
||||
import Input from '~/ui/Form/Input';
|
||||
import InputAddressSelect from '~/ui/Form/InputAddressSelect';
|
||||
import Select from '~/ui/Form/Select';
|
||||
|
@ -17,7 +17,8 @@
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { createIdentityImg } from '~/api/util/identity';
|
||||
import { createIdentityImg } from '@parity/api/util/identity';
|
||||
|
||||
import { isNullAddress } from '~/util/validation';
|
||||
import { CancelIcon, ContractIcon } from '../Icons';
|
||||
|
||||
|
@ -18,7 +18,7 @@ import Contracts from '~/contracts';
|
||||
import Abi from '~/abi';
|
||||
import * as abis from '~/contracts/abi';
|
||||
|
||||
import { decodeMethodInput } from '~/api/util/decode';
|
||||
import { decodeMethodInput } from '@parity/api/util/decode';
|
||||
|
||||
const CONTRACT_CREATE = '0x60606040';
|
||||
|
||||
|
@ -19,7 +19,7 @@ import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import sinon from 'sinon';
|
||||
|
||||
import Api from '~/api';
|
||||
import Api from '@parity/api';
|
||||
|
||||
import TxRow from './txRow';
|
||||
|
||||
|
@ -18,7 +18,7 @@ import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import sinon from 'sinon';
|
||||
|
||||
import Api from '~/api';
|
||||
import Api from '@parity/api';
|
||||
|
||||
import TxList from './txList';
|
||||
|
||||
|
@ -17,9 +17,10 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { pick, range, uniq } from 'lodash';
|
||||
|
||||
import { bytesToHex } from '@parity/api/util/format';
|
||||
|
||||
import Contracts from '~/contracts';
|
||||
import { hashToImageUrl } from '~/redux/util';
|
||||
import { bytesToHex } from '~/api/util/format';
|
||||
|
||||
import builtinJson from '~/views/Dapps/builtin.json';
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
import Transaction from 'ethereumjs-tx';
|
||||
|
||||
import { inAddress, inHex, inNumber10 } from '~/api/format/input';
|
||||
import { sha3 } from '~/api/util/sha3';
|
||||
import { inAddress, inHex, inNumber10 } from '@parity/api/format/input';
|
||||
import { sha3 } from '@parity/api/util/sha3';
|
||||
|
||||
export function createUnsignedTx (api, netVersion, gasStore, transaction) {
|
||||
const { data, from, gas, gasPrice, to, value } = gasStore.overrideTransaction(transaction);
|
||||
|
@ -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 '@parity/api/format/input';
|
||||
import { sha3 } from '@parity/api/util/sha3';
|
||||
|
||||
// Adapted from https://github.com/kvhnuke/etherwallet/blob/mercury/app/scripts/myetherwallet.js
|
||||
|
||||
|
@ -17,9 +17,10 @@
|
||||
import { range } from 'lodash';
|
||||
import BigNumber from 'bignumber.js';
|
||||
|
||||
import { hashToImageUrl } from '~/redux/util';
|
||||
import { sha3 } from '~/api/util/sha3';
|
||||
import { sha3 } from '@parity/api/util/sha3';
|
||||
|
||||
import imagesEthereum from '~/../assets/images/contracts/ethereum-black-64x64.png';
|
||||
import { hashToImageUrl } from '~/redux/util';
|
||||
|
||||
const BALANCEOF_SIGNATURE = sha3('balanceOf(address)');
|
||||
const ADDRESS_PADDING = range(24).map(() => '0').join('');
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import BigNumber from 'bignumber.js';
|
||||
|
||||
import apiutil from '~/api/util';
|
||||
import apiutil from '@parity/api/util';
|
||||
|
||||
import { NULL_ADDRESS } from './constants';
|
||||
|
||||
|
@ -18,9 +18,10 @@ import BigNumber from 'bignumber.js';
|
||||
import { intersection, range, uniq } from 'lodash';
|
||||
import store from 'store';
|
||||
|
||||
import Abi from '~/abi';
|
||||
import Contract from '~/api/contract';
|
||||
import { bytesToHex, toHex } from '~/api/util/format';
|
||||
import Abi from '@parity/abi';
|
||||
import Contract from '@parity/api/contract';
|
||||
import { bytesToHex, toHex } from '@parity/api/util/format';
|
||||
|
||||
import { validateAddress } from '~/util/validation';
|
||||
import WalletAbi from '~/contracts/abi/wallet.json';
|
||||
import OldWalletAbi from '~/contracts/abi/old-wallet.json';
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import store from 'store';
|
||||
|
||||
import { ERROR_CODES } from '~/api/transport/error';
|
||||
import { ERROR_CODES } from '@parity/api/transport/error';
|
||||
|
||||
export const LS_REQUESTS_KEY = '_parity::requests';
|
||||
|
||||
|
@ -21,8 +21,9 @@ import ReactTooltip from 'react-tooltip';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
|
||||
import { bytesToHex } from '@parity/api/util/format';
|
||||
|
||||
import { confirmOperation, revokeOperation } from '~/redux/providers/walletActions';
|
||||
import { bytesToHex } from '~/api/util/format';
|
||||
import { Container, InputAddress, Button, IdentityIcon } from '~/ui';
|
||||
import TxRow from '~/ui/TxList/TxRow';
|
||||
|
||||
|
@ -17,7 +17,8 @@
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { bytesToHex } from '~/api/util/format';
|
||||
import { bytesToHex } from '@parity/api/util/format';
|
||||
|
||||
import { Container } from '~/ui';
|
||||
import TxRow from '~/ui/TxList/TxRow';
|
||||
|
||||
|
@ -20,7 +20,8 @@ import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import store from 'store';
|
||||
|
||||
import { sha3 } from '~/api/util/sha3';
|
||||
import { sha3 } from '@parity/api/util/sha3';
|
||||
|
||||
import SolidityUtils from '~/util/solidity';
|
||||
|
||||
const SOLIDITY_LIST_URL = 'https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/bin/list.json';
|
||||
|
Loading…
Reference in New Issue
Block a user