|
|
@ -14,10 +14,6 @@ let SHAPESHIFT_ROW_TITLE |
|
|
|
let SHAPESHIFT_ROW_TEXT |
|
|
|
let SHAPESHIFT_ROW_TEXT |
|
|
|
let FAUCET_ROW_TITLE |
|
|
|
let FAUCET_ROW_TITLE |
|
|
|
|
|
|
|
|
|
|
|
const facuetRowText = (networkName) => { |
|
|
|
|
|
|
|
return this.props.t('getEtherFromFaucet', [networkName]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function mapStateToProps (state) { |
|
|
|
function mapStateToProps (state) { |
|
|
|
return { |
|
|
|
return { |
|
|
|
network: state.metamask.network, |
|
|
|
network: state.metamask.network, |
|
|
@ -44,17 +40,17 @@ function mapDispatchToProps (dispatch) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inherits(DepositEtherModal, Component) |
|
|
|
inherits(DepositEtherModal, Component) |
|
|
|
function DepositEtherModal () { |
|
|
|
function DepositEtherModal (props) { |
|
|
|
Component.call(this) |
|
|
|
Component.call(this) |
|
|
|
|
|
|
|
|
|
|
|
// need to set after i18n locale has loaded
|
|
|
|
// need to set after i18n locale has loaded
|
|
|
|
DIRECT_DEPOSIT_ROW_TITLE = this.props.t('directDepositEther') |
|
|
|
DIRECT_DEPOSIT_ROW_TITLE = props.t('directDepositEther') |
|
|
|
DIRECT_DEPOSIT_ROW_TEXT = this.props.t('directDepositEtherExplainer') |
|
|
|
DIRECT_DEPOSIT_ROW_TEXT = props.t('directDepositEtherExplainer') |
|
|
|
COINBASE_ROW_TITLE = this.props.t('buyCoinbase') |
|
|
|
COINBASE_ROW_TITLE = props.t('buyCoinbase') |
|
|
|
COINBASE_ROW_TEXT = this.props.t('buyCoinbaseExplainer') |
|
|
|
COINBASE_ROW_TEXT = props.t('buyCoinbaseExplainer') |
|
|
|
SHAPESHIFT_ROW_TITLE = this.props.t('depositShapeShift') |
|
|
|
SHAPESHIFT_ROW_TITLE = props.t('depositShapeShift') |
|
|
|
SHAPESHIFT_ROW_TEXT = this.props.t('depositShapeShiftExplainer') |
|
|
|
SHAPESHIFT_ROW_TEXT = props.t('depositShapeShiftExplainer') |
|
|
|
FAUCET_ROW_TITLE = this.props.t('testFaucet') |
|
|
|
FAUCET_ROW_TITLE = props.t('testFaucet') |
|
|
|
|
|
|
|
|
|
|
|
this.state = { |
|
|
|
this.state = { |
|
|
|
buyingWithShapeshift: false, |
|
|
|
buyingWithShapeshift: false, |
|
|
@ -63,6 +59,10 @@ function DepositEtherModal () { |
|
|
|
|
|
|
|
|
|
|
|
module.exports = connect(mapStateToProps, mapDispatchToProps)(DepositEtherModal) |
|
|
|
module.exports = connect(mapStateToProps, mapDispatchToProps)(DepositEtherModal) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DepositEtherModal.prototype.facuetRowText = function (networkName) { |
|
|
|
|
|
|
|
return this.props.t('getEtherFromFaucet', [networkName]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DepositEtherModal.prototype.renderRow = function ({ |
|
|
|
DepositEtherModal.prototype.renderRow = function ({ |
|
|
|
logo, |
|
|
|
logo, |
|
|
|
title, |
|
|
|
title, |
|
|
@ -156,7 +156,7 @@ DepositEtherModal.prototype.render = function () { |
|
|
|
this.renderRow({ |
|
|
|
this.renderRow({ |
|
|
|
logo: h('i.fa.fa-tint.fa-2x'), |
|
|
|
logo: h('i.fa.fa-tint.fa-2x'), |
|
|
|
title: FAUCET_ROW_TITLE, |
|
|
|
title: FAUCET_ROW_TITLE, |
|
|
|
text: facuetRowText(networkName), |
|
|
|
text: this.facuetRowText(networkName), |
|
|
|
buttonLabel: this.props.t('getEther'), |
|
|
|
buttonLabel: this.props.t('getEther'), |
|
|
|
onButtonClick: () => toFaucet(network), |
|
|
|
onButtonClick: () => toFaucet(network), |
|
|
|
hide: !isTestNetwork || buyingWithShapeshift, |
|
|
|
hide: !isTestNetwork || buyingWithShapeshift, |
|
|
|