diff --git a/packages/embark-ui/src/components/Contracts.js b/packages/embark-ui/src/components/Contracts.js
index a1ebf82c2..514a7eeb0 100644
--- a/packages/embark-ui/src/components/Contracts.js
+++ b/packages/embark-ui/src/components/Contracts.js
@@ -15,32 +15,34 @@ const Contracts = ({contracts, title = "Contracts"}) => (
{
- contracts.map((contract, key) => {
- const contractDisplay = formatContractForDisplay(contract);
- if (!contractDisplay) {
- return '';
- }
+ contracts
+ .filter(contract => !contract.silent)
+ .map((contract, key) => {
+ const contractDisplay = formatContractForDisplay(contract);
+ if (!contractDisplay) {
+ return '';
+ }
- return (
-
-
- {contract.className}
-
-
-
- Address
- {contract.address}
-
-
- State
-
- {contractDisplay.state}
-
-
-
-
- )
- })
+ return (
+
+
+ {contract.className}
+
+
+
+ Address
+ {contract.address}
+
+
+ State
+
+ {contractDisplay.state}
+
+
+
+
+ )
+ })
}
diff --git a/packages/embark-ui/src/components/ContractsList.js b/packages/embark-ui/src/components/ContractsList.js
index d01dbfc3e..f8058ed5f 100644
--- a/packages/embark-ui/src/components/ContractsList.js
+++ b/packages/embark-ui/src/components/ContractsList.js
@@ -15,19 +15,21 @@ const ContractsList = ({contracts}) => (
{
- contracts.map((contract) => {
- const contractDisplay = formatContractForDisplay(contract);
- if (!contractDisplay) {
- return null;
- }
- return (
-
- {contract.className} |
- {contractDisplay.address} |
- {contractDisplay.state} |
-
- );
- })
+ contracts
+ .filter(contract => !contract.silent)
+ .map((contract) => {
+ const contractDisplay = formatContractForDisplay(contract);
+ if (!contractDisplay) {
+ return null;
+ }
+ return (
+
+ {contract.className} |
+ {contractDisplay.address} |
+ {contractDisplay.state} |
+
+ );
+ })
}
diff --git a/packages/embark-ui/src/containers/ContractsContainer.js b/packages/embark-ui/src/containers/ContractsContainer.js
index 5ace0919d..97a7c51aa 100644
--- a/packages/embark-ui/src/containers/ContractsContainer.js
+++ b/packages/embark-ui/src/containers/ContractsContainer.js
@@ -29,7 +29,7 @@ class ContractsContainer extends Component {
{this.props.updatePageHeader && }
0} {...this.props} render={({contracts}) => {
if (this.props.mode === "list") return ;
- if (this.props.mode === "detail") return ;
+ if (this.props.mode === "detail") return ;
}} />
);
@@ -38,8 +38,8 @@ class ContractsContainer extends Component {
function mapStateToProps(state) {
return {
- contracts: getContracts(state),
- error: state.errorMessage,
+ contracts: getContracts(state),
+ error: state.errorMessage,
loading: state.loading};
}
diff --git a/packages/embark-ui/src/utils/presentation.js b/packages/embark-ui/src/utils/presentation.js
index 7e37884a4..43ff127e4 100644
--- a/packages/embark-ui/src/utils/presentation.js
+++ b/packages/embark-ui/src/utils/presentation.js
@@ -1,7 +1,4 @@
export function formatContractForDisplay(contract) {
- if (contract.silent) {
- return;
- }
let address = (contract.address || contract.deployedAddress);
let state = 'Deployed';
let stateColor = 'success';