Lint
This commit is contained in:
parent
8deae7209e
commit
3bb15194ea
|
@ -33,6 +33,7 @@ const ExplorerLayout = () => (
|
||||||
<List.Group transparent={true}>
|
<List.Group transparent={true}>
|
||||||
{groupItems.map((groupItem) => (
|
{groupItems.map((groupItem) => (
|
||||||
<List.GroupItem
|
<List.GroupItem
|
||||||
|
key={groupItem.value}
|
||||||
className={className}
|
className={className}
|
||||||
to={groupItem.to}
|
to={groupItem.to}
|
||||||
icon={groupItem.icon}
|
icon={groupItem.icon}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Link} from "react-router-dom";
|
|
||||||
import {Grid, Card} from 'tabler-react';
|
import {Grid, Card} from 'tabler-react';
|
||||||
|
|
||||||
const Version = ({version}) => (
|
const Version = ({version}) => (
|
||||||
|
|
|
@ -16,7 +16,7 @@ class CommunicationContainer extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
web3DisabledWarning() {
|
web3DisabledWarning() {
|
||||||
return <Alert type="warning">The node you are using does not support Whisper</Alert>
|
return <Alert type="warning">The node you are using does not support Whisper</Alert>;
|
||||||
}
|
}
|
||||||
|
|
||||||
web3Enabled() {
|
web3Enabled() {
|
||||||
|
@ -65,7 +65,7 @@ export default connect(
|
||||||
mapStateToProps,
|
mapStateToProps,
|
||||||
{
|
{
|
||||||
messageSend: messageSend.request,
|
messageSend: messageSend.request,
|
||||||
messageListen: messageListen.request,
|
messageListen: messageListen.request
|
||||||
}
|
}
|
||||||
)(CommunicationContainer);
|
)(CommunicationContainer);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {all, call, fork, put, takeEvery, take} from 'redux-saga/effects';
|
||||||
|
|
||||||
const {account, accounts, block, blocks, transaction, transactions, processes, commands, processLogs,
|
const {account, accounts, block, blocks, transaction, transactions, processes, commands, processLogs,
|
||||||
contracts, contract, contractProfile, messageSend, versions, plugins, messageListen, fiddle,
|
contracts, contract, contractProfile, messageSend, versions, plugins, messageListen, fiddle,
|
||||||
ensRecord, ensRecords} = actions;
|
ensRecord, ensRecords, contractLogs} = actions;
|
||||||
|
|
||||||
function *doRequest(entity, apiFn, payload) {
|
function *doRequest(entity, apiFn, payload) {
|
||||||
const {response, error} = yield call(apiFn, payload);
|
const {response, error} = yield call(apiFn, payload);
|
||||||
|
@ -108,6 +108,14 @@ export function *watchPostEnsRecords() {
|
||||||
yield takeEvery(actions.ENS_RECORDS[actions.REQUEST], postEnsRecord);
|
yield takeEvery(actions.ENS_RECORDS[actions.REQUEST], postEnsRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function *watchListenToMessages() {
|
||||||
|
yield takeEvery(actions.MESSAGE_LISTEN[actions.REQUEST], listenToMessages);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function *watchFetchFiddle() {
|
||||||
|
yield takeEvery(actions.FIDDLE[actions.REQUEST], fetchFiddle);
|
||||||
|
}
|
||||||
|
|
||||||
function createChannel(socket) {
|
function createChannel(socket) {
|
||||||
return eventChannel(emit => {
|
return eventChannel(emit => {
|
||||||
socket.onmessage = ((message) => {
|
socket.onmessage = ((message) => {
|
||||||
|
@ -159,10 +167,6 @@ export function *watchListenToContractLogs() {
|
||||||
yield takeEvery(actions.WATCH_NEW_CONTRACT_LOGS, listenToContractLogs);
|
yield takeEvery(actions.WATCH_NEW_CONTRACT_LOGS, listenToContractLogs);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function *watchSendMessage() {
|
|
||||||
yield takeEvery(actions.MESSAGE_SEND[actions.REQUEST], sendMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function *listenToMessages(action) {
|
export function *listenToMessages(action) {
|
||||||
const socket = api.listenToChannel(action.messageChannels[0]);
|
const socket = api.listenToChannel(action.messageChannels[0]);
|
||||||
const channel = yield call(createChannel, socket);
|
const channel = yield call(createChannel, socket);
|
||||||
|
@ -172,15 +176,6 @@ export function *listenToMessages(action) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function *watchListenToMessages() {
|
|
||||||
yield takeEvery(actions.MESSAGE_LISTEN[actions.REQUEST], listenToMessages);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function *watchFetchFiddle() {
|
|
||||||
yield takeEvery(actions.FIDDLE[actions.REQUEST], fetchFiddle);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export default function *root() {
|
export default function *root() {
|
||||||
yield all([
|
yield all([
|
||||||
fork(watchInitBlockHeader),
|
fork(watchInitBlockHeader),
|
||||||
|
@ -204,7 +199,7 @@ export default function *root() {
|
||||||
fork(watchFetchTransaction),
|
fork(watchFetchTransaction),
|
||||||
fork(watchFetchContractProfile),
|
fork(watchFetchContractProfile),
|
||||||
fork(watchFetchFiddle),
|
fork(watchFetchFiddle),
|
||||||
fork(watchFetchENSRecord),
|
fork(watchFetchEnsRecord),
|
||||||
fork(watchPostENSRecords)
|
fork(watchPostEnsRecords)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue