diff --git a/js/src/views/RpcCalls/actions/localstorage.js b/js/src/views/RpcCalls/actions/localstorage.js
deleted file mode 100644
index 258159105..000000000
--- a/js/src/views/RpcCalls/actions/localstorage.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import { createAction } from 'redux-actions';
-
-export const syncRpcStateFromLocalStorage = createAction('sync rpcStateFromLocalStorage');
diff --git a/js/src/views/RpcCalls/actions/logger.js b/js/src/views/RpcCalls/actions/logger.js
deleted file mode 100644
index e8f8556e1..000000000
--- a/js/src/views/RpcCalls/actions/logger.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import { createAction } from 'redux-actions';
-
-import { identity } from '../util';
-import { withError } from '~/redux/util';
-
-export const updateLogging = createAction(
- 'update logging', identity, withError(flag => `logging updated to ${flag}`)
-);
diff --git a/js/src/views/RpcCalls/actions/rpc.js b/js/src/views/RpcCalls/actions/rpc.js
deleted file mode 100644
index 1c6f5a169..000000000
--- a/js/src/views/RpcCalls/actions/rpc.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import { createAction } from 'redux-actions';
-
-import { identity } from '../util';
-import { withError } from '~/redux/util';
-
-export const error = createAction('error rpc', identity,
- withError(() => 'error processing rpc call. check console for details', 'error')
-);
-export const fireRpc = createAction('fire rpc');
-export const addRpcReponse = createAction('add rpcResponse');
-export const selectRpcMethod = createAction('select rpcMethod');
-export const resetRpcPrevCalls = createAction('reset rpcPrevCalls');
diff --git a/js/src/views/RpcCalls/components/AutoComplete/AutoComplete.js b/js/src/views/RpcCalls/components/AutoComplete/AutoComplete.js
deleted file mode 100644
index 6584f34a5..000000000
--- a/js/src/views/RpcCalls/components/AutoComplete/AutoComplete.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component, PropTypes } from 'react';
-import AutoComplete from 'material-ui/AutoComplete';
-
-export default class WrappedAutoComplete extends Component {
- render () {
- return (
-
- );
- }
-
- static defaultProps = {
- openOnFocus: true,
- filter: (searchText, key) => searchText === '' || key.toLowerCase().indexOf(searchText.toLowerCase()) !== -1
- }
-
- static propTypes = {
- dataSource: PropTypes.array.isRequired,
- filter: PropTypes.func,
- name: PropTypes.string.isRequired,
- openOnFocus: PropTypes.bool
- }
-
- static contextTypes = {
- muiTheme: PropTypes.object.isRequired
- }
-}
diff --git a/js/src/views/RpcCalls/components/AutoComplete/AutoComplete.spec.js b/js/src/views/RpcCalls/components/AutoComplete/AutoComplete.spec.js
deleted file mode 100644
index 87bc9a1e8..000000000
--- a/js/src/views/RpcCalls/components/AutoComplete/AutoComplete.spec.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React from 'react';
-import { shallow } from 'enzyme';
-
-import getMuiTheme from 'material-ui/styles/getMuiTheme';
-
-import WrappedAutoComplete from './AutoComplete';
-
-describe('views/Status/components/AutoComplete', () => {
- describe('rendering', () => {
- let rendered;
-
- beforeEach(() => {
- const dataSource = ['abc', 'def', 'ghi'];
- const component =
- ;
-
- rendered = shallow(component, { context: { muiTheme: getMuiTheme({}) } });
- });
-
- it('renders the material AutoComplete component', () => {
- expect(rendered).to.be.ok;
- expect(rendered).to.have.exactly(1).descendants('AutoComplete');
- });
- });
-});
diff --git a/js/src/views/RpcCalls/components/AutoComplete/index.js b/js/src/views/RpcCalls/components/AutoComplete/index.js
deleted file mode 100644
index d84245ff6..000000000
--- a/js/src/views/RpcCalls/components/AutoComplete/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './AutoComplete';
diff --git a/js/src/views/RpcCalls/components/Box/Box.js b/js/src/views/RpcCalls/components/Box/Box.js
deleted file mode 100644
index 1d6f525d2..000000000
--- a/js/src/views/RpcCalls/components/Box/Box.js
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component, PropTypes } from 'react';
-
-export default class Box extends Component {
- renderValue () {
- if (!this.props.value) {
- return;
- }
-
- return (
-
- );
- }
-
- static propTypes = {
- title: PropTypes.string.isRequired,
- value: PropTypes.string,
- children: PropTypes.element
- }
-}
diff --git a/js/src/views/RpcCalls/components/Box/Box.spec.js b/js/src/views/RpcCalls/components/Box/Box.spec.js
deleted file mode 100644
index 34154425c..000000000
--- a/js/src/views/RpcCalls/components/Box/Box.spec.js
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React from 'react';
-import { shallow } from 'enzyme';
-
-import Box from './Box';
-
-describe('views/Status/components/Box', () => {
- describe('rendering', () => {
- const title = 'test title';
- let rendered;
-
- beforeEach(() => {
- rendered = shallow();
- });
-
- it('renders the component', () => {
- expect(rendered).to.be.ok;
- expect(rendered).to.have.className('dapp-box');
- });
-
- it('renders the title', () => {
- expect(rendered.find('h2')).to.have.text(title);
- });
-
- it('renders no default value', () => {
- expect(rendered).to.not.have.descendants('h1');
- });
- });
-
- describe('contents', () => {
- const value = 'test value';
- const child = 'this is the child value';
-
- let rendered;
-
- beforeEach(() => {
- rendered = shallow(
-
-
{ child }
-
- );
- });
-
- it('renders the value', () => {
- expect(rendered.find('h1')).to.have.text(value);
- });
-
- it('wraps the children', () => {
- expect(rendered.find('pre')).to.have.text(child);
- });
- });
-});
diff --git a/js/src/views/RpcCalls/components/Box/index.js b/js/src/views/RpcCalls/components/Box/index.js
deleted file mode 100644
index 35e9da0cb..000000000
--- a/js/src/views/RpcCalls/components/Box/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './Box';
diff --git a/js/src/views/RpcCalls/components/Call/Call.css b/js/src/views/RpcCalls/components/Call/Call.css
deleted file mode 100644
index 8dcf36e9e..000000000
--- a/js/src/views/RpcCalls/components/Call/Call.css
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright 2015-2017 Parity Technologies (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-.call {
- position: relative;
- border-bottom: 2px solid #CCC6C6;
- margin-bottom: 18.4px;
- background: #f5f4f2;
-}
-
-.call:first-child {
- border-color: #6691C2;
-}
-
-.call pre {
- margin: 0;
-}
-
-.call pre:nth-child(3) {
- padding-top: 0;
- color: #bbb;
-}
-
-.callNo {
- float: right;
- color: #ccc;
-}
diff --git a/js/src/views/RpcCalls/components/Call/Call.js b/js/src/views/RpcCalls/components/Call/Call.js
deleted file mode 100644
index 52a120fec..000000000
--- a/js/src/views/RpcCalls/components/Call/Call.js
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component, PropTypes } from 'react';
-
-import Response from '../Response';
-import styles from './Call.css';
-
-export default class Call extends Component {
- render () {
- let { callNo, name, params, response } = this.props.call;
-
- params = this.formatParams(params);
- return (
-
- #{ callNo }
-
{ name }({ params })
-
-
- );
- }
-
- setElement = el => {
- this.element = el;
- }
-
- setActiveCall = () => {
- this.props.setActiveCall(this.props.call, this.element);
- }
-
- formatParams (params) {
- return params.reduce((str, p) => {
- if (str !== '') {
- str += ', ';
- }
- if (p === undefined) {
- return str;
- }
- if (typeof p === 'object' || typeof p === 'string') {
- p = JSON.stringify(p);
- }
- return str + p;
- }, '');
- }
-
- static propTypes = {
- call: PropTypes.object.isRequired,
- setActiveCall: PropTypes.func.isRequired
- }
-}
diff --git a/js/src/views/RpcCalls/components/Call/Call.spec.js b/js/src/views/RpcCalls/components/Call/Call.spec.js
deleted file mode 100644
index af7e633e6..000000000
--- a/js/src/views/RpcCalls/components/Call/Call.spec.js
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React from 'react';
-import { shallow } from 'enzyme';
-import sinon from 'sinon';
-
-import '../../../../environment/tests';
-
-import Call from './Call';
-
-describe('views/Status/components/Call', () => {
- const call = { callIdx: 123, callNo: 456, name: 'eth_call', params: [{ name: '123' }], response: '' };
- const element = 'dummyElement';
-
- let rendered;
- let instance;
- let setActiveCall = sinon.stub();
-
- beforeEach(() => {
- rendered = shallow(
-
- );
- instance = rendered.instance();
- });
-
- describe('rendering', () => {
- it('renders the component', () => {
- expect(rendered).to.be.ok;
- expect(rendered).to.have.exactly(1).descendants(`div[data-test="Call-call-${call.callNo}"]`);
- });
-
- it('adds onMouseEnter to setActiveElement', () => {
- expect(rendered.find('div').first()).to.have.prop('onMouseEnter', instance.setActiveCall);
- });
- });
-
- describe('actions', () => {
- it('sets the element via setElement', () => {
- expect(instance.element).to.not.be.ok;
- instance.setElement(element);
- expect(instance.element).to.equal(element);
- });
-
- it('calls parent setActive call on setActiveCall', () => {
- instance.setElement(element);
- instance.setActiveCall();
-
- expect(setActiveCall).to.be.calledWith(call, element);
- });
- });
-
- describe('utility', () => {
- describe('.formatParams', () => {
- it('correctly returns a single parameter', () => {
- expect(instance.formatParams([1])).to.equal('1');
- });
-
- it('correctly joins 2 parameters', () => {
- expect(instance.formatParams([1, 2])).to.equal('1, 2');
- });
-
- it('stringifies a string object', () => {
- expect(instance.formatParams(['1'])).to.equal('"1"');
- });
-
- it('stringifies an object object', () => {
- expect(instance.formatParams([{ name: '1' }])).to.equal('{"name":"1"}');
- });
-
- it('skips an undefined value', () => {
- expect(instance.formatParams(['1', undefined, 3])).to.equal('"1", , 3');
- });
- });
- });
-});
diff --git a/js/src/views/RpcCalls/components/Call/index.js b/js/src/views/RpcCalls/components/Call/index.js
deleted file mode 100644
index 0620b46de..000000000
--- a/js/src/views/RpcCalls/components/Call/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './Call';
diff --git a/js/src/views/RpcCalls/components/Calls/Calls.css b/js/src/views/RpcCalls/components/Calls/Calls.css
deleted file mode 100644
index 0266579ac..000000000
--- a/js/src/views/RpcCalls/components/Calls/Calls.css
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright 2015-2017 Parity Technologies (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-.historyInfo {
- margin-top: 0;
- text-transform: initial;
-}
-
-.header {
- margin: 0;
-}
-
-.removeIcon {
- float: right;
- color: #bbb;
- cursor: pointer;
- transition: opacity ease-in-out 0.2s;
- transition-delay: 0.2s;
- opacity: 0;
-}
-
-div:hover > .removeIcon {
- opacity: 1.0;
-}
-
-.history {
- margin-top: calc(1em + 18.4px);
- padding-top: 0;
- overflow: auto;
- max-height: 60vh;
-}
diff --git a/js/src/views/RpcCalls/components/Calls/Calls.js b/js/src/views/RpcCalls/components/Calls/Calls.js
deleted file mode 100644
index 3a1023bc6..000000000
--- a/js/src/views/RpcCalls/components/Calls/Calls.js
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component, PropTypes } from 'react';
-import { FormattedMessage } from 'react-intl';
-
-import Call from '../Call';
-import CallsToolbar from '../CallsToolbar';
-import styles from './Calls.css';
-
-export default class Calls extends Component {
- state = {
- activeCall: null,
- activeChild: null
- }
-
- render () {
- return (
-
- );
- }
-
- renderCalls () {
- const { calls } = this.props;
-
- if (!calls.length) {
- return;
- }
-
- return calls.map((call, idx) => (
-
- ));
- }
-
- clearActiveCall = () => {
- this.setState({ activeCall: null, activeChild: null });
- }
-
- setActiveCall = (call, el) => {
- this.setState({ activeCall: call, activeChild: el });
- }
-
- setCallsHistory = el => {
- this._callsHistory = el;
- }
-
- clearHistory = () => {
- this.props.reset();
- }
-
- static propTypes = {
- calls: PropTypes.arrayOf(PropTypes.object).isRequired,
- actions: PropTypes.shape({
- fireRpc: PropTypes.func.isRequired,
- copyToClipboard: PropTypes.func.isRequired,
- selectRpcMethod: PropTypes.func.isRequired
- }).isRequired,
- reset: PropTypes.func
- }
-}
diff --git a/js/src/views/RpcCalls/components/Calls/Calls.spec.js b/js/src/views/RpcCalls/components/Calls/Calls.spec.js
deleted file mode 100644
index 4127f65cb..000000000
--- a/js/src/views/RpcCalls/components/Calls/Calls.spec.js
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React from 'react';
-import { shallow } from 'enzyme';
-
-import '../../../../environment/tests';
-
-import Calls from './Calls';
-
-describe('views/Status/components/Calls', () => {
- describe('rendering (no calls)', () => {
- let rendered;
-
- before(() => {
- const calls = [];
-
- rendered = shallow();
- });
-
- it('renders the component and container', () => {
- expect(rendered).to.be.ok;
- expect(rendered).to.have.className('calls-container');
- });
-
- it('renders no calls', () => {
- expect(rendered.find('div[data-test="Calls-empty-wrapper"]')).to.have.exactly(1).descendants('h3');
- });
-
- it('renders no clear button', () => {
- expect(rendered.find('a[data-test="Calls-remove"]')).to.not.exist;
- });
-
- it('renders an attached CallsToolbar', () => {
- expect(rendered).to.have.exactly(1).descendants('CallsToolbar');
- });
- });
-
- describe('rendering (calls supplied)', () => {
- const calls = [
- { callNo: 0, name: 'eth_call', params: '', response: '' },
- { callNo: 1, name: 'eth_sendTransaction', params: '', response: '' }
- ];
- const actions = { action1: true, action2: true };
-
- let rendered;
- let instance;
-
- before(() => {
- rendered = shallow();
- instance = rendered.instance();
- });
-
- it('renders the clear button', () => {
- expect(rendered).to.have.exactly(1).descendants('a[data-test="Calls-remove"]');
- });
-
- it('renders calls', () => {
- expect(rendered.find('div[data-test="Calls-empty-wrapper"]')).to.not.exist;
- expect(rendered.find('div.row div')).to.have.exactly(2).descendants('Call');
- });
-
- it('passes the correct properties to Call', () => {
- const call = rendered.find('Call').first();
-
- expect(call).to.have.prop('setActiveCall', instance.setActiveCall);
- expect(call).to.have.prop('call').deep.equal(calls[0]);
- });
-
- it('passes the correct properties to CallsToolbar', () => {
- const child = { offsetTop: 0 };
- const container = { scrollTop: 0 };
-
- instance.setCallsHistory(container);
- rendered.setState({ activeCall: 'dummyActiveCall', activeChild: child });
-
- const toolbar = rendered.find('CallsToolbar').first();
-
- expect(toolbar).to.have.prop('call', 'dummyActiveCall');
- expect(toolbar).to.have.prop('actions').deep.equal(actions);
- expect(toolbar).to.have.prop('callEl').deep.equal(child);
- expect(toolbar).to.have.prop('containerEl').deep.equal(container);
- });
- });
-
- describe('actions', () => {
- let rendered;
- let instance;
-
- before(() => {
- const calls = [
- { callNo: 0, name: 'eth_call', params: '', response: '' },
- { callNo: 1, name: 'eth_sendTransaction', params: '', response: '' }
- ];
-
- rendered = shallow();
- instance = rendered.instance();
- });
-
- it('sets the element via setCallsHistory', () => {
- instance.setCallsHistory('dummyElement');
-
- expect(instance._callsHistory).to.equal('dummyElement');
- });
-
- it('sets state via setActiveCall', () => {
- instance.setActiveCall('dummyActiveCall', 'dummyActiveChild');
-
- expect(rendered).to.have.state('activeCall', 'dummyActiveCall');
- expect(rendered).to.have.state('activeChild', 'dummyActiveChild');
- });
-
- it('clears state via clearActiveCall', () => {
- instance.setActiveCall('dummyActiveCall', 'dummyActiveChild');
- expect(rendered).to.have.state('activeCall', 'dummyActiveCall');
- instance.clearActiveCall();
-
- expect(rendered).to.have.state('activeCall', null);
- expect(rendered).to.have.state('activeChild', null);
- });
- });
-});
diff --git a/js/src/views/RpcCalls/components/Calls/index.js b/js/src/views/RpcCalls/components/Calls/index.js
deleted file mode 100644
index 4e625ded8..000000000
--- a/js/src/views/RpcCalls/components/Calls/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './Calls';
diff --git a/js/src/views/RpcCalls/components/CallsToolbar/CallsToolbar.css b/js/src/views/RpcCalls/components/CallsToolbar/CallsToolbar.css
deleted file mode 100644
index 8c34e1921..000000000
--- a/js/src/views/RpcCalls/components/CallsToolbar/CallsToolbar.css
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright 2015-2017 Parity Technologies (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-.callActionsWrap {
- position: absolute;
- animation: fadein .5s;
- right: 0;
- height: 28px;
-}
-
-.callActionsButton {
- padding: 0 !important;
- height: 24px !important;
-}
-
-.callActionsWrap:hover .callActionsButton {
- display: none !important;
-}
-
-.callActions {
- display: none;
- height: 100%;
- margin-top: 1px;
- margin-right: 10px;
-}
-
-.callActionsWrap:hover .callActions {
- display: block;
-}
-
-.callAction {
- float: right;
- transition: opacity ease-in-out .2s;
- transition-delay: .2s;
- opacity: 0;
- padding: 3px !important;
- height: 22px !important;
- width: 22px !important;
-}
-
-.callActions:hover .callAction {
- opacity: 1;
-}
-
-.callActionIcon {
- height: 100% !important;
- width: 100% !important;
-}
-
-@keyframes fadein {
- from { opacity: 0; }
- to { opacity: 1; }
-}
diff --git a/js/src/views/RpcCalls/components/CallsToolbar/CallsToolbar.js b/js/src/views/RpcCalls/components/CallsToolbar/CallsToolbar.js
deleted file mode 100644
index 618a5de26..000000000
--- a/js/src/views/RpcCalls/components/CallsToolbar/CallsToolbar.js
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component, PropTypes } from 'react';
-import CopyToClipboard from 'react-copy-to-clipboard';
-import { FormattedMessage } from 'react-intl';
-import { sortBy, find, extend } from 'lodash';
-
-import IconButton from 'material-ui/IconButton';
-import MoreHorizIcon from 'material-ui/svg-icons/navigation/more-horiz';
-import CallIcon from 'material-ui/svg-icons/communication/call';
-import AssignmentIcon from 'material-ui/svg-icons/action/assignment';
-import InputIcon from 'material-ui/svg-icons/action/input';
-
-import { SCROLLBAR_WIDTH } from '../../constants';
-import styles from './CallsToolbar.css';
-import rpcData from '../../data/rpc.json';
-const rpcMethods = sortBy(rpcData.methods, 'name');
-
-export default class CallsToolbar extends Component {
- render () {
- const { call, callEl, containerEl } = this.props;
-
- if (!call) {
- return null;
- }
-
- const wrapStyle = { top: callEl.offsetTop - SCROLLBAR_WIDTH - containerEl.scrollTop };
-
- if (this.hasScrollbar(containerEl)) {
- wrapStyle.right = 13;
- }
-
- return (
-
- );
- }
-
- setCall = () => {
- const { call } = this.props;
- let method = find(rpcMethods, { name: call.name });
-
- this.props.actions.selectRpcMethod(extend({}, method, { paramsValues: call.params }));
- }
-
- makeCall = () => {
- const { call } = this.props;
- let method = find(rpcMethods, { name: call.name });
-
- this.setCall();
- this.props.actions.fireRpc({
- method: method.name,
- outputFormatter: method.outputFormatter,
- inputFormatters: method.inputFormatters,
- params: call.params
- });
- }
-
- copyToClipboard = () => {
- this.props.actions.copyToClipboard(
-
- );
- }
-
- hasScrollbar (el) {
- return el.clientHeight < el.scrollHeight;
- }
-}
-
-CallsToolbar.propTypes = {
- call: PropTypes.object.isRequired,
- callEl: PropTypes.node.isRequired,
- containerEl: PropTypes.node.isRequired,
- actions: PropTypes.shape({
- fireRpc: PropTypes.func.isRequired,
- copyToClipboard: PropTypes.func.isRequired,
- selectRpcMethod: PropTypes.func.isRequired
- }).isRequired
-};
diff --git a/js/src/views/RpcCalls/components/CallsToolbar/CallsToolbar.spec.js b/js/src/views/RpcCalls/components/CallsToolbar/CallsToolbar.spec.js
deleted file mode 100644
index e326f730e..000000000
--- a/js/src/views/RpcCalls/components/CallsToolbar/CallsToolbar.spec.js
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React from 'react';
-import sinon from 'sinon';
-import { shallow } from 'enzyme';
-
-import '../../../../environment/tests';
-
-import CallsToolbar from './CallsToolbar';
-
-describe('views/Status/components/CallsToolbar', () => {
- const callEl = { offsetTop: 0 };
- const containerEl = { scrollTop: 0, clientHeight: 0, scrollHeight: 999 };
-
- describe('rendering (no call)', () => {
- let rendered;
-
- before(() => {
- const call = null;
-
- rendered = shallow();
- });
-
- it('does not render the component', () => {
- expect(rendered).to.not.have.descendants('[data-test="CallsToolbar-button-more"]');
- });
- });
-
- describe('rendering', () => {
- const call = { callNo: 456, name: 'eth_call', params: '', response: '' };
- let rendered;
- let btncontainer;
-
- before(() => {
- rendered = shallow();
- btncontainer = rendered.find('[data-test="CallsToolbar-button-container"]');
- });
-
- it('renders the More button', () => {
- expect(rendered).to.have.descendants('[data-test="CallsToolbar-button-more"]');
- });
-
- it('renders the Set button', () => {
- expect(btncontainer).to.have.descendants('[data-test="CallsToolbar-button-setCall"]');
- });
-
- it('renders the Fire button', () => {
- expect(btncontainer).to.have.descendants('[data-test="CallsToolbar-button-makeCall"]');
- });
-
- it('renders the Copy button', () => {
- expect(btncontainer).to.have.descendants('[data-test="CallsToolbar-copyCallToClipboard"]');
- });
- });
-
- describe('actions', () => {
- const call = { callNo: 456, name: 'eth_call', params: '', response: '' };
- const actions = { fireRpc: sinon.stub(), copyToClipboard: sinon.stub(), selectRpcMethod: sinon.stub() };
-
- let rendered;
- let instance;
-
- before(() => {
- rendered = shallow();
- instance = rendered.instance();
- });
-
- it('calls copyToClipboard with action copyToClipboard', () => {
- instance.copyToClipboard();
- expect(actions.copyToClipboard).to.be.calledOnce;
- });
-
- it('calls setCall with action selectRpcMethod', () => {
- instance.setCall();
- expect(actions.selectRpcMethod).to.be.calledOnce;
- });
-
- it('calls makeCall with action fireRpc', () => {
- instance.makeCall();
- expect(actions.fireRpc).to.be.calledOnce;
- });
- });
-
- describe('utility', () => {
- const call = { callNo: 456, name: 'eth_call', params: '', response: '' };
- let rendered;
- let instance;
-
- before(() => {
- rendered = shallow();
- instance = rendered.instance();
- });
-
- describe('.hasScrollbar', () => {
- it('correctly returns true when scrollbar', () => {
- expect(instance.hasScrollbar({ clientHeight: 123, scrollHeight: 456 })).to.be.true;
- });
-
- it('correctly returns false when no scrollbar', () => {
- expect(instance.hasScrollbar({ clientHeight: 456, scrollHeight: 123 })).to.be.false;
- });
- });
- });
-});
diff --git a/js/src/views/RpcCalls/components/CallsToolbar/index.js b/js/src/views/RpcCalls/components/CallsToolbar/index.js
deleted file mode 100644
index 1baac0636..000000000
--- a/js/src/views/RpcCalls/components/CallsToolbar/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './CallsToolbar';
diff --git a/js/src/views/RpcCalls/components/EditableValue/EditableValue.css b/js/src/views/RpcCalls/components/EditableValue/EditableValue.css
deleted file mode 100644
index bfa3dc674..000000000
--- a/js/src/views/RpcCalls/components/EditableValue/EditableValue.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright 2015-2017 Parity Technologies (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-.input {
- margin-top: 0;
- width: 100%;
- padding-left: 10px;
- padding-right: 50px;
-}
-
-.icon, .iconSuccess, .firstIcon {
- display: block;
- cursor: pointer;
- flex: 1;
- margin: 3px 3px;
- color: #bbb;
-}
-
-.success, .iconSuccess {
- color: #8bc34a;
-}
-
-.icon i, .iconSuccess i, .firstIcon i {
- vertical-align: middle;
-}
-
-.icons, .iconsVisible, .firstIcon {
- z-index: 10;
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- display: flex;
- opacity: 0;
- transition: opacity ease-in-out .2s;
- transition-delay: 0.2s;
-}
-
-.iconsVisible {
- opacity: 1.0;
-}
-
-.container:hover .icons, .container:hover .firstIcon {
- opacity: 1.0;
-}
-
-.firstIcon {
- position: absolute;
- left: -10px;
- right: auto;
- top: 0;
- bottom: 0;
- margin: 3px 0;
- display: block;
-}
-
-.autocomplete input {
- margin-top: 0;
- padding-left: 10px !important;
- padding-right: 50px !important;
-}
diff --git a/js/src/views/RpcCalls/components/EditableValue/EditableValue.js b/js/src/views/RpcCalls/components/EditableValue/EditableValue.js
deleted file mode 100644
index 98ad223ca..000000000
--- a/js/src/views/RpcCalls/components/EditableValue/EditableValue.js
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component, PropTypes } from 'react';
-import { FormattedMessage } from 'react-intl';
-import AutoComplete from 'material-ui/AutoComplete';
-
-import styles from './EditableValue.css';
-import valueStyles from '../Value/Value.css';
-
-export default class EditableValue extends Component {
- state = {
- value: this.props.value,
- inEditMode: false
- }
-
- componentWillReceiveProps (newProps) {
- if (newProps.value === this.state.value || this.state.inEditMode) {
- return;
- }
- this.setState({
- value: newProps.value
- });
- }
-
- onChange = value => {
- this.setState({
- value: value
- });
- }
-
- onOpenEdit = evt => {
- this.setState({
- inEditMode: true
- });
-
- if (!this._input) {
- return;
- }
- this._input.focus();
- }
-
- onCancel = evt => {
- this.setState({
- inEditMode: false,
- value: this.props.value
- });
- }
-
- onSubmit = () => {
- this.setState({
- inEditMode: false
- });
- this.props.onSubmit(this.state.value, false);
- }
-
- onResetToDefault = () => {
- this.props.onSubmit(this.props.defaultValue, true);
- }
-
- render () {
- return (
-
- );
- }
-
- renderInput () {
- const { inEditMode, value } = this.state;
-
- const setInput = el => { this._input = el; };
- const onChange = evt => this.onChange(evt.target.value);
-
- if (!inEditMode || !this.props.autocomplete) {
- return (
-
- );
- }
-
- return (
-
- );
- }
-
- renderResetButton () {
- if (this.state.inEditMode) {
- return;
- }
-
- if (!this.props.defaultValue || this.state.value === this.props.defaultValue) {
- return;
- }
-
- return (
-
- }
- { ...this._testInherit('reset') }
- >
-
-
- );
- }
-
- renderButtons () {
- if (this.state.inEditMode) {
- return [
-
-
- ,
-
-
-
- ];
- }
-
- return (
-
- }
- { ...this._testInherit('edit') }
- >
-
-
- );
- }
-
- static propTypes = {
- onSubmit: PropTypes.func.isRequired,
- value: PropTypes.string,
- defaultValue: PropTypes.string,
- children: PropTypes.element,
- autocomplete: PropTypes.bool,
- dataSource: PropTypes.arrayOf(PropTypes.string)
- }
-}
diff --git a/js/src/views/RpcCalls/components/EditableValue/index.js b/js/src/views/RpcCalls/components/EditableValue/index.js
deleted file mode 100644
index 480a8772b..000000000
--- a/js/src/views/RpcCalls/components/EditableValue/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './EditableValue';
diff --git a/js/src/views/RpcCalls/components/JsonEditor/JsonEditor.css b/js/src/views/RpcCalls/components/JsonEditor/JsonEditor.css
deleted file mode 100644
index 87b7e10d9..000000000
--- a/js/src/views/RpcCalls/components/JsonEditor/JsonEditor.css
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright 2015-2017 Parity Technologies (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-.editor {
- width: 100%;
- height: 200px;
-}
-
-.error {
- border: 1px solid red !important;
-}
-
-.errorMsg {
- color: red;
-}
diff --git a/js/src/views/RpcCalls/components/JsonEditor/JsonEditor.js b/js/src/views/RpcCalls/components/JsonEditor/JsonEditor.js
deleted file mode 100644
index 75bc59e87..000000000
--- a/js/src/views/RpcCalls/components/JsonEditor/JsonEditor.js
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component, PropTypes } from 'react';
-import { isEqual } from 'lodash';
-import formatJson from 'format-json';
-
-import styles from './JsonEditor.css';
-
-export default class JsonEditor extends Component {
- constructor (...args) {
- super(...args);
- let { value } = this.props;
-
- value = formatJson.plain(value);
- this.state = { value };
- }
-
- componentDidMount () {
- const mockedEvt = { target: { value: this.state.value } };
-
- this.onChange(mockedEvt);
- }
-
- componentWillReceiveProps (nextProps) {
- let { value } = nextProps;
-
- if (!isEqual(value, this.props.value)) {
- value = formatJson.plain(value);
- this.setState({ value });
- }
- }
-
- render () {
- let errorClass = this.state.error ? styles.error : '';
-
- return (
-
- );
- }
-
- onChange = evt => {
- const { value } = evt.target;
- let parsed;
- let error;
-
- try {
- parsed = JSON.parse(value);
- error = null;
- } catch (err) {
- parsed = null;
- error = 'invalid json';
- }
-
- this.setState({
- value,
- error
- });
-
- this.props.onChange(parsed, error);
- }
-
- static propTypes = {
- onChange: PropTypes.func.isRequired,
- value: PropTypes.object
- }
-}
diff --git a/js/src/views/RpcCalls/components/JsonEditor/index.js b/js/src/views/RpcCalls/components/JsonEditor/index.js
deleted file mode 100644
index c0c35731e..000000000
--- a/js/src/views/RpcCalls/components/JsonEditor/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './JsonEditor';
diff --git a/js/src/views/RpcCalls/components/Markdown/Markdown.css b/js/src/views/RpcCalls/components/Markdown/Markdown.css
deleted file mode 100644
index 72b1baee6..000000000
--- a/js/src/views/RpcCalls/components/Markdown/Markdown.css
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 2015-2017 Parity Technologies (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-.container li {
- display: list-item;
- line-height: 1.6;
-}
diff --git a/js/src/views/RpcCalls/components/Markdown/Markdown.js b/js/src/views/RpcCalls/components/Markdown/Markdown.js
deleted file mode 100644
index 6d904187b..000000000
--- a/js/src/views/RpcCalls/components/Markdown/Markdown.js
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import marked from 'marked';
-import React, { Component, PropTypes } from 'react';
-import styles from './Markdown.css';
-
-export default class Marked extends Component {
- state = {}
-
- render () {
- let { parsed } = this.state;
-
- if (!parsed) {
- return null;
- }
- return ;
- }
-
- componentWillMount () {
- this.setState({ parsed: this.parse(this.props.val) });
- }
-
- componentWillReceiveProps (newProps) {
- if (newProps.val === this.props.val) {
- return;
- }
- this.setState({ parsed: this.parse(newProps.val) });
- }
-
- parse (val) {
- try {
- val = marked(val);
- } catch (err) {
- console.error(`Marked error when parsing ${val}: ${err}`);
- }
- return val;
- }
-
- static propTypes = {
- val: PropTypes.any,
- style: PropTypes.object
- }
-}
diff --git a/js/src/views/RpcCalls/components/Markdown/index.js b/js/src/views/RpcCalls/components/Markdown/index.js
deleted file mode 100644
index db702025e..000000000
--- a/js/src/views/RpcCalls/components/Markdown/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './Markdown';
diff --git a/js/src/views/RpcCalls/components/Response/Response.css b/js/src/views/RpcCalls/components/Response/Response.css
deleted file mode 100644
index 8aa588966..000000000
--- a/js/src/views/RpcCalls/components/Response/Response.css
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 2015-2017 Parity Technologies (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-.response {
- white-space: nowrap;
- overflow-x: auto;
-}
diff --git a/js/src/views/RpcCalls/components/Response/Response.js b/js/src/views/RpcCalls/components/Response/Response.js
deleted file mode 100644
index f2cadcad6..000000000
--- a/js/src/views/RpcCalls/components/Response/Response.js
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component, PropTypes } from 'react';
-import { isArray, isPlainObject } from 'lodash';
-
-import styles from './Response.css';
-
-export default class Response extends Component {
- render () {
- let { response } = this.props;
- let formatted;
-
- if (isArray(response)) {
- formatted = this.renderArray();
- }
- if (isPlainObject(response)) {
- formatted = this.renderObject();
- }
-
- return
{ formatted || response }
;
- }
-
- renderArray () {
- let { response } = this.props;
-
- return response.map((r, idx) => (
-
- { idx === 0 ? '[' : ',' }
- { idx === 0 ? '' : }
- { r }
- { idx === response.length - 1 ? ']' : '' }
-
- ));
- }
-
- renderObject () {
- let { response } = this.props;
- const arr = JSON.stringify(response, null, 1).split('\n');
-
- return arr.map((any, idx) => (
-
- { any }
- { idx !== 0 && idx !== arr.length - 1 ? : '' }
-
- ));
- }
-
- static propTypes = {
- response: PropTypes.any.isRequired
- }
-}
diff --git a/js/src/views/RpcCalls/components/Response/Response.spec.js b/js/src/views/RpcCalls/components/Response/Response.spec.js
deleted file mode 100644
index 467ef3edc..000000000
--- a/js/src/views/RpcCalls/components/Response/Response.spec.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React from 'react';
-import { shallow } from 'enzyme';
-
-import '../../../../environment/tests';
-
-import Response from './Response';
-
-describe('views/Status/components/Response', () => {
- describe('rendering', () => {
- it('renders non-arrays/non-objects exactly as received', () => {
- const TEST = '1234567890';
- const rendered = shallow();
-
- expect(rendered).to.have.html(`
${TEST}
`);
- });
-
- it('renders arrays properly with index and value', () => {
- const TEST = ['123', '456'];
- const rendered = shallow();
-
- expect(rendered).to.have.html('
[123, 456]
');
- });
-
- it('renders objects properly with key and value', () => {
- const TEST = { foo: '123', bar: '456' };
- const rendered = shallow();
-
- expect(rendered).to.have.html('
{ "foo": "123", "bar": "456" }
');
- });
- });
-});
diff --git a/js/src/views/RpcCalls/components/Response/index.js b/js/src/views/RpcCalls/components/Response/index.js
deleted file mode 100644
index 6fb897955..000000000
--- a/js/src/views/RpcCalls/components/Response/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './Response';
diff --git a/js/src/views/RpcCalls/components/RpcCalls/RpcCalls.css b/js/src/views/RpcCalls/components/RpcCalls/RpcCalls.css
deleted file mode 100644
index 055ba53d8..000000000
--- a/js/src/views/RpcCalls/components/RpcCalls/RpcCalls.css
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright 2015-2017 Parity Technologies (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-.header {
- margin: 0;
-}
-
-.input {
- width: 100%;
-}
-
-h3 + label > input {
- margin-top: 0;
-}
-
-.jsonToggle {
- width: auto !important;
- float: right;
-}
diff --git a/js/src/views/RpcCalls/components/RpcCalls/RpcCalls.js b/js/src/views/RpcCalls/components/RpcCalls/RpcCalls.js
deleted file mode 100644
index 022c28975..000000000
--- a/js/src/views/RpcCalls/components/RpcCalls/RpcCalls.js
+++ /dev/null
@@ -1,373 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component, PropTypes } from 'react';
-import { FormattedMessage } from 'react-intl';
-import _ from 'lodash';
-
-import Toggle from 'material-ui/Toggle/Toggle';
-import TextField from 'material-ui/TextField';
-import { RpcAutoComplete } from 'dapps-react-components';
-import { formatRpcMd } from '../../util/rpc-md';
-import AnimateChildren from '../../components-compositors/Animated/children';
-import JsonEditor from '../JsonEditor';
-import Calls from '../Calls';
-import Markdown from '../Markdown';
-import styles from './RpcCalls.css';
-import rpcData from '../../data/rpc.json';
-import RpcNav from '../RpcNav';
-
-const rpcMethods = _.sortBy(rpcData.methods, 'name');
-
-export default class RpcCalls extends Component {
- state = {};
-
- componentWillReceiveProps (nextProps) {
- const { paramsValues, params } = nextProps.rpc.selectedMethod;
-
- if (paramsValues) {
- params.map((p, index) => {
- // todo [adgo] 01.05.2016 - make sure this works
- // not sure idx is the same for paramsValues and params
- this.setState({
- [this.paramKey(p)]: paramsValues[index]
- });
- });
-
- if (this.state.jsonMode) {
- this.setJsonEditorValue();
- }
- }
- }
-
- render () {
- return (
-
- );
- }
-
- renderFormButton () {
- return (
-
- );
- }
-
- onJsonEditorChange = (jsonEditorParsedValue, jsonEditorError) => {
- this.setState({
- jsonEditorParsedValue,
- jsonEditorError
- });
- }
-
- jsonParamValue = p => {
- if (_.isPlainObject(p)) {
- const { description, details } = p;
-
- return Object.keys(details).reduce((obj, key) => {
- obj[key] = this.paramValue(`${description}.${key}`);
- return obj;
- }, {});
- }
-
- return this.paramValue(p);
- }
-
- paramValue (p) {
- return this.state[this.paramKey(p)];
- }
-
- paramKey (p) {
- return `params_${p}`;
- }
-
- selectedMethodChanged (nextProps) {
- return nextProps.rpc.selectedMethod.name !== this.props.rpc.selectedMethod.name;
- }
-
- stateChanged (nextState) {
- return !_.isEqual(nextState, this.state);
- }
-
- prevCallsChanged (nextProps) {
- return nextProps.rpc.prevCalls.length !== this.props.rpc.prevCalls.length;
- }
-
- static propTypes = {
- rpc: PropTypes.shape({
- prevCalls: PropTypes.array.isRequired,
- selectedMethod: PropTypes.object.isRequired
- }).isRequired,
- actions: PropTypes.shape({
- fireRpc: PropTypes.func.isRequired,
- selectRpcMethod: PropTypes.func.isRequired,
- resetRpcPrevCalls: PropTypes.func.isRequired
- }).isRequired
- }
-}
diff --git a/js/src/views/RpcCalls/components/RpcCalls/index.js b/js/src/views/RpcCalls/components/RpcCalls/index.js
deleted file mode 100644
index ec6568103..000000000
--- a/js/src/views/RpcCalls/components/RpcCalls/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './RpcCalls';
diff --git a/js/src/views/RpcCalls/components/RpcDocs/RpcDocs.css b/js/src/views/RpcCalls/components/RpcDocs/RpcDocs.css
deleted file mode 100644
index 1a6a41b35..000000000
--- a/js/src/views/RpcCalls/components/RpcDocs/RpcDocs.css
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright 2015-2017 Parity Technologies (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-.autocomplete {
- margin-top: 0 !important;
-}
-
-.headline {
- text-transform: none;
-}
-
-.returnsTitle {
- display: 'inline';
-}
-
-.returnsDesc {
- display: inline-block;
-}
-
-hr {
- margin-bottom: 0;
-}
diff --git a/js/src/views/RpcCalls/components/RpcDocs/RpcDocs.js b/js/src/views/RpcCalls/components/RpcDocs/RpcDocs.js
deleted file mode 100644
index 922346763..000000000
--- a/js/src/views/RpcCalls/components/RpcDocs/RpcDocs.js
+++ /dev/null
@@ -1,142 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component } from 'react';
-import ReactDOM from 'react-dom';
-import { FormattedMessage } from 'react-intl';
-import { sortBy } from 'lodash';
-import List from 'material-ui/List/List';
-import ListItem from 'material-ui/List/ListItem';
-import AutoComplete from '../AutoComplete';
-
-import { formatRpcMd } from '../../util/rpc-md';
-import ScrollTopButton from '../ScrollTopButton';
-import styles from './RpcDocs.css';
-import Markdown from '../Markdown';
-import rpcData from '../../data/rpc.json';
-import RpcNav from '../RpcNav';
-
-const rpcMethods = sortBy(rpcData.methods, 'name');
-
-class RpcDocs extends Component {
- render () {
- return (
-
-
- { idx !== rpcMethods.length - 1 ? : '' }
-
- );
- });
-
- return (
-
- { methods }
-
- );
- }
-
- handleMethodChange = name => {
- ReactDOM.findDOMNode(this[`_method-${name}`]).scrollIntoViewIfNeeded();
- }
-}
-
-export default RpcDocs;
diff --git a/js/src/views/RpcCalls/components/RpcDocs/index.js b/js/src/views/RpcCalls/components/RpcDocs/index.js
deleted file mode 100644
index 4e89ebde4..000000000
--- a/js/src/views/RpcCalls/components/RpcDocs/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './RpcDocs';
diff --git a/js/src/views/RpcCalls/components/RpcNav/RpcNav.css b/js/src/views/RpcCalls/components/RpcNav/RpcNav.css
deleted file mode 100644
index 442a71f8b..000000000
--- a/js/src/views/RpcCalls/components/RpcNav/RpcNav.css
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright 2015-2017 Parity Technologies (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-.nav {
- font-size: 20px;
- float: right;
-}
-
-.activeNav {
- color: #b7a6a6 !important;
-}
-
-.nav a:not(:first-child) {
- margin-left: 30px;
-}
diff --git a/js/src/views/RpcCalls/components/RpcNav/RpcNav.js b/js/src/views/RpcCalls/components/RpcNav/RpcNav.js
deleted file mode 100644
index 41e8614b7..000000000
--- a/js/src/views/RpcCalls/components/RpcNav/RpcNav.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component } from 'react';
-import { Link } from 'react-router';
-import styles from './RpcNav.css';
-
-export default class RpcNav extends Component {
- render () {
- return (
-
-
-
-
-
-
-
-
- );
- }
-}
diff --git a/js/src/views/RpcCalls/components/RpcNav/index.js b/js/src/views/RpcCalls/components/RpcNav/index.js
deleted file mode 100644
index d898e9f8f..000000000
--- a/js/src/views/RpcCalls/components/RpcNav/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './RpcNav';
diff --git a/js/src/views/RpcCalls/components/ScrollTopButton/ScrollTopButton.css b/js/src/views/RpcCalls/components/ScrollTopButton/ScrollTopButton.css
deleted file mode 100644
index e2c24f263..000000000
--- a/js/src/views/RpcCalls/components/ScrollTopButton/ScrollTopButton.css
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright 2015-2017 Parity Technologies (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-.scrollButton {
- position: fixed !important;
- bottom: 35px !important;
- right: 0;
- left: 0;
- margin-right: auto;
- margin-left: auto;
- animation: fadein .5s;
- background: #eee !important;
- border-radius: 50%;
- border: 1px solid #6691C2 !important;
- z-index: 10;
- padding: 5px !important;
- width: 34px !important;
- height: 34px !important;
-}
-
-@keyframes fadein {
- from { opacity: 0; }
- to { opacity: 1; }
-}
-
-.hidden {
- display: none !important;
-}
diff --git a/js/src/views/RpcCalls/components/ScrollTopButton/ScrollTopButton.js b/js/src/views/RpcCalls/components/ScrollTopButton/ScrollTopButton.js
deleted file mode 100644
index 08bebecb7..000000000
--- a/js/src/views/RpcCalls/components/ScrollTopButton/ScrollTopButton.js
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component } from 'react';
-import IconButton from 'material-ui/IconButton';
-import ArrowUpwardIcon from 'material-ui/svg-icons/navigation/arrow-upward';
-
-import { scrollTo } from './util';
-import styles from './ScrollTopButton.css';
-
-const scrollTopThreshold = 600;
-
-export default class ScrollTopButton extends Component {
- state = {}
-
- componentDidMount () {
- window.addEventListener('scroll', this.handleScroll);
- }
-
- componentWillUnmount () {
- window.removeEventListener('scroll', this.handleScroll);
- }
-
- _scrollToTop () {
- scrollTo(document.body, 0, 500);
- }
-
- render () {
- let hiddenClass = !this.state.showScrollButton ? styles.hidden : '';
-
- return (
-
-
-
- );
- }
-
- handleScroll = event => {
- let { scrollTop } = event.srcElement.body;
- let { showScrollButton } = this.state;
-
- if (!showScrollButton && scrollTop > scrollTopThreshold) {
- this.setState({
- showScrollButton: true
- });
- }
-
- if (showScrollButton && scrollTop < scrollTopThreshold) {
- this.setState({
- showScrollButton: false
- });
- }
- }
-}
diff --git a/js/src/views/RpcCalls/components/ScrollTopButton/index.js b/js/src/views/RpcCalls/components/ScrollTopButton/index.js
deleted file mode 100644
index e98d67db7..000000000
--- a/js/src/views/RpcCalls/components/ScrollTopButton/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './ScrollTopButton';
diff --git a/js/src/views/RpcCalls/components/ScrollTopButton/util.js b/js/src/views/RpcCalls/components/ScrollTopButton/util.js
deleted file mode 100644
index aac32a81b..000000000
--- a/js/src/views/RpcCalls/components/ScrollTopButton/util.js
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export function scrollTo (element, to, duration) {
- let start = element.scrollTop;
- let change = to - start;
- let increment = 50;
-
- let animateScroll = elapsedTime => {
- elapsedTime += increment;
- let position = easeInOut(elapsedTime, start, change, duration);
-
- element.scrollTop = position;
- if (elapsedTime < duration) {
- setTimeout(() => {
- // stop if user scrolled
- if (element.scrollTop !== parseInt(position, 10)) {
- return;
- }
- animateScroll(elapsedTime);
- }, increment);
- }
- };
-
- animateScroll(0);
-}
-
-export function easeInOut (currentTime, start, change, duration) {
- currentTime /= duration / 2;
- if (currentTime < 1) {
- return change / 2 * currentTime * currentTime + start;
- }
- currentTime -= 1;
- return -change / 2 * (currentTime * (currentTime - 2) - 1) + start;
-}
diff --git a/js/src/views/RpcCalls/constants/index.js b/js/src/views/RpcCalls/constants/index.js
deleted file mode 100644
index 2262cb7b2..000000000
--- a/js/src/views/RpcCalls/constants/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export const SCROLLBAR_WIDTH = 22;
diff --git a/js/src/views/RpcCalls/containers/RpcPage/RpcPage.js b/js/src/views/RpcCalls/containers/RpcPage/RpcPage.js
deleted file mode 100644
index 3a58820fe..000000000
--- a/js/src/views/RpcCalls/containers/RpcPage/RpcPage.js
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component, PropTypes } from 'react';
-
-import { bindActionCreators } from 'redux';
-import { connect } from 'react-redux';
-import { extend } from 'lodash';
-import * as RpcActions from '../../actions/rpc';
-import { updateLogging } from '../../actions/logger';
-import { copyToClipboard } from '../../actions/clipboard';
-
-class RpcPage extends Component {
- static propTypes = {
- children: PropTypes.object.isRequired,
- rpc: PropTypes.object.isRequired,
- actions: PropTypes.object.isRequired
- }
-
- render () {
- return (
-
- );
- }
-}
-
-function mapStateToProps (state) {
- return state;
-}
-
-function mapDispatchToProps (dispatch) {
- return {
- actions: bindActionCreators(extend({}, RpcActions, { copyToClipboard }, { updateLogging }), dispatch)
- };
-}
-
-export default connect(
- mapStateToProps,
- mapDispatchToProps
-)(RpcPage);
diff --git a/js/src/views/RpcCalls/containers/RpcPage/index.js b/js/src/views/RpcCalls/containers/RpcPage/index.js
deleted file mode 100644
index fd014298c..000000000
--- a/js/src/views/RpcCalls/containers/RpcPage/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './RpcPage';
diff --git a/js/src/views/RpcCalls/data/rpc.json b/js/src/views/RpcCalls/data/rpc.json
deleted file mode 100644
index ec85b7c5b..000000000
--- a/js/src/views/RpcCalls/data/rpc.json
+++ /dev/null
@@ -1,1093 +0,0 @@
-{
- "methods": [
- {
- "name": "web3_clientVersion",
- "desc": "Returns the current client version.",
- "params": [],
- "returns": "`String` - The current client version",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "web3_sha3",
- "desc": "Returns Keccak-256 (*not* the standardized SHA3-256) of the given data.",
- "params": [
- "`String` - the data to convert into a SHA3 hash"
- ],
- "returns": "`DATA` - The SHA3 result of the given string.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "net_version",
- "desc": "Returns the current network protocol version.",
- "params": [],
- "returns": "`String` - The current network protocol version",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "net_listening",
- "desc": "Returns `true` if client is actively listening for network connections.",
- "params": [],
- "returns": "`Boolean` - `true` when listening, otherwise `false`.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "net_peerCount",
- "desc": "Returns number of peers currenly connected to the client.",
- "params": [],
- "returns": "`QUANTITY` - integer of the number of connected peers.",
- "inputFormatters": [],
- "outputFormatter": "utils.toDecimal"
- },
- {
- "name": "eth_protocolVersion",
- "desc": "Returns the current ethereum protocol version.",
- "params": [],
- "returns": "`String` - The current ethereum protocol version",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_syncing",
- "desc": "Returns an object with data about the sync status or `false`.",
- "params": [],
- "returns": {
- "description": "`Object|Boolean`, An object with sync status data or `FALSE`, when not syncing:",
- "details": {
- "startingBlock": "`QUANTITY` - The block at which the import started (will only be reset, after the sync reached his head)",
- "currentBlock": "`QUANTITY` - The current block, same as eth_blockNumber",
- "highestBlock": "`QUANTITY` - The estimated highest block"
- }
- },
- "inputFormatters": [],
- "outputFormatter": "outputSyncingFormatter"
- },
- {
- "name": "eth_coinbase",
- "desc": "Returns the client coinbase address.",
- "params": [],
- "returns": "`DATA`, 20 bytes - the current coinbase address.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_mining",
- "desc": "Returns `true` if client is actively mining new blocks.",
- "params": [],
- "returns": "`Boolean` - returns `true` of the client is mining, otherwise `false`.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_hashrate",
- "desc": "Returns the number of hashes per second that the node is mining with.",
- "params": [],
- "returns": "`QUANTITY` - number of hashes per second.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_gasPrice",
- "desc": "Returns the current price per gas in wei.",
- "params": [],
- "returns": "`QUANTITY` - integer of the current gas price in wei.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_accounts",
- "desc": "Returns a list of addresses owned by client.",
- "params": [],
- "returns": "`Array of DATA`, 20 Bytes - addresses owned by the client.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_blockNumber",
- "desc": "Returns the number of most recent block.",
- "params": [],
- "returns": "`QUANTITY` - integer of the current block number the client is on.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getBalance",
- "desc": "Returns the balance of the account of given address.",
- "params": [
- "`DATA`, 20 Bytes - address to check for balance.",
- "`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the [default block parameter](#the-default-block-parameter)"
- ],
- "returns": "`QUANTITY` - integer of the current balance in wei.",
- "inputFormatters": [
- "inputAddressFormatter",
- "inputDefaultBlockNumberFormatter"
- ],
- "outputFormatter": "outputBigNumberFormatter"
- },
- {
- "name": "eth_getStorageAt",
- "desc": "Returns the value from a storage position at a given address.",
- "params": [
- "`DATA`, 20 Bytes - address of the storage.",
- "`QUANTITY` - integer of the position in the storage.",
- "`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the [default block parameter](#the-default-block-parameter)"
- ],
- "returns": "`DATA` - the value at this storage position.",
- "inputFormatters": [
- null,
- "utils.toHex",
- "inputDefaultBlockNumberFormatter"
- ],
- "outputFormatter": null
- },
- {
- "name": "eth_getTransactionCount",
- "desc": "Returns the number of transactions *sent* from an address.",
- "params": [
- "`DATA`, 20 Bytes - address.",
- "`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the [default block parameter](#the-default-block-parameter)"
- ],
- "returns": "`QUANTITY` - integer of the number of transactions send from this address.",
- "inputFormatters": [
- null,
- "inputDefaultBlockNumberFormatter"
- ],
- "outputFormatter": "utils.toDecimal"
- },
- {
- "name": "eth_getBlockTransactionCountByHash",
- "desc": "Returns the number of transactions in a block from a block matching the given block hash.",
- "params": [
- "`DATA`, 32 Bytes - hash of a block"
- ],
- "returns": "`QUANTITY` - integer of the number of transactions in this block.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getBlockTransactionCountByNumber",
- "desc": "Returns the number of transactions in a block from a block matching the given block number.",
- "params": [
- "`QUANTITY|TAG` - integer of a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the [default block parameter](#the-default-block-parameter)."
- ],
- "returns": "`QUANTITY` - integer of the number of transactions in this block.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getUncleCountByBlockHash",
- "desc": "Returns the number of uncles in a block from a block matching the given block hash.",
- "params": [
- "`DATA`, 32 Bytes - hash of a block"
- ],
- "returns": "`QUANTITY` - integer of the number of uncles in this block.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getUncleCountByBlockNumber",
- "desc": "Returns the number of uncles in a block from a block matching the given block number.",
- "params": [
- "`QUANTITY` - integer of a block number, or the string \"latest\", \"earliest\" or \"pending\", see the [default block parameter](#the-default-block-parameter)"
- ],
- "returns": "`QUANTITY` - integer of the number of uncles in this block.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getCode",
- "desc": "Returns code at a given address.",
- "params": [
- "`DATA`, 20 Bytes - address",
- "`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the [default block parameter](#the-default-block-parameter)"
- ],
- "returns": "`DATA` - the code from the given address.",
- "inputFormatters": [
- "inputAddressFormatter",
- "inputDefaultBlockNumberFormatter"
- ],
- "outputFormatter": null
- },
- {
- "name": "eth_sign",
- "desc": "Signs data with a given address.\n**Note** the address to sign must be unlocked.",
- "params": [
- "`DATA`, 20 Bytes - address",
- "`DATA`, Data to sign"
- ],
- "returns": "`DATA`: Signed data",
- "inputFormatters": [
- "inputAddressFormatter",
- null
- ],
- "outputFormatter": null
- },
- {
- "name": "eth_sendTransaction",
- "desc": "Creates new message call transaction or a contract creation, if the data field contains code.",
- "params": [
- {
- "description": "`Object` - The transaction object",
- "details": {
- "from": "`DATA`, 20 Bytes - The address the transaction is send from.",
- "to": "`DATA`, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.",
- "gas": "`QUANTITY` - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.",
- "gasPrice": "`QUANTITY` - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas",
- "value": "`QUANTITY` - (optional) Integer of the value send with this transaction",
- "data": "`DATA` - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see [Ethereum Contract ABI](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI)",
- "nonce": "`QUANTITY` - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce."
- }
- }
- ],
- "returns": "`DATA`, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.",
- "inputFormatters": [
- "inputTransactionFormatter"
- ],
- "outputFormatter": null
- },
- {
- "name": "eth_sendRawTransaction",
- "desc": "Creates new message call transaction or a contract creation for signed transactions.",
- "params": [
- "`DATA`, The signed transaction data."
- ],
- "returns": "`DATA`, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.",
- "inputFormatters": [
- null
- ],
- "outputFormatter": null
- },
- {
- "name": "eth_call",
- "desc": "Executes a new message call immediately without creating a transaction on the block chain.",
- "params": [
- {
- "description": "`Object` - The transaction call object",
- "details": {
- "from": "`DATA`, 20 Bytes - (optional) The address the transaction is send from.",
- "to": "`DATA`, 20 Bytes - The address the transaction is directed to.",
- "gas": "`QUANTITY` - (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.",
- "gasPrice": "`QUANTITY` - (optional) Integer of the gasPrice used for each paid gas",
- "value": "`QUANTITY` - (optional) Integer of the value send with this transaction",
- "data": "`DATA` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI)"
- }
- },
- "`QUANTITY|TAG` - integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the [default block parameter](#the-default-block-parameter)"
- ],
- "returns": "`DATA` - the return value of executed contract.",
- "inputFormatters": [
- "inputCallFormatter",
- "inputDefaultBlockNumberFormatter"
- ],
- "outputFormatter": null
- },
- {
- "name": "eth_estimateGas",
- "desc": "Makes a call or transaction, which won't be added to the blockchain and returns the used gas, which can be used for estimating the used gas.",
- "params": [],
- "returns": "`QUANTITY` - the amount of gas used.",
- "inputFormatters": [
- "inputCallFormatter"
- ],
- "outputFormatter": "utils.toDecimal"
- },
- {
- "name": "eth_getBlockByHash",
- "desc": "Returns information about a block by hash.",
- "params": [
- "`DATA`, 32 Bytes - Hash of a block.",
- "`Boolean` - If `true` it returns the full transaction objects, if `false` only the hashes of the transactions."
- ],
- "returns": {
- "description": "`Object` - A block object, or `null` when no block was found:",
- "details": {
- "number": "`QUANTITY` - the block number. `null` when its pending block.",
- "hash": "`DATA`, 32 Bytes - hash of the block. `null` when its pending block.",
- "parentHash": "`DATA`, 32 Bytes - hash of the parent block.",
- "nonce": "`DATA`, 8 Bytes - hash of the generated proof-of-work. `null` when its pending block.",
- "sha3Uncles": "`DATA`, 32 Bytes - SHA3 of the uncles data in the block.",
- "logsBloom": "`DATA`, 256 Bytes - the bloom filter for the logs of the block. `null` when its pending block.",
- "transactionsRoot": "`DATA`, 32 Bytes - the root of the transaction trie of the block.",
- "stateRoot": "`DATA`, 32 Bytes - the root of the final state trie of the block.",
- "receiptsRoot": "`DATA`, 32 Bytes - the root of the receipts trie of the block.",
- "miner": "`DATA`, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.",
- "difficulty": "`QUANTITY` - integer of the difficulty for this block.",
- "totalDifficulty": "`QUANTITY` - integer of the total difficulty of the chain until this block.",
- "extraData": "`DATA` - the \"extra data\" field of this block.",
- "size": "`QUANTITY` - integer the size of this block in bytes.",
- "gasLimit": "`QUANTITY` - the maximum gas allowed in this block.",
- "gasUsed": "`QUANTITY` - the total used gas by all transactions in this block.",
- "timestamp": "`QUANTITY` - the unix timestamp for when the block was collated.",
- "transactions": "`Array` - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.",
- "uncles": "`Array` - Array of uncle hashes."
- }
- },
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getBlockByNumber",
- "desc": "Returns information about a block by block number.",
- "params": [
- "`QUANTITY|TAG` - integer of a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the [default block parameter](#the-default-block-parameter).",
- "`Boolean` - If `true` it returns the full transaction objects, if `false` only the hashes of the transactions."
- ],
- "returns": "See [eth_getBlockByHash](#eth_getblockbyhash)",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getTransactionByHash",
- "desc": "Returns the information about a transaction requested by transaction hash.",
- "params": [
- "`DATA`, 32 Bytes - hash of a transaction"
- ],
- "returns": {
- "description": "`Object` - A transaction object, or `null` when no transaction was found:",
- "details": {
- "hash": "`DATA`, 32 Bytes - hash of the transaction.",
- "nonce": "`QUANTITY` - the number of transactions made by the sender prior to this one.",
- "blockHash": "`DATA`, 32 Bytes - hash of the block where this transaction was in. `null` when its pending.",
- "blockNumber": "`QUANTITY` - block number where this transaction was in. `null` when its pending.",
- "transactionIndex": "`QUANTITY` - integer of the transactions index position in the block. `null` when its pending.",
- "from": "`DATA`, 20 Bytes - address of the sender.",
- "to": "`DATA`, 20 Bytes - address of the receiver. `null` when its a contract creation transaction.",
- "value": "`QUANTITY` - value transferred in Wei.",
- "gasPrice": "`QUANTITY` - gas price provided by the sender in Wei.",
- "gas": "`QUANTITY` - gas provided by the sender.",
- "input": "`DATA` - the data send along with the transaction."
- }
- },
- "inputFormatters": [],
- "outputFormatter": "outputTransactionFormatter"
- },
- {
- "name": "eth_getTransactionByBlockHashAndIndex",
- "desc": "Returns information about a transaction by block hash and transaction index position.",
- "params": [
- "`DATA`, 32 Bytes - hash of a block.",
- "`QUANTITY` - integer of the transaction index position."
- ],
- "returns": "See [eth_getBlockByHash](#eth_gettransactionbyhash)",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getTransactionByBlockNumberAndIndex",
- "desc": "Returns information about a transaction by block number and transaction index position.",
- "params": [
- "`QUANTITY|TAG` - a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the [default block parameter](#the-default-block-parameter).",
- "`QUANTITY` - the transaction index position."
- ],
- "returns": "See [eth_getBlockByHash](#eth_gettransactionbyhash)",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getTransactionReceipt",
- "desc": "Returns the receipt of a transaction by transaction hash.\n**Note** That the receipt is not available for pending transactions.",
- "params": [
- "`DATA`, 32 Bytes - hash of a transaction"
- ],
- "returns": {
- "description": "`Object` - A transaction receipt object, or `null` when no receipt was found:",
- "details": {
- "transactionHash ": "`DATA`, 32 Bytes - hash of the transaction.",
- "transactionIndex": "`QUANTITY` - integer of the transactions index position in the block.",
- "blockHash": "`DATA`, 32 Bytes - hash of the block where this transaction was in.",
- "blockNumber": "`QUANTITY` - block number where this transaction was in.",
- "cumulativeGasUsed ": "`QUANTITY ` - The total amount of gas used when this transaction was executed in the block.",
- "gasUsed ": "`QUANTITY ` - The amount of gas used by this specific transaction alone.",
- "contractAddress ": "`DATA`, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise `null`.",
- "logs": "`Array` - Array of log objects, which this transaction generated."
- }
- },
- "inputFormatters": [],
- "outputFormatter": "outputTransactionReceiptFormatter"
- },
- {
- "name": "eth_getUncleByBlockHashAndIndex",
- "desc": "Returns information about a uncle of a block by hash and uncle index position.",
- "params": [
- "`DATA`, 32 Bytes - hash a block.",
- "`QUANTITY` - the uncle's index position."
- ],
- "returns": "See [eth_getBlockByHash](#eth_getblockbyhash)",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getUncleByBlockNumberAndIndex",
- "desc": "Returns information about a uncle of a block by number and uncle index position.",
- "params": [
- "`QUANTITY|TAG` - a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the [default block parameter](#the-default-block-parameter).",
- "`QUANTITY` - the uncle's index position."
- ],
- "returns": "See [eth_getBlockByHash](#eth_getblockbyhash)",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getCompilers",
- "desc": "Returns a list of available compilers in the client.",
- "params": [],
- "returns": "`Array` - Array of available compilers.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_compileSolidity",
- "desc": "Returns compiled solidity code.",
- "params": [
- "`String` - The source code."
- ],
- "returns": "`DATA` - The compiled source code.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_compileLLL",
- "desc": "Returns compiled LLL code.",
- "params": [
- "`String` - The source code."
- ],
- "returns": "`DATA` - The compiled source code.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_compileSerpent",
- "desc": "Returns compiled serpent code.",
- "params": [
- "`String` - The source code."
- ],
- "returns": "`DATA` - The compiled source code.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_newFilter",
- "desc": "Creates a filter object, based on filter options, to notify when the state changes (logs).\nTo check if the state has changed, call [eth_getFilterChanges](#eth_getfilterchanges).",
- "params": [],
- "returns": {
- "description": "1. `Object` - The filter options:",
- "details": {
- "fromBlock": "`QUANTITY|TAG` - (optional, default: `\"latest\"`) Integer block number, or `\"latest\"` for the last mined block or `\"pending\"`, `\"earliest\"` for not yet mined transactions.",
- "toBlock": "`QUANTITY|TAG` - (optional, default: `\"latest\"`) Integer block number, or `\"latest\"` for the last mined block or `\"pending\"`, `\"earliest\"` for not yet mined transactions.",
- "address": "`DATA|Array`, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.",
- "topics": "`Array of DATA`, - (optional) Array of 32 Bytes `DATA` topics. Topics are order-dependent. Each topic can also be an array of DATA with \"or\" options."
- }
- },
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_newBlockFilter",
- "desc": "Creates a filter in the node, to notify when a new block arrives.\nTo check if the state has changed, call [eth_getFilterChanges](#eth_getfilterchanges).",
- "params": [],
- "returns": "`QUANTITY` - A filter id.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_newPendingTransactionFilter",
- "desc": "Creates a filter in the node, to notify when new pending transactions arrive.\nTo check if the state has changed, call [eth_getFilterChanges](#eth_getfilterchanges).",
- "params": [],
- "returns": "`QUANTITY` - A filter id.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_uninstallFilter",
- "desc": "Uninstalls a filter with given id. Should always be called when watch is no longer needed.\nAdditonally Filters timeout when they aren't requested with [eth_getFilterChanges](#eth_getfilterchanges) for a period of time.",
- "params": [
- "`QUANTITY` - The filter id."
- ],
- "returns": "`Boolean` - `true` if the filter was successfully uninstalled, otherwise `false`.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getFilterChanges",
- "desc": "Polling method for a filter, which returns an array of logs which occurred since last poll.",
- "params": [
- "`QUANTITY` - the filter id."
- ],
- "returns": "`Array` - Array of log objects, or an empty array if nothing has changed since last poll.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getFilterLogs",
- "desc": "Returns an array of all logs matching filter with given id.",
- "params": [
- "`QUANTITY` - The filter id."
- ],
- "returns": "See [eth_getFilterChanges](#eth_getfilterchanges)",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getLogs",
- "desc": "Returns an array of all logs matching a given filter object.",
- "params": [
- {
- "description": "`Object` - the filter object, see [eth_newFilter parameters](#eth_newfilter).",
- "details": {}
- }
- ],
- "returns": "See [eth_getFilterChanges](#eth_getfilterchanges)",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getWork",
- "desc": "Returns the hash of the current block, the seedHash, and the boundary condition to be met (\"target\").",
- "params": [],
- "returns": "`Array` - Array with the following properties:",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_submitWork",
- "desc": "Used for submitting a proof-of-work solution.",
- "params": [
- "`DATA`, 8 Bytes - The nonce found (64 bits)",
- "`DATA`, 32 Bytes - The header's pow-hash (256 bits)",
- "`DATA`, 32 Bytes - The mix digest (256 bits)"
- ],
- "returns": "`Boolean` - returns `true` if the provided solution is valid, otherwise `false`.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_submitHashrate",
- "desc": "Used for submitting mining hashrate.",
- "params": [
- "`Hashrate`, a hexadecimal string representation (32 bytes) of the hash rate ",
- "`ID`, String - A random hexadecimal(32 bytes) ID identifying the client"
- ],
- "returns": "`Boolean` - returns `true` if submitting went through succesfully and `false` otherwise.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "db_putString",
- "desc": "Stores a string in the local database.\n**Note** this function is deprecated and will be removed in the future.",
- "params": [
- "`String` - Database name.",
- "`String` - Key name.",
- "`String` - String to store."
- ],
- "returns": "`Boolean` - returns `true` if the value was stored, otherwise `false`.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "db_getString",
- "desc": "Returns string from the local database.\n**Note** this function is deprecated and will be removed in the future.",
- "params": [
- "`String` - Database name.",
- "`String` - Key name."
- ],
- "returns": "`String` - The previously stored string.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "db_putHex",
- "desc": "Stores binary data in the local database.\n**Note** this function is deprecated and will be removed in the future.",
- "params": [
- "`String` - Database name.",
- "`String` - Key name.",
- "`DATA` - The data to store."
- ],
- "returns": "`Boolean` - returns `true` if the value was stored, otherwise `false`.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "db_getHex",
- "desc": "Returns binary data from the local database.\n**Note** this function is deprecated and will be removed in the future.",
- "params": [
- "`String` - Database name.",
- "`String` - Key name."
- ],
- "returns": "`DATA` - The previously stored data.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "shh_version",
- "desc": "Returns the current whisper protocol version.",
- "params": [],
- "returns": "`String` - The current whisper protocol version",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "shh_post",
- "desc": "Sends a whisper message.",
- "params": [
- {
- "description": "`Object` - The whisper post object:",
- "details": {
- "from": "`DATA`, 60 Bytes - (optional) The identity of the sender.",
- "to": "`DATA`, 60 Bytes - (optional) The identity of the receiver. When present whisper will encrypt the message so that only the receiver can decrypt it.",
- "topics": "`Array of DATA` - Array of `DATA` topics, for the receiver to identify messages.",
- "payload": "`DATA` - The payload of the message.",
- "priority": "`QUANTITY` - The integer of the priority in a rang from ... (?).",
- "ttl": "`QUANTITY` - integer of the time to live in seconds."
- }
- }
- ],
- "returns": "`Boolean` - returns `true` if the message was send, otherwise `false`.",
- "inputFormatters": [
- "inputPostFormatter"
- ],
- "outputFormatter": null
- },
- {
- "name": "shh_newIdentity",
- "desc": "Creates new whisper identity in the client.",
- "params": [],
- "returns": "`DATA`, 60 Bytes - the address of the new identiy.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "shh_hasIdentity",
- "desc": "Checks if the client hold the private keys for a given identity.",
- "params": [
- "`DATA`, 60 Bytes - The identity address to check."
- ],
- "returns": "`Boolean` - returns `true` if the client holds the privatekey for that identity, otherwise `false`.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "shh_newGroup",
- "desc": "(?)",
- "params": [],
- "returns": "`DATA`, 60 Bytes - the address of the new group. (?)",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "shh_addToGroup",
- "desc": "(?)",
- "params": [
- "`DATA`, 60 Bytes - The identity address to add to a group (?)."
- ],
- "returns": "`Boolean` - returns `true` if the identity was successfully added to the group, otherwise `false` (?).",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "shh_newFilter",
- "desc": "Creates filter to notify, when client receives whisper message matching the filter options.",
- "params": [
- {
- "description": "`Object` - The filter options:",
- "details": {
- "to": "`DATA`, 60 Bytes - (optional) Identity of the receiver. *When present it will try to decrypt any incoming message if the client holds the private key to this identity.*",
- "topics": "`Array of DATA` - Array of `DATA` topics which the incoming message's topics should match. You can use the following combinations:"
- }
- }
- ],
- "returns": "`QUANTITY` - The newly created filter.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "shh_uninstallFilter",
- "desc": "Uninstalls a filter with given id. Should always be called when watch is no longer needed.\nAdditonally Filters timeout when they aren't requested with [shh_getFilterChanges](#shh_getfilterchanges) for a period of time.",
- "params": [
- "`QUANTITY` - The filter id."
- ],
- "returns": "`Boolean` - `true` if the filter was successfully uninstalled, otherwise `false`.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "shh_getFilterChanges",
- "desc": "Polling method for whisper filters. Returns new messages since the last call of this method.\n**Note** calling the [shh_getMessages](#shh_getmessages) method, will reset the buffer for this method, so that you won't receive duplicate messages.",
- "params": [
- "`QUANTITY` - The filter id."
- ],
- "returns": "`Array` - Array of messages received since last poll:",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "shh_getMessages",
- "desc": "Get all messages matching a filter. Unlike `shh_getFilterChanges` this returns all messages.",
- "params": [
- "`QUANTITY` - The filter id."
- ],
- "returns": "See [shh_getFilterChanges](#shh_getfilterchanges)",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_pendingTransactions",
- "desc": "?",
- "params": [],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_flush",
- "desc": "?",
- "params": [],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_newFilterEx",
- "desc": "?",
- "params": [
- ""
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getFilterChangesEx",
- "desc": "?",
- "params": [
- ""
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getFilterLogsEx",
- "desc": "?",
- "params": [
- ""
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_getLogsEx",
- "desc": "?",
- "params": [
- "?"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_register",
- "desc": "?",
- "params": [
- "?"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_unregister",
- "desc": "?",
- "params": [
- "?"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_fetchQueuedTransactions",
- "desc": "?",
- "params": [
- "?"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_signTransaction",
- "desc": "?",
- "params": [
- "?"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "personal_sendTransaction",
- "desc": "Sends and signs a transaction given account passphrase. Does not require the account to be unlocked nor unlocks the account for future transactions. ",
- "params": [
- {
- "description": "`Object` - The transaction object",
- "details": {
- "from": "`DATA`, 20 Bytes - The address the transaction is send from.",
- "to": "`DATA`, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.",
- "gas": "`QUANTITY` - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.",
- "gasPrice": "`QUANTITY` - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas",
- "value": "`QUANTITY` - (optional) Integer of the value send with this transaction",
- "data": "`DATA` - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see [Ethereum Contract ABI](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI)",
- "nonce": "`QUANTITY` - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce."
- }
- },
- "`PASS`, Passphrase to unlock `from` account."
- ],
- "returns": "`DATA`, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_inspectTransaction",
- "desc": "?",
- "params": [
- "?"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "eth_notePassword",
- "desc": "?",
- "params": [
- "?"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "personal_newAccount",
- "desc": "Creates new account",
- "params": [
- "`DATA` - Password"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [
- null
- ],
- "outputFormatter": null
- },
- {
- "name": "personal_unlockAccount",
- "desc": "?",
- "params": [
- "?",
- "?",
- "?"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [
- null,
- null,
- null
- ],
- "outputFormatter": null
- },
- {
- "name": "ethcore_minGasPrice",
- "desc": "Returns currently set minimal gas price",
- "params": [],
- "returns": "`QUANTITY` - Minimal Gas Price",
- "inputFormatters": [],
- "outputFormatter": "outputBigNumberFormatter"
- },
- {
- "name": "ethcore_extraData",
- "desc": "Returns currently set extra data",
- "params": [],
- "returns": "`DATA` - Extra data",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "ethcore_setExtraData",
- "desc": "Changes extra data for newly mined blocks",
- "params": [
- "`DATA`- Extra Data"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [
- "utils.toHex"
- ],
- "outputFormatter": null
- },
- {
- "name": "ethcore_setMode",
- "desc": "Changes current operating mode",
- "params": [
- "`DATA`- Mode name"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": null,
- "outputFormatter": null
- },
- {
- "name": "ethcore_setMinGasPrice",
- "desc": "Changes minimal gas price for transaction to be accepted to the queue.",
- "params": [
- "`QUANTITY` - Minimal gas price"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [
- "utils.toHex"
- ],
- "outputFormatter": null
- },
- {
- "name": "ethcore_gasFloorTarget",
- "desc": "Returns current target for gas floor",
- "params": [],
- "returns": "`QUANTITY` - Gas Floor Target",
- "inputFormatters": [],
- "outputFormatter": "outputBigNumberFormatter"
- },
- {
- "name": "ethcore_setGasFloorTarget",
- "desc": "Changes current gas floor target.",
- "params": [
- "`QUANTITY` - Gas Floor Target"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [
- "utils.toHex"
- ],
- "outputFormatter": null
- },
- {
- "name": "ethcore_setAuthor",
- "desc": "Changes author (coinbase) for mined blocks.",
- "params": [
- "`DATA`, 20 Bytes - Address"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [
- "inputAddressFormatter"
- ],
- "outputFormatter": null
- },
- {
- "name": "ethcore_setTransactionsLimit",
- "desc": "Changes limit for transactions in queue.",
- "params": [
- "`QUANTITY` - New Limit"
- ],
- "returns": "`Boolean` - whether the call was successful",
- "inputFormatters": [
- "utils.toHex"
- ],
- "outputFormatter": null
- },
- {
- "name": "ethcore_transactionsLimit",
- "desc": "Changes limit for transactions in queue.",
- "params": [],
- "returns": "`QUANTITY` - Current max number of transactions in queue.",
- "inputFormatters": [],
- "outputFormatter": "outputBigNumberFormatter"
- },
- {
- "name": "ethcore_netChain",
- "desc": "Returns the name of the connected chain.",
- "params": [],
- "returns": "`DATA` - chain name",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "ethcore_netPeers",
- "desc": "Returns number of peers.",
- "params": [],
- "returns": "`OBJECT` - JSON object containing active, connected and max peers",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "ethcore_netPort",
- "desc": "Returns network port the node is listening on.",
- "params": [],
- "returns": "`QUANTITY` - Port Number",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "ethcore_rpcSettings",
- "desc": "Returns basic settings of rpc (enabled, port, interface).",
- "params": [],
- "returns": "`OBJECT` - JSON object containing rpc settings",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "ethcore_nodeName",
- "desc": "Returns node name (identity)",
- "params": [],
- "returns": "`DATA` - Node name",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "ethcore_mode",
- "desc": "Returns current mode",
- "params": [],
- "returns": "`DATA` - Mode",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "trace_filter",
- "desc": "Returns traces matching given filter",
- "params": [
- "`OBJECT` - The filter object"
- ],
- "returns": "`ARRAY` - Traces matching given filter",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "trace_get",
- "desc": "Returns trace at given position.",
- "params": [
- "`HASH` - Transaction hash",
- "`INTEGER` - Trace position witing transaction"
- ],
- "returns": "`Object` - Trace",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "trace_transaction",
- "desc": "Returns all traces of given transaction",
- "params": [
- "`HASH` - Transaction hash"
- ],
- "returns": "`ARRAY` - Traces of given transaction",
- "inputFormatters": [],
- "outputFormatter": null
- },
- {
- "name": "trace_block",
- "desc": "Returns traces created at given block",
- "params": [
- "`BLOCKNUMBER` - Integer block number, or \"latest\" for the last mined block or \"pending\", \"earliest\" for not yet mined transactions"
- ],
- "returns": "`ARRAY` - Block traces",
- "inputFormatters": [],
- "outputFormatter": null
- }
- ]
-}
diff --git a/js/src/views/RpcCalls/middleware/index.js b/js/src/views/RpcCalls/middleware/index.js
deleted file mode 100644
index 9b7e91811..000000000
--- a/js/src/views/RpcCalls/middleware/index.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import LocalStorage from './localstorage';
-
-export default function () {
- const localstorage = new LocalStorage();
-
- return [
- localstorage.toMiddleware()
- ];
-}
diff --git a/js/src/views/RpcCalls/middleware/localstorage.js b/js/src/views/RpcCalls/middleware/localstorage.js
deleted file mode 100644
index 977c8cd88..000000000
--- a/js/src/views/RpcCalls/middleware/localstorage.js
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import localStore from 'store';
-import { syncRpcStateFromLocalStorage } from '../actions/localstorage';
-import rpcMetods from '../data/rpc.json';
-
-export default class localStorageMiddleware {
- toMiddleware () {
- return store => next => action => {
- let delegate;
-
- switch (action.type) {
- case 'add rpcResponse': delegate = ::this.onAddRpcResponse; break;
- case 'reset rpcPrevCalls': delegate = ::this.onResetRpcCalls; break;
- case 'init app': delegate = ::this.onInitApp; break;
- default:
- next(action);
- return;
- }
-
- if (!delegate) {
- return;
- }
-
- delegate(store, next, action);
- };
- }
-
- onInitApp (store, next, action) {
- const prevCalls = localStore.get('rpcPrevCalls');
-
- if (!(prevCalls && prevCalls.length)) {
- return next(action);
- }
-
- store.dispatch(syncRpcStateFromLocalStorage({
- prevCalls: prevCalls,
- callNo: prevCalls.length ? prevCalls[0].callNo + 1 : 1,
- selectedMethod: rpcMetods.methods.find(m => m.name === prevCalls[0].name)
- }));
- return next(action);
- }
-
- onAddRpcResponse (store, next, action) {
- action.payload.callNo = store.getState().rpc.callNo;
- this.unshift('rpcPrevCalls', action.payload);
- return next(action);
- }
-
- onResetRpcCalls (store, next, action) {
- localStore.set('rpcPrevCalls', []);
- return next(action);
- }
-
- // TODO [adgo] 20.04.2016 remove if/when PR is accepted: https://github.com/marcuswestin/store.js/pull/153
- unshift (key, value) {
- const newArr = [value].concat(localStore.get(key) || []);
-
- localStore.set(key, newArr);
- }
-}
diff --git a/js/src/views/RpcCalls/middleware/localstorage.spec.js b/js/src/views/RpcCalls/middleware/localstorage.spec.js
deleted file mode 100644
index 81f23cfa5..000000000
--- a/js/src/views/RpcCalls/middleware/localstorage.spec.js
+++ /dev/null
@@ -1,205 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import sinon from 'sinon';
-import localStore from 'store';
-
-import { syncRpcStateFromLocalStorage } from '../actions/localstorage';
-import rpcData from '../data/rpc.json';
-import LocalStorageMiddleware from './localstorage';
-
-describe('views/Status/middleware/localstorage', () => {
- let cut;
- let state;
-
- beforeEach('mock cut', () => {
- cut = new LocalStorageMiddleware();
- sinon.spy(cut, 'onAddRpcResponse');
- sinon.spy(cut, 'onResetRpcCalls');
- sinon.spy(cut, 'onInitApp');
- sinon.spy(cut, 'unshift');
- state = {
- rpc: {
- callNo: 1
- }
- };
- });
-
- it('should call onAddRpcResponse when respected action is dispatched', () => {
- // given
- const store = { getState: () => state };
- const next = sinon.spy();
- const middleware = cut.toMiddleware()(store)(next);
- const action = { type: 'add rpcResponse', payload: {} };
-
- expect(middleware).to.be.a('function');
- expect(action).to.be.an('object');
-
- // when
- middleware(action);
-
- // then
- expect(cut.onAddRpcResponse.calledWith(store, next, action)).to.be.true;
- });
-
- it('should call onResetRpcCalls when respected action is dispactched', () => {
- // given
- const store = {};
- const next = sinon.spy();
- const middleware = cut.toMiddleware()(store)(next);
- const action = { type: 'reset rpcPrevCalls', payload: {} };
-
- expect(middleware).to.be.a('function');
- expect(action).to.be.an('object');
-
- // when
- middleware(action);
-
- // then
- expect(cut.onResetRpcCalls.calledWith(store, next, action)).to.be.true;
- });
-
- it('should call onInitApp when respected action is dispatched', () => {
- // given
- const store = { dispatch: sinon.spy() };
- const next = sinon.spy();
- const middleware = cut.toMiddleware()(store)(next);
- const action = { type: 'init app' };
-
- cut.onInitApp = sinon.spy();
- expect(middleware).to.be.a('function');
- expect(action).to.be.an('object');
-
- // when
- middleware(action);
-
- // then
- expect(cut.onInitApp.calledWith(store, next, action)).to.be.true;
- });
-
- it('should not call onAddRpcResponse or onInitApp when a non-respected action is dispatched', () => {
- // given
- const store = {};
- const next = sinon.spy();
- const middleware = cut.toMiddleware()(store)(next);
- const action = { type: 'testAction' };
-
- expect(middleware).to.be.a('function');
- expect(action).to.be.an('object');
-
- // when
- middleware(action);
-
- // then
- expect(cut.onAddRpcResponse.called).to.be.false;
- expect(cut.onInitApp.called).to.be.false;
- expect(next.calledWith(action)).to.be.true;
- });
-
- describe('RPC', () => {
- it('should dispatch syncRpcStateFromLocalStorage when there are rpc calls in localStorage', () => {
- // given
- const store = { dispatch: sinon.spy() };
- const next = sinon.spy();
- const action = {};
- const key = 'rpcPrevCalls';
- const prevCalls = [rpcData.methods[0]];
-
- prevCalls[0].callNo = 1;
- localStore.remove(key);
- localStore.set(key, prevCalls);
-
- // when
- cut.onInitApp(store, next, action);
-
- // then
- expect(store.dispatch.calledWith(syncRpcStateFromLocalStorage({
- prevCalls: prevCalls,
- callNo: 2,
- selectedMethod: prevCalls[0]
- }))).to.be.true;
- expect(next.calledWith(action)).to.be.true;
- });
-
- it('should not dispatch syncRpcStateFromLocalStorage when there are no rpc calls in localStorage', () => {
- // given
- const store = { dispatch: sinon.spy() };
- const next = sinon.spy();
- const action = {};
-
- localStore.remove('rpcPrevCalls');
-
- // when
- cut.onInitApp(store, next, action);
-
- // then
- expect(store.dispatch.notCalled).to.be.true;
- expect(next.calledWith(action)).to.be.true;
- });
- });
-
- it('should call unshift and next', () => {
- // given
- const store = { getState: () => state };
- const next = sinon.spy();
- const action = { payload: {} };
-
- // when
- cut.onAddRpcResponse(store, next, action);
-
- // then
- expect(cut.unshift.calledWith('rpcPrevCalls', action.payload)).to.be.true;
- expect(action.payload.callNo).to.equal(1);
- expect(next.calledWith(action)).to.be.true;
- });
-
- describe('UNSHIFT', () => {
- // TODO [adgo] 20.04.2016 remove if/when PR is accepted: https://github.com/marcuswestin/store.js/pull/153
- it('should create array in local storage by key and unshift item to it', () => {
- // given
- const key = 'foo';
- const val = 'bar';
-
- localStore.remove(key);
-
- // when
- cut.unshift(key, val);
-
- // then
- expect(localStore.get(key)[0]).to.equal(val);
- expect(localStore.get(key).length).to.equal(1);
- });
-
- // TODO [adgo] 20.04.2016 remove if/when PR is accepted: https://github.com/marcuswestin/store.js/pull/153
- it('should unshift item to an existing array in local storage by key', () => {
- // given
- const key = 'foo';
- const val = 'bar';
- const newVal = 'bazz';
-
- localStore.remove(key);
- localStore.set(key, [val]);
- expect(localStore.get(key)).to.be.defined;
-
- // when
- cut.unshift(key, newVal);
-
- // then
- expect(localStore.get(key)[0]).to.equal(newVal);
- expect(localStore.get(key).length).to.equal(2);
- });
- });
-});
diff --git a/js/src/views/RpcCalls/reducers/index.js b/js/src/views/RpcCalls/reducers/index.js
deleted file mode 100644
index 4f57dd311..000000000
--- a/js/src/views/RpcCalls/reducers/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import rpc from './rpc';
-import logger from './logger';
-
-export {
- rpc,
- logger
-};
diff --git a/js/src/views/RpcCalls/reducers/logger.js b/js/src/views/RpcCalls/reducers/logger.js
deleted file mode 100644
index 29fa6a052..000000000
--- a/js/src/views/RpcCalls/reducers/logger.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import { handleActions } from 'redux-actions';
-
-const isProd = process.env.NODE_ENV === 'production';
-
-const initialState = {
- logging: false && !isProd
-};
-
-export default handleActions({
- 'update logging' (state, action) {
- return {
- logging: action.payload
- };
- }
-
-}, initialState);
diff --git a/js/src/views/RpcCalls/reducers/rpc.js b/js/src/views/RpcCalls/reducers/rpc.js
deleted file mode 100644
index 68c23b875..000000000
--- a/js/src/views/RpcCalls/reducers/rpc.js
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import { handleActions } from 'redux-actions';
-import rpcMetods from '../data/rpc.json';
-
-const initialState = {
- prevCalls: [],
- callNo: 1,
- selectedMethod: rpcMetods.methods[0]
-};
-
-export const actionHandlers = {
-
- 'add rpcResponse' (state, action) {
- const calls = [action.payload].concat(state.prevCalls);
- const maxCalls = 64;
-
- return {
- ...state,
- callNo: state.callNo + 1,
- prevCalls: calls.slice(0, maxCalls)
- };
- },
-
- 'sync rpcStateFromLocalStorage' (state, action) {
- return {
- ...state,
- prevCalls: action.payload.prevCalls,
- callNo: action.payload.callNo,
- selectedMethod: action.payload.selectedMethod
- };
- },
-
- 'reset rpcPrevCalls' (state, action) {
- return {
- ...state,
- callNo: 1,
- prevCalls: []
- };
- },
-
- 'select rpcMethod' (state, action) {
- return {
- ...state,
- selectedMethod: action.payload
- };
- }
-
-};
-
-export default handleActions(actionHandlers, initialState);
diff --git a/js/src/views/RpcCalls/util/error.js b/js/src/views/RpcCalls/util/error.js
deleted file mode 100644
index 2de839760..000000000
--- a/js/src/views/RpcCalls/util/error.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export function filterErrors (xs) {
- return xs.filter(isError);
-}
-
-export function hasErrors (xs) {
- if (!xs) {
- return;
- }
- return !!xs.find(isError);
-}
-
-export function isError (x) {
- return x instanceof Error;
-}
diff --git a/js/src/views/RpcCalls/util/error.spec.js b/js/src/views/RpcCalls/util/error.spec.js
deleted file mode 100644
index 2f4de7bac..000000000
--- a/js/src/views/RpcCalls/util/error.spec.js
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import sinon from 'sinon';
-import * as ErrorUtil from './error';
-
-describe('views/Status/util/error', () => {
- beforeEach('spy on isError', () => {
- sinon.spy(ErrorUtil, 'isError');
- });
-
- afterEach('spy on isError', () => {
- ErrorUtil.isError.restore();
- });
-
- describe('filterErrors', () => {
- const ERROR1 = new Error('abc');
- const ERROR2 = new Error('def');
- const INPUT = [ERROR1, 'ghi', ERROR2, 'jkl'];
- const ERRORS = [ERROR1, ERROR2];
-
- it('should return errors in the array', () => {
- expect(ErrorUtil.filterErrors(INPUT)).to.deep.equal(ERRORS);
- });
- });
-
- describe('hasErrors', () => {
- it('should return undefined and not invoke isError when null is passed', () => {
- // given
- const xs = null;
-
- // when
- const res = ErrorUtil.hasErrors(xs);
-
- // then
- expect(ErrorUtil.isError.called).to.be.false;
- expect(res).to.be.undefined;
- });
-
- it('should return true and invoke isError when at least one error object is passed', () => {
- // given
- const arg1 = 'test string';
- const arg2 = new Error();
- const xs = [arg1, arg2];
-
- // when
- const res = ErrorUtil.hasErrors(xs);
-
- // then
- // todo [adgo] - 30.04.2016 - fix and uncomment
- // expect(ErrorUtil.isError.calledWith(arg1)).to.be.true;
- // expect(ErrorUtil.isError.calledWith(arg2)).to.be.true;
- expect(res).to.be.true;
- });
-
- it('should return false and invoke isError when non error objects are passed', () => {
- // given
- const arg1 = 'test string';
- const arg2 = 123;
- const xs = [arg1, arg2];
-
- // when
- const res = ErrorUtil.hasErrors(xs);
-
- // then
- // todo [adgo] - 30.04.2016 - fix and uncomment
- // expect(ErrorUtil.isError.calledWith(arg1)).to.be.true;
- // expect(ErrorUtil.isError.calledWith(arg2)).to.be.true;
- expect(res).to.be.false;
- });
- });
-
- describe('isError', () => {
- it('should return false when non error object is passed', () => {
- // given
- const arg = '';
-
- // when
- const res = ErrorUtil.isError(arg);
-
- // then
- expect(res).to.be.false;
- });
-
- it('should return true when error object is passed', () => {
- // given
- const arg = new Error();
-
- // when
- const res = ErrorUtil.isError(arg);
-
- // then
- expect(res).to.be.true;
- });
- });
-});
diff --git a/js/src/views/RpcCalls/util/index.js b/js/src/views/RpcCalls/util/index.js
deleted file mode 100644
index 064952dbb..000000000
--- a/js/src/views/RpcCalls/util/index.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export function toPromise (fn) {
- return new Promise((resolve, reject) => {
- fn((err, res) => {
- if (err) {
- reject(err);
- } else {
- resolve(res);
- }
- });
- });
-}
-
-export function stringifyIfObject (any) {
- if (typeof any === 'object') {
- any = JSON.stringify(any);
- }
- return any;
-}
-
-export function identity (x) {
- return x;
-}
diff --git a/js/src/views/RpcCalls/util/index.spec.js b/js/src/views/RpcCalls/util/index.spec.js
deleted file mode 100644
index 17f441a8e..000000000
--- a/js/src/views/RpcCalls/util/index.spec.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import { toPromise, identity } from './';
-
-describe('views/Status/util', () => {
- describe('toPromise', () => {
- it('rejects on error result', () => {
- const ERROR = new Error();
- const FN = function (callback) {
- callback(ERROR);
- };
-
- return toPromise(FN).catch(err => {
- expect(err).to.equal(ERROR);
- });
- });
-
- it('resolves on success result', () => {
- const SUCCESS = 'ok, we are good';
- const FN = function (callback) {
- callback(null, SUCCESS);
- };
-
- return toPromise(FN).then(success => {
- expect(success).to.equal(SUCCESS);
- });
- });
- });
-
- describe('identity', () => {
- it('returns the value passed in', () => {
- const TEST = { abc: 'def' };
-
- expect(identity(TEST)).to.deep.equal(TEST);
- });
- });
-});
diff --git a/js/src/views/RpcCalls/util/react.js b/js/src/views/RpcCalls/util/react.js
deleted file mode 100644
index 4ae260db2..000000000
--- a/js/src/views/RpcCalls/util/react.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import { isValidElement } from 'react';
-
-export function isReactComponent (componentOrElem) {
- return isValidElement(componentOrElem) && typeof componentOrElem.type === 'function';
-}
diff --git a/js/src/views/RpcCalls/util/rpc-md.js b/js/src/views/RpcCalls/util/rpc-md.js
deleted file mode 100644
index 99dbca695..000000000
--- a/js/src/views/RpcCalls/util/rpc-md.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2015-2017 Parity Technologies (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import { isPlainObject } from 'lodash';
-
-export function formatRpcMd (val) {
- if (!isPlainObject(val)) {
- return val;
- }
-
- return val.description + Object.keys(val.details)
- .map(key => `- \`${key}\`: ${val.details[key]}`)
- .join('\n');
-}