Fix references to api outside of parity.js
(#4981)
This commit is contained in:
parent
213f61e826
commit
9b9cd451d1
@ -23,6 +23,7 @@ import CircularProgress from 'material-ui/CircularProgress';
|
||||
import { Card, CardText } from 'material-ui/Card';
|
||||
|
||||
import { nullableProptype } from '~/util/proptypes';
|
||||
import { api } from '../parity';
|
||||
|
||||
import styles from './application.css';
|
||||
import Accounts from '../Accounts';
|
||||
@ -39,7 +40,7 @@ export default class Application extends Component {
|
||||
};
|
||||
|
||||
getChildContext () {
|
||||
return { muiTheme, api: window.parity.api };
|
||||
return { muiTheme, api };
|
||||
}
|
||||
|
||||
static propTypes = {
|
||||
@ -49,7 +50,6 @@ export default class Application extends Component {
|
||||
};
|
||||
|
||||
render () {
|
||||
const { api } = window.parity;
|
||||
const { contract, fee } = this.props;
|
||||
let warning = null;
|
||||
|
||||
|
@ -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/>.
|
||||
|
||||
const { api } = window.parity;
|
||||
import { api } from '../parity';
|
||||
|
||||
export const SET_ACCOUNTS = 'SET_ACCOUNTS';
|
||||
export const setAccounts = (accounts) => ({
|
||||
|
@ -17,8 +17,7 @@
|
||||
import Contracts from '~/contracts';
|
||||
|
||||
import { loadToken, setTokenPending, deleteToken, setTokenData } from '../Tokens/actions';
|
||||
|
||||
const { api } = window.parity;
|
||||
import { api } from '../parity';
|
||||
|
||||
export const SET_LOADING = 'SET_LOADING';
|
||||
export const setLoading = (isLoading) => ({
|
||||
|
@ -16,12 +16,11 @@
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
|
||||
import { api } from '../parity';
|
||||
import Chip from '../Chip';
|
||||
|
||||
import styles from './status.css';
|
||||
|
||||
const { api } = window.parity;
|
||||
|
||||
export default class Status extends Component {
|
||||
static propTypes = {
|
||||
address: PropTypes.string.isRequired,
|
||||
|
@ -16,8 +16,9 @@
|
||||
|
||||
import { URL_TYPE } from '../Inputs/validation';
|
||||
import { getTokenTotalSupply, urlToHash } from '../utils';
|
||||
import { api } from '../parity';
|
||||
|
||||
const { bytesToHex } = window.parity.api.util;
|
||||
const { bytesToHex } = api.util;
|
||||
|
||||
export const SET_TOKENS_LOADING = 'SET_TOKENS_LOADING';
|
||||
export const setTokensLoading = (isLoading) => ({
|
||||
|
Loading…
Reference in New Issue
Block a user