refactor etherscan.io links (#2896)

* use proper querystring builder

* etherscan.txLink helper

* refactor to etherscan.txLink

* etherscan.addressLink helper

* refactor to etherscan.addressLink

* move txLink & addressLink into common file
This commit is contained in:
Jannis Redmann
2016-10-30 09:37:15 +01:00
committed by Jaco Greeff
parent 222b2b70ea
commit 86c0dbeedc
12 changed files with 44 additions and 90 deletions

View File

@@ -19,6 +19,7 @@ import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { LinearProgress } from 'material-ui';
import { txLink } from '../../3rdparty/etherscan/links';
import styles from './txHash.css';
@@ -55,7 +56,6 @@ class TxHash extends Component {
render () {
const { hash, isTest } = this.props;
const link = `https://${isTest ? 'testnet.' : ''}etherscan.io/tx/${hash}`;
return (
<div className={ styles.details }>
@@ -63,7 +63,7 @@ class TxHash extends Component {
The transaction has been posted to the network with a transaction hash of
</div>
<div className={ styles.hash }>
<a href={ link } target='_blank'>{ hash }</a>
<a href={ txLink(hash, isTest) } target='_blank'>{ hash }</a>
</div>
{ this.renderConfirmations() }
</div>