aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pending-msg.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-30 10:30:31 +0800
committerDan <danjm.com@gmail.com>2018-03-30 10:30:31 +0800
commit717623e2e388f488d71bd6e19095645cd8095a99 (patch)
tree7c16960c017585e2823c927199c4b98b93aecbbd /ui/app/components/pending-msg.js
parent01e3293b65bb153325479f7366113e037fee659b (diff)
parent9d4be1842e7c56e3bfde529ff555dcae8dec3dbd (diff)
downloadtangerine-wallet-browser-717623e2e388f488d71bd6e19095645cd8095a99.tar.gz
tangerine-wallet-browser-717623e2e388f488d71bd6e19095645cd8095a99.tar.zst
tangerine-wallet-browser-717623e2e388f488d71bd6e19095645cd8095a99.zip
Merge branch 'master' into i3686-txparamundefined-sigrequestsintxlist
Diffstat (limited to 'ui/app/components/pending-msg.js')
-rw-r--r--ui/app/components/pending-msg.js18
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')),
]),
])