This commit is contained in:
Iuri Matias 2018-08-03 12:51:53 -04:00 committed by Pascal Precht
parent dcf94a0924
commit 8ebd125575
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
8 changed files with 1 additions and 26 deletions

View File

@ -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
};

View File

@ -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);
}

View File

@ -5,7 +5,6 @@ import {
Card,
Table
} from "tabler-react";
import {Link} from 'react-router-dom';
const Contract = ({contract}) => (
<Page.Content title="Contract">

View File

@ -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(',')})`},

View File

@ -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});

View File

@ -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});

View File

@ -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';

View File

@ -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);
}