diff options
Merge branch 'master' into i3686-txparamundefined-sigrequestsintxlist
Diffstat (limited to 'ui/app/components/pending-msg.js')
-rw-r--r-- | ui/app/components/pending-msg.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ui/app/components/pending-msg.js b/ui/app/components/pending-msg.js index 56e646a1c..21a7864e4 100644 --- a/ui/app/components/pending-msg.js +++ b/ui/app/components/pending-msg.js @@ -1,11 +1,17 @@ const Component = require('react').Component +const PropTypes = require('prop-types') const h = require('react-hyperscript') const inherits = require('util').inherits const PendingTxDetails = require('./pending-msg-details') -const connect = require('../metamask-connect') +const connect = require('react-redux').connect + +PendingMsg.contextTypes = { + t: PropTypes.func, +} module.exports = connect()(PendingMsg) + inherits(PendingMsg, Component) function PendingMsg () { Component.call(this) @@ -30,14 +36,14 @@ PendingMsg.prototype.render = function () { fontWeight: 'bold', textAlign: 'center', }, - }, this.props.t('signMessage')), + }, this.context.t('signMessage')), h('.error', { style: { margin: '10px', }, }, [ - this.props.t('signNotice'), + this.context.t('signNotice'), h('a', { href: 'https://medium.com/metamask/the-new-secure-way-to-sign-data-in-your-browser-6af9dd2a1527', style: { color: 'rgb(247, 134, 28)' }, @@ -46,7 +52,7 @@ PendingMsg.prototype.render = function () { const url = 'https://medium.com/metamask/the-new-secure-way-to-sign-data-in-your-browser-6af9dd2a1527' global.platform.openWindow({ url }) }, - }, this.props.t('readMore')), + }, this.context.t('readMore')), ]), // message details @@ -56,10 +62,10 @@ PendingMsg.prototype.render = function () { h('.flex-row.flex-space-around', [ h('button', { onClick: state.cancelMessage, - }, this.props.t('cancel')), + }, this.context.t('cancel')), h('button', { onClick: state.signMessage, - }, this.props.t('sign')), + }, this.context.t('sign')), ]), ]) |