From 5ff18f62aa43fc91310f2ea3a1ff3901c601b075 Mon Sep 17 00:00:00 2001 From: apanizo Date: Fri, 28 Sep 2018 14:24:55 +0200 Subject: [PATCH] Creating a container for opening route --- src/logic/wallets/getWeb3.js | 4 +++- src/routes/index.js | 2 +- src/routes/open/container/Open.jsx | 2 +- src/routes/opening/container/index.jsx | 6 ++++++ 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 src/routes/opening/container/index.jsx diff --git a/src/logic/wallets/getWeb3.js b/src/logic/wallets/getWeb3.js index 2dd0a794..7eb9f405 100644 --- a/src/logic/wallets/getWeb3.js +++ b/src/logic/wallets/getWeb3.js @@ -33,7 +33,9 @@ export const ETHEREUM_NETWORK_IDS = { 42: ETHEREUM_NETWORK.KOVAN, } -export const openInEtherScan = (address: string, network: string) => () => { +export const openTxInEtherScan = (tx: string, network: string) => `https://${network}.etherscan.io/tx/${tx}` + +export const openAddressInEtherScan = (address: string, network: string) => () => { window.open(`https://${network}.etherscan.io/address/${address}`) } diff --git a/src/routes/index.js b/src/routes/index.js index 677e39db..e02b1dbf 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -27,7 +27,7 @@ const Open = Loadable({ }) const Opening = Loadable({ - loader: () => import('./opening'), + loader: () => import('./opening/container'), loading: Loader, }) diff --git a/src/routes/open/container/Open.jsx b/src/routes/open/container/Open.jsx index b5ac2604..5eb20109 100644 --- a/src/routes/open/container/Open.jsx +++ b/src/routes/open/container/Open.jsx @@ -1,7 +1,6 @@ // @flow import * as React from 'react' import { connect } from 'react-redux' - import Page from '~/components/layout/Page' import { getAccountsFrom, getThresholdFrom, getNamesFrom, getSafeNameFrom, getDailyLimitFrom } from '~/routes/open/utils/safeDataExtractor' import { getWeb3 } from '~/logic/wallets/getWeb3' @@ -46,6 +45,7 @@ export const createSafe = async (values: Object, userAccount: string, addSafe: A pathname: `${SAFELIST_ADDRESS}/${safeContract.address}`, state: { name, + tx: safe.tx, }, } diff --git a/src/routes/opening/container/index.jsx b/src/routes/opening/container/index.jsx new file mode 100644 index 00000000..4bcdaf0e --- /dev/null +++ b/src/routes/opening/container/index.jsx @@ -0,0 +1,6 @@ +// @flow +import { connect } from 'react-redux' +import selector from './selector' +import Layout from '../component' + +export default connect(selector)(Layout)