mirror of https://github.com/embarklabs/embark.git
chore: remove fiddle dead code
This commit is contained in:
parent
c25c644b5a
commit
0e7aad81aa
|
@ -5,7 +5,7 @@ import {contracts as contractsAction} from "../actions";
|
|||
|
||||
import Contracts from '../components/Contracts';
|
||||
import DataWrapper from "../components/DataWrapper";
|
||||
import {getContracts, getFiddleContracts} from "../reducers/selectors";
|
||||
import {getContracts} from "../reducers/selectors";
|
||||
|
||||
class ContractsContainer extends Component {
|
||||
componentDidMount() {
|
||||
|
@ -18,11 +18,6 @@ class ContractsContainer extends Component {
|
|||
<DataWrapper shouldRender={this.props.contracts.length > 0} {...this.props} render={({contracts}) => (
|
||||
<Contracts contracts={contracts} />
|
||||
)} />
|
||||
<DataWrapper shouldRender={this.props.fiddleContracts.length > 0} {...this.props} render={({fiddleContracts}) => (
|
||||
<React.Fragment>
|
||||
<Contracts contracts={fiddleContracts} title="Fiddle contracts" />
|
||||
</React.Fragment>
|
||||
)} />
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
@ -31,7 +26,6 @@ class ContractsContainer extends Component {
|
|||
function mapStateToProps(state) {
|
||||
return {
|
||||
contracts: getContracts(state),
|
||||
fiddleContracts: getFiddleContracts(state),
|
||||
error: state.errorMessage,
|
||||
loading: state.loading};
|
||||
}
|
||||
|
|
|
@ -73,11 +73,7 @@ export function getContractEventsByContract(state, contractName) {
|
|||
}
|
||||
|
||||
export function getContracts(state) {
|
||||
return state.entities.contracts.filter(contract => !contract.isFiddle);
|
||||
}
|
||||
|
||||
export function getFiddleContracts(state) {
|
||||
return state.entities.contracts.filter(contract => contract.isFiddle);
|
||||
return state.entities.contracts
|
||||
}
|
||||
|
||||
export function getContract(state, contractName) {
|
||||
|
|
|
@ -75,7 +75,6 @@ class ContractsManager {
|
|||
deploy: contract.deploy,
|
||||
error: contract.error,
|
||||
address: contract.deployedAddress,
|
||||
isFiddle: Boolean(contract.isFiddle),
|
||||
args: contract.args,
|
||||
transactionHash: contract.transactionHash,
|
||||
gas: contract.gas,
|
||||
|
@ -201,7 +200,6 @@ class ContractsManager {
|
|||
const contract = self.contracts[contractName];
|
||||
contract.args = []; /* TODO: override contract.args */
|
||||
contract.className = contractName;
|
||||
contract.isFiddle = true;
|
||||
self.events.request("deploy:contract", contract, (err) => {
|
||||
next(err);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue