aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/signature-request.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-03-28 10:42:42 +0800
committerGitHub <noreply@github.com>2018-03-28 10:42:42 +0800
commitb324a9c29506661c18034df37f2cb17e66972915 (patch)
tree8d122128b5e43251a2275d6f2108178ab74897ff /ui/app/components/signature-request.js
parent74ac3bb2a7130675a10e1701d569b2c35a948f8f (diff)
parent871edfe12ad37545c596e2e926afc458c0efa559 (diff)
downloadtangerine-wallet-browser-b324a9c29506661c18034df37f2cb17e66972915.tar.gz
tangerine-wallet-browser-b324a9c29506661c18034df37f2cb17e66972915.tar.zst
tangerine-wallet-browser-b324a9c29506661c18034df37f2cb17e66972915.zip
Merge branch 'master' into i3471-checkbalanceonconfirmscreen
Diffstat (limited to 'ui/app/components/signature-request.js')
-rw-r--r--ui/app/components/signature-request.js23
1 files changed, 11 insertions, 12 deletions
diff --git a/ui/app/components/signature-request.js b/ui/app/components/signature-request.js
index 810a52e55..b76c1e60f 100644
--- a/ui/app/components/signature-request.js
+++ b/ui/app/components/signature-request.js
@@ -2,14 +2,13 @@ const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const Identicon = require('./identicon')
-const connect = require('react-redux').connect
+const connect = require('../metamask-connect')
const ethUtil = require('ethereumjs-util')
const classnames = require('classnames')
const AccountDropdownMini = require('./dropdowns/account-dropdown-mini')
const actions = require('../actions')
-const t = require('../../i18n')
const { conversionUtil } = require('../conversion-util')
const {
@@ -55,7 +54,7 @@ SignatureRequest.prototype.renderHeader = function () {
h('div.request-signature__header-background'),
- h('div.request-signature__header__text', t('sigRequest')),
+ h('div.request-signature__header__text', this.props.t('sigRequest')),
h('div.request-signature__header__tip-container', [
h('div.request-signature__header__tip'),
@@ -76,7 +75,7 @@ SignatureRequest.prototype.renderAccountDropdown = function () {
return h('div.request-signature__account', [
- h('div.request-signature__account-text', [t('account') + ':']),
+ h('div.request-signature__account-text', [this.props.t('account') + ':']),
h(AccountDropdownMini, {
selectedAccount,
@@ -103,7 +102,7 @@ SignatureRequest.prototype.renderBalance = function () {
return h('div.request-signature__balance', [
- h('div.request-signature__balance-text', [t('balance')]),
+ h('div.request-signature__balance-text', [this.props.t('balance')]),
h('div.request-signature__balance-value', `${balanceInEther} ETH`),
@@ -137,7 +136,7 @@ SignatureRequest.prototype.renderRequestInfo = function () {
return h('div.request-signature__request-info', [
h('div.request-signature__headline', [
- t('yourSigRequested'),
+ this.props.t('yourSigRequested'),
]),
])
@@ -155,18 +154,18 @@ SignatureRequest.prototype.msgHexToText = function (hex) {
SignatureRequest.prototype.renderBody = function () {
let rows
- let notice = t('youSign') + ':'
+ let notice = this.props.t('youSign') + ':'
const { txData } = this.props
const { type, msgParams: { data } } = txData
if (type === 'personal_sign') {
- rows = [{ name: t('message'), value: this.msgHexToText(data) }]
+ rows = [{ name: this.props.t('message'), value: this.msgHexToText(data) }]
} else if (type === 'eth_signTypedData') {
rows = data
} else if (type === 'eth_sign') {
- rows = [{ name: t('message'), value: data }]
- notice = t('signNotice')
+ rows = [{ name: this.props.t('message'), value: data }]
+ notice = this.props.t('signNotice')
}
return h('div.request-signature__body', {}, [
@@ -225,10 +224,10 @@ SignatureRequest.prototype.renderFooter = function () {
return h('div.request-signature__footer', [
h('button.btn-secondary--lg.request-signature__footer__cancel-button', {
onClick: cancel,
- }, t('cancel')),
+ }, this.props.t('cancel')),
h('button.btn-primary--lg', {
onClick: sign,
- }, t('sign')),
+ }, this.props.t('sign')),
])
}