diff options
author | Dan <danjm.com@gmail.com> | 2018-03-30 10:28:45 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-03-30 10:28:45 +0800 |
commit | 893f82491d549c9d61dfa1fb30ae1954c4efab68 (patch) | |
tree | 3c73dd4c565c773341a44ddfd8d23101d31d4ad3 /ui/app/components/hex-as-decimal-input.js | |
parent | a4594f6838a9ff38a9a6f1998850b27beebb2fbb (diff) | |
parent | 9d4be1842e7c56e3bfde529ff555dcae8dec3dbd (diff) | |
download | tangerine-wallet-browser-893f82491d549c9d61dfa1fb30ae1954c4efab68.tar.gz tangerine-wallet-browser-893f82491d549c9d61dfa1fb30ae1954c4efab68.tar.zst tangerine-wallet-browser-893f82491d549c9d61dfa1fb30ae1954c4efab68.zip |
Merge branch 'master' into i3471-checkbalanceonconfirmscreen
Diffstat (limited to 'ui/app/components/hex-as-decimal-input.js')
-rw-r--r-- | ui/app/components/hex-as-decimal-input.js | 16 |
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 |