diff --git a/embark-ui/src/components/Account.js b/embark-ui/src/components/Account.js
index 4180d0ee2..3cfed1109 100644
--- a/embark-ui/src/components/Account.js
+++ b/embark-ui/src/components/Account.js
@@ -13,7 +13,7 @@ const Account = ({account}) => (
Account {account.address}
-
+
diff --git a/embark-ui/src/components/Blocks.js b/embark-ui/src/components/Blocks.js
index 093be9a81..355906c74 100644
--- a/embark-ui/src/components/Blocks.js
+++ b/embark-ui/src/components/Blocks.js
@@ -10,7 +10,7 @@ const Blocks = ({blocks}) => (
Blocks
{blocks.map(block => (
-
+
Block {block.number}
diff --git a/embark-ui/src/components/Layout.js b/embark-ui/src/components/Layout.js
index b47033be2..fd16b21df 100644
--- a/embark-ui/src/components/Layout.js
+++ b/embark-ui/src/components/Layout.js
@@ -10,7 +10,6 @@ import {LIGHT_THEME, DARK_THEME} from '../constants';
import FontAwesome from 'react-fontawesome';
import {
- AppAside,
AppFooter,
AppHeader,
AppSidebar,
@@ -79,6 +78,10 @@ class Layout extends React.Component {
return true;
}
+ if (nextProps.searchResult.className) {
+ this.props.history.push(`/embark/contracts/${nextProps.searchResult.className}/overview`);
+ return false;
+ }
if (nextProps.searchResult.address) {
this.props.history.push(`/embark/explorer/accounts/${nextProps.searchResult.address}`);
return false;
diff --git a/embark-ui/src/components/Transaction.js b/embark-ui/src/components/Transaction.js
index a65052595..b7859586a 100644
--- a/embark-ui/src/components/Transaction.js
+++ b/embark-ui/src/components/Transaction.js
@@ -14,7 +14,7 @@ const Transaction = ({transaction}) => (
Transaction {transaction.hash}
-
+
{transaction.blockNumber}} />
diff --git a/embark-ui/src/components/Transactions.js b/embark-ui/src/components/Transactions.js
index ce2ad3e55..030a23f02 100644
--- a/embark-ui/src/components/Transactions.js
+++ b/embark-ui/src/components/Transactions.js
@@ -10,7 +10,7 @@ const Transactions = ({transactions}) => (
Transactions
{transactions.map(transaction => (
-
+
Transaction {transaction.hash}
diff --git a/embark-ui/src/components/search.css b/embark-ui/src/components/search.css
index 13fc764d2..c216a9157 100644
--- a/embark-ui/src/components/search.css
+++ b/embark-ui/src/components/search.css
@@ -3,7 +3,7 @@
border-bottom-right-radius: 0;
outline: none;
box-shadow: none;
- width: 330px;
+ width: 245px;
border: 1px solid #c8ced3;
border-right: 0;
}
diff --git a/embark-ui/src/containers/GasStationContainer.js b/embark-ui/src/containers/GasStationContainer.js
index 4fded5d88..e195f0105 100644
--- a/embark-ui/src/containers/GasStationContainer.js
+++ b/embark-ui/src/containers/GasStationContainer.js
@@ -19,7 +19,7 @@ class GasStationContainer extends Component {
}
render() {
- return (
)}/>;
diff --git a/embark-ui/src/sagas/searchSaga.js b/embark-ui/src/sagas/searchSaga.js
index 5ba0e89f6..e3c1c0dfb 100644
--- a/embark-ui/src/sagas/searchSaga.js
+++ b/embark-ui/src/sagas/searchSaga.js
@@ -1,6 +1,6 @@
import {put, select} from "redux-saga/effects";
-import {getAccounts, getBlocks, getTransactions} from "../reducers/selectors";
-import {fetchAccounts, fetchBlocks, fetchTransactions} from "./index";
+import {getAccounts, getBlocks, getTransactions, getContracts} from "../reducers/selectors";
+import {fetchAccounts, fetchBlocks, fetchTransactions, fetchContracts} from "./index";
export function *searchExplorer(entity, payload) {
let result;
@@ -17,6 +17,17 @@ export function *searchExplorer(entity, payload) {
return yield put(entity.success(result));
}
+ // Contracts
+ yield fetchContracts({});
+ const contracts = yield select(getContracts);
+ result = contracts.find(contract => {
+ return contract.address === payload.searchValue;
+ });
+
+ if (result) {
+ return yield put(entity.success(result));
+ }
+
// Blocks
yield fetchBlocks({limit: SEARCH_LIMIT});
const blocks = yield select(getBlocks);