mirror of https://github.com/embarklabs/embark.git
cleanup
This commit is contained in:
parent
dcf94a0924
commit
8ebd125575
|
@ -147,8 +147,6 @@ export function receiveContractProfileError() {
|
|||
}
|
||||
|
||||
export function fetchContract(contractName) {
|
||||
console.dir("== fetchContract");
|
||||
console.dir(contractName);
|
||||
return {
|
||||
type: FETCH_CONTRACT,
|
||||
contractName
|
||||
|
@ -156,8 +154,6 @@ export function fetchContract(contractName) {
|
|||
}
|
||||
|
||||
export function receiveContract(contract) {
|
||||
console.dir("== receiveContract");
|
||||
console.dir(contract);
|
||||
return {
|
||||
type: RECEIVE_CONTRACT,
|
||||
contract
|
||||
|
@ -165,7 +161,6 @@ export function receiveContract(contract) {
|
|||
}
|
||||
|
||||
export function receiveContractError() {
|
||||
console.dir("== receiveContractError");
|
||||
return {
|
||||
type: RECEIVE_CONTRACT_ERROR
|
||||
};
|
||||
|
|
|
@ -66,8 +66,6 @@ export function webSocketBlockHeader() {
|
|||
}
|
||||
|
||||
export function fetchContract(contractName) {
|
||||
console.dir("api: fetchContract");
|
||||
console.dir(contractName);
|
||||
return axios.get('http://localhost:8000/embark-api/contract/' + contractName);
|
||||
}
|
||||
|
||||
|
@ -76,7 +74,5 @@ export function fetchContracts() {
|
|||
}
|
||||
|
||||
export function fetchContractProfile(contractName) {
|
||||
console.dir("api: fetchContractProfile");
|
||||
console.dir(contractName);
|
||||
return axios.get('http://localhost:8000/embark-api/profiler/' + contractName);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
Card,
|
||||
Table
|
||||
} from "tabler-react";
|
||||
import {Link} from 'react-router-dom';
|
||||
|
||||
const Contract = ({contract}) => (
|
||||
<Page.Content title="Contract">
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
Card,
|
||||
Table
|
||||
} from "tabler-react";
|
||||
import {Link} from 'react-router-dom';
|
||||
|
||||
const ContractProfile = ({contract}) => (
|
||||
<Page.Content title={contract.name}>
|
||||
|
@ -27,7 +26,7 @@ const ContractProfile = ({contract}) => (
|
|||
contract.methods.map((method) => {
|
||||
return ([
|
||||
{content: method.name},
|
||||
{content: (method.payable == true).toString()},
|
||||
{content: (method.payable === true).toString()},
|
||||
{content: method.mutability},
|
||||
{content: `(${method.inputs.map((x) => x.type).join(',')})`},
|
||||
{content: `(${method.outputs.map((x) => x.type).join(',')})`},
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import {RECEIVE_CONTRACT_PROFILE, RECEIVE_CONTRACT_PROFILE_ERROR} from "../actions";
|
||||
|
||||
export default function contractProfile(state = {}, action) {
|
||||
console.dir("** reducer contract profile");
|
||||
console.dir(arguments);
|
||||
switch (action.type) {
|
||||
case RECEIVE_CONTRACT_PROFILE:
|
||||
return Object.assign({}, state, {data: action.contractProfile.data});
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import {RECEIVE_CONTRACT, RECEIVE_CONTRACT_ERROR} from "../actions";
|
||||
|
||||
export default function contract(state = {}, action) {
|
||||
console.dir("** reducer");
|
||||
console.dir(arguments);
|
||||
switch (action.type) {
|
||||
case RECEIVE_CONTRACT:
|
||||
return Object.assign({}, state, {data: action.contract.data});
|
||||
|
|
|
@ -4,8 +4,6 @@ import {Route, Switch} from 'react-router-dom';
|
|||
import HomeContainer from './containers/HomeContainer';
|
||||
import AccountsContainer from './containers/AccountsContainer';
|
||||
import ContractsContainer from './containers/ContractsContainer';
|
||||
import ContractContainer from './containers/ContractContainer';
|
||||
import ContractProfileContainer from './containers/ContractProfileContainer';
|
||||
import NoMatch from './components/NoMatch';
|
||||
import ExplorerLayout from './components/ExplorerLayout';
|
||||
import ProcessesLayout from './components/ProcessesLayout';
|
||||
|
|
|
@ -128,19 +128,15 @@ export default function *root() {
|
|||
}
|
||||
|
||||
export function *fetchContract(action) {
|
||||
console.dir("** fetchContract");
|
||||
console.dir(action);
|
||||
try {
|
||||
const contract = yield call(api.fetchContract, action.contractName);
|
||||
yield put(actions.receiveContract(contract));
|
||||
} catch (e) {
|
||||
console.dir(e);
|
||||
yield put(actions.receiveContractError());
|
||||
}
|
||||
}
|
||||
|
||||
export function *watchFetchContract() {
|
||||
console.dir("** watchFetchContract");
|
||||
yield takeEvery(actions.FETCH_CONTRACT, fetchContract);
|
||||
}
|
||||
|
||||
|
@ -158,19 +154,15 @@ export function *watchFetchContracts() {
|
|||
}
|
||||
|
||||
export function *fetchContractProfile(action) {
|
||||
console.dir("** fetchContractProfile");
|
||||
console.dir(action);
|
||||
try {
|
||||
const profile = yield call(api.fetchContractProfile, action.contractName);
|
||||
yield put(actions.receiveContractProfile(profile));
|
||||
} catch (e) {
|
||||
console.dir(e);
|
||||
yield put(actions.receiveContractError());
|
||||
}
|
||||
}
|
||||
|
||||
export function *watchFetchContractProfile() {
|
||||
console.dir("** watchFetchContractProfile");
|
||||
yield takeEvery(actions.FETCH_CONTRACT_PROFILE, fetchContractProfile);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue