aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/modals
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-22 09:40:28 +0800
committerDan <danjm.com@gmail.com>2018-03-22 09:40:28 +0800
commit18f85835296f12814e0593dfc67b29ac672ddf53 (patch)
tree925de52dde04c8c36ec8b89ddc79d57407fb5825 /ui/app/components/modals
parent3c144302d65053fc3082b8b24662fc3e0231ca3a (diff)
downloadtangerine-wallet-browser-18f85835296f12814e0593dfc67b29ac672ddf53.tar.gz
tangerine-wallet-browser-18f85835296f12814e0593dfc67b29ac672ddf53.tar.zst
tangerine-wallet-browser-18f85835296f12814e0593dfc67b29ac672ddf53.zip
Fix references to undefined 'this.props'
Diffstat (limited to 'ui/app/components/modals')
-rw-r--r--ui/app/components/modals/deposit-ether-modal.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/ui/app/components/modals/deposit-ether-modal.js b/ui/app/components/modals/deposit-ether-modal.js
index 0b097d546..40f805181 100644
--- a/ui/app/components/modals/deposit-ether-modal.js
+++ b/ui/app/components/modals/deposit-ether-modal.js
@@ -14,10 +14,6 @@ let SHAPESHIFT_ROW_TITLE
let SHAPESHIFT_ROW_TEXT
let FAUCET_ROW_TITLE
-const facuetRowText = (networkName) => {
- return this.props.t('getEtherFromFaucet', [networkName])
-}
-
function mapStateToProps (state) {
return {
network: state.metamask.network,
@@ -44,17 +40,17 @@ function mapDispatchToProps (dispatch) {
}
inherits(DepositEtherModal, Component)
-function DepositEtherModal () {
+function DepositEtherModal (props) {
Component.call(this)
// need to set after i18n locale has loaded
- DIRECT_DEPOSIT_ROW_TITLE = this.props.t('directDepositEther')
- DIRECT_DEPOSIT_ROW_TEXT = this.props.t('directDepositEtherExplainer')
- COINBASE_ROW_TITLE = this.props.t('buyCoinbase')
- COINBASE_ROW_TEXT = this.props.t('buyCoinbaseExplainer')
- SHAPESHIFT_ROW_TITLE = this.props.t('depositShapeShift')
- SHAPESHIFT_ROW_TEXT = this.props.t('depositShapeShiftExplainer')
- FAUCET_ROW_TITLE = this.props.t('testFaucet')
+ DIRECT_DEPOSIT_ROW_TITLE = props.t('directDepositEther')
+ DIRECT_DEPOSIT_ROW_TEXT = props.t('directDepositEtherExplainer')
+ COINBASE_ROW_TITLE = props.t('buyCoinbase')
+ COINBASE_ROW_TEXT = props.t('buyCoinbaseExplainer')
+ SHAPESHIFT_ROW_TITLE = props.t('depositShapeShift')
+ SHAPESHIFT_ROW_TEXT = props.t('depositShapeShiftExplainer')
+ FAUCET_ROW_TITLE = props.t('testFaucet')
this.state = {
buyingWithShapeshift: false,
@@ -63,6 +59,10 @@ function DepositEtherModal () {
module.exports = connect(mapStateToProps, mapDispatchToProps)(DepositEtherModal)
+DepositEtherModal.prototype.facuetRowText = function (networkName) {
+ return this.props.t('getEtherFromFaucet', [networkName])
+}
+
DepositEtherModal.prototype.renderRow = function ({
logo,
title,
@@ -156,7 +156,7 @@ DepositEtherModal.prototype.render = function () {
this.renderRow({
logo: h('i.fa.fa-tint.fa-2x'),
title: FAUCET_ROW_TITLE,
- text: facuetRowText(networkName),
+ text: this.facuetRowText(networkName),
buttonLabel: this.props.t('getEther'),
onButtonClick: () => toFaucet(network),
hide: !isTestNetwork || buyingWithShapeshift,