diff --git a/src/bootstrap/app.js b/src/bootstrap/app.js index 290e804..aeef7dd 100755 --- a/src/bootstrap/app.js +++ b/src/bootstrap/app.js @@ -13,7 +13,7 @@ import PageNotFound from '../containers/page-not-found' import Initializer from './initializer' import GlobalComponents from './global-components' -import { ETHAddressRegExp, ETHAddressRegExpCaptureGroup } from './dapp-api' +import { ETHAddressRegExpCaptureGroup, ETHAddressRegExp } from './dapp-api' import './app.css' @@ -21,6 +21,7 @@ const toWithAddress = base => location => `${base}/${location.pathname.match(ETHAddressRegExp)[0]}` const hasNonRootAddress = location => location.pathname.slice(0, 3) !== '/0x' && + location.pathname.slice(0, 4) !== '/404' && ETHAddressRegExp.test(location.pathname) const ConnectedNavBar = connect(state => ({ accounts: state.wallet.accounts, @@ -31,6 +32,11 @@ const ConnectedNavBar = connect(state => ({ accounts={accounts} balance={balance} routes={[ + { + name: 'Home', + to: '/', + visible: location => location.pathname.slice(0, 4) === '/404' + }, { name: 'Simple', to: toWithAddress('/simple'), diff --git a/src/bootstrap/dapp-api.js b/src/bootstrap/dapp-api.js index ca60a69..b3fd0dc 100755 --- a/src/bootstrap/dapp-api.js +++ b/src/bootstrap/dapp-api.js @@ -14,14 +14,14 @@ else eth = new Eth(new Eth.HttpProvider(ETHEREUM_PROVIDER)) const IICOContractFactory = eth.contract && eth.contract(IICO.abi) // TODO: Put this on NPM or load dynamically? -const ETHAddressRegExp = /0x[a-fA-F0-9]{40}/ const ETHAddressRegExpCaptureGroup = '(0x[a-fA-F0-9]{40})' +const ETHAddressRegExp = /0x[a-fA-F0-9]{40}/ const strictETHAddressRegExp = /^0x[a-fA-F0-9]{40}$/ export { eth, IICOContractFactory, - ETHAddressRegExp, ETHAddressRegExpCaptureGroup, + ETHAddressRegExp, strictETHAddressRegExp } diff --git a/src/containers/iico/components/bids/index.js b/src/containers/iico/components/bids/index.js index 5ae782b..e926619 100644 --- a/src/containers/iico/components/bids/index.js +++ b/src/containers/iico/components/bids/index.js @@ -192,6 +192,8 @@ class Bids extends PureComponent {