aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/hex-as-decimal-input.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-04-03 01:47:24 +0800
committerGitHub <noreply@github.com>2018-04-03 01:47:24 +0800
commit6d5f1392a529c5c809d416aaebc6e3424ee55ae1 (patch)
tree7feb008f31933a579a4a9bdeb42e22c99d78597a /ui/app/components/hex-as-decimal-input.js
parent812a06ffcd9cea39453e8a59563bf1d12e17c065 (diff)
parent69a867b4a420acd4b4354aab2cc4051736a778cb (diff)
downloadtangerine-wallet-browser-6d5f1392a529c5c809d416aaebc6e3424ee55ae1.tar
tangerine-wallet-browser-6d5f1392a529c5c809d416aaebc6e3424ee55ae1.tar.gz
tangerine-wallet-browser-6d5f1392a529c5c809d416aaebc6e3424ee55ae1.tar.bz2
tangerine-wallet-browser-6d5f1392a529c5c809d416aaebc6e3424ee55ae1.tar.lz
tangerine-wallet-browser-6d5f1392a529c5c809d416aaebc6e3424ee55ae1.tar.xz
tangerine-wallet-browser-6d5f1392a529c5c809d416aaebc6e3424ee55ae1.tar.zst
tangerine-wallet-browser-6d5f1392a529c5c809d416aaebc6e3424ee55ae1.zip
Merge branch 'master' into i18n-helper
Diffstat (limited to 'ui/app/components/hex-as-decimal-input.js')
-rw-r--r--ui/app/components/hex-as-decimal-input.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/ui/app/components/hex-as-decimal-input.js b/ui/app/components/hex-as-decimal-input.js
index be7ba4c9e..75303a34a 100644
--- a/ui/app/components/hex-as-decimal-input.js
+++ b/ui/app/components/hex-as-decimal-input.js
@@ -1,13 +1,19 @@
const Component = require('react').Component
+const PropTypes = require('prop-types')
const h = require('react-hyperscript')
const inherits = require('util').inherits
const ethUtil = require('ethereumjs-util')
const BN = ethUtil.BN
const extend = require('xtend')
-const connect = require('../metamask-connect')
+const connect = require('react-redux').connect
+
+HexAsDecimalInput.contextTypes = {
+ t: PropTypes.func,
+}
module.exports = connect()(HexAsDecimalInput)
+
inherits(HexAsDecimalInput, Component)
function HexAsDecimalInput () {
this.state = { invalid: null }
@@ -127,13 +133,13 @@ HexAsDecimalInput.prototype.constructWarning = function () {
let message = name ? name + ' ' : ''
if (min && max) {
- message += this.props.t('betweenMinAndMax', [min, max])
+ message += this.context.t('betweenMinAndMax', [min, max])
} else if (min) {
- message += this.props.t('greaterThanMin', [min])
+ message += this.context.t('greaterThanMin', [min])
} else if (max) {
- message += this.props.t('lessThanMax', [max])
+ message += this.context.t('lessThanMax', [max])
} else {
- message += this.props.t('invalidInput')
+ message += this.context.t('invalidInput')
}
return message