diff --git a/embark-ui/src/components/Contracts.js b/embark-ui/src/components/Contracts.js
index fa8be2672..cbae96e3e 100644
--- a/embark-ui/src/components/Contracts.js
+++ b/embark-ui/src/components/Contracts.js
@@ -24,7 +24,7 @@ const Contracts = ({contracts}) => (
bodyItems={
contracts.map((contract) => {
return ([
- {content: {contract.name}},
+ {content: {contract.className}},
{content: contract.address},
{content: contract.deploy.toString()}
]);
diff --git a/embark-ui/src/containers/ContractsContainer.js b/embark-ui/src/containers/ContractsContainer.js
index 1fcac3605..3ed0350f8 100644
--- a/embark-ui/src/containers/ContractsContainer.js
+++ b/embark-ui/src/containers/ContractsContainer.js
@@ -26,7 +26,7 @@ function mapStateToProps(state) {
}
ContractsContainer.propTypes = {
- contracts: PropTypes.object,
+ contracts: PropTypes.array,
fetchContracts: PropTypes.func
};
diff --git a/embark-ui/src/reducers/index.js b/embark-ui/src/reducers/index.js
index e613daaa1..d62f0c6d5 100644
--- a/embark-ui/src/reducers/index.js
+++ b/embark-ui/src/reducers/index.js
@@ -37,7 +37,7 @@ const filtrer = {
return index === self.findIndex((t) => t.name === process.name);
},
contracts: function(contract, index, self) {
- return index === self.findIndex((t) => t.name === contract.name);
+ return index === self.findIndex((t) => t.className === contract.className);
},
accounts: function(account, index, self) {
return index === self.findIndex((t) => t.address === account.address);
diff --git a/embark-ui/src/reducers/selectors.js b/embark-ui/src/reducers/selectors.js
index bac61e4b0..fb98d86a9 100644
--- a/embark-ui/src/reducers/selectors.js
+++ b/embark-ui/src/reducers/selectors.js
@@ -51,7 +51,7 @@ export function getContracts(state) {
}
export function getContract(state, contractName) {
- return state.entities.contracts.find((contract => contract.name === contractName));
+ return state.entities.contracts.find((contract => contract.className === contractName));
}
export function getContractProfile(state, contractName) {
diff --git a/lib/modules/contracts_manager/index.js b/lib/modules/contracts_manager/index.js
index aa168f755..b944ef076 100644
--- a/lib/modules/contracts_manager/index.js
+++ b/lib/modules/contracts_manager/index.js
@@ -63,10 +63,6 @@ class ContractsManager {
self.events.emit('contractsState', self.contractsState());
});
- self.events.setCommandHandler("contracts:contract", (contractName, cb) => {
- cb(self.getContract(contractName));
- });
-
self.events.setCommandHandler("contracts:all", (contractName, cb) => {
let contracts = self.listContracts();
let results = [];
@@ -76,7 +72,7 @@ class ContractsManager {
results.push({
index: i,
- name: contract.className,
+ className: contract.className,
deploy: contract.deploy,
error: contract.error,
address: contract.deployedAddress