@@ -7,8 +7,9 @@ import { Button } from '../components/Base';
77import { ROUTE_NAMES } from '../lib/routeNames';
88import { useHistory } from '../store/history';
99import { BRIDGE_ERROR, renderTxnError } from '../lib/error';
10−import { NETWORK_NAMES } from '../lib/network';
11−import { withTxnConfirmations } from '../store/txnConfirmations';
10+import { NETWORK_TYPES } from '../lib/network';
11+import { useTxnConfirmations } from '../store/txnConfirmations';
12+import { useNetwork } from '../store/network';
1213
1314class Success extends React.Component {
1415 constructor(props) {
@@ -39,11 +40,11 @@ class Success extends React.Component {
3940 const { pending } = state;
4041
4142 const esvisible =
42− networkType === NETWORK_NAMES.ROPSTEN ||
43− networkType === NETWORK_NAMES.MAINNET;
43+ networkType === NETWORK_TYPES.ROPSTEN ||
44+ networkType === NETWORK_TYPES.MAINNET;
4445
4546 const esdomain =
46− networkType === NETWORK_NAMES.ROPSTEN
47+ networkType === NETWORK_TYPES.ROPSTEN
4748 ? 'ropsten.etherscan.io'
4849 : 'etherscan.io';
4950
@@ -109,14 +110,18 @@ const Failure = props => (
109110 </Row>
110111);
111112
112−const SentTransaction = props => {
113+function SentTransaction(props) {
113114 const history = useHistory();
114− const { txnHashCursor, networkType, txnConfirmations } = props;
115+ const { txnConfirmations } = useTxnConfirmations();
116+ const { web3 } = useNetwork();
117+
118+ const { txnHashCursor, networkType } = props;
115119 const { setPointCursor, pointCursor } = props;
116120
117121 const promptKeyfile = history.data && history.data.promptKeyfile;
118122
119− const w3 = need.web3(props);
123+ // TODO: remove need's assumption about accepting the props object
124+ const w3 = need.web3({ web3 });
120125
121126 const result = txnHashCursor.matchWith({
122127 Nothing: _ => {
@@ -174,6 +179,6 @@ const SentTransaction = props => {
174179 {keyfile}
175180 </div>
176181 );
177−};
182+}
178183
179−export default withTxnConfirmations(SentTransaction);
184+export default SentTransaction;