aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-30 10:28:45 +0800
committerDan <danjm.com@gmail.com>2018-03-30 10:28:45 +0800
commit893f82491d549c9d61dfa1fb30ae1954c4efab68 (patch)
tree3c73dd4c565c773341a44ddfd8d23101d31d4ad3 /ui/app/components/send
parenta4594f6838a9ff38a9a6f1998850b27beebb2fbb (diff)
parent9d4be1842e7c56e3bfde529ff555dcae8dec3dbd (diff)
downloadtangerine-wallet-browser-893f82491d549c9d61dfa1fb30ae1954c4efab68.tar
tangerine-wallet-browser-893f82491d549c9d61dfa1fb30ae1954c4efab68.tar.gz
tangerine-wallet-browser-893f82491d549c9d61dfa1fb30ae1954c4efab68.tar.bz2
tangerine-wallet-browser-893f82491d549c9d61dfa1fb30ae1954c4efab68.tar.lz
tangerine-wallet-browser-893f82491d549c9d61dfa1fb30ae1954c4efab68.tar.xz
tangerine-wallet-browser-893f82491d549c9d61dfa1fb30ae1954c4efab68.tar.zst
tangerine-wallet-browser-893f82491d549c9d61dfa1fb30ae1954c4efab68.zip
Merge branch 'master' into i3471-checkbalanceonconfirmscreen
Diffstat (limited to 'ui/app/components/send')
-rw-r--r--ui/app/components/send/account-list-item.js2
-rw-r--r--ui/app/components/send/gas-fee-display-v2.js12
-rw-r--r--ui/app/components/send/gas-tooltip.js10
-rw-r--r--ui/app/components/send/send-v2-container.js2
-rw-r--r--ui/app/components/send/to-autocomplete.js10
5 files changed, 27 insertions, 9 deletions
diff --git a/ui/app/components/send/account-list-item.js b/ui/app/components/send/account-list-item.js
index 749339694..1ad3f69c1 100644
--- a/ui/app/components/send/account-list-item.js
+++ b/ui/app/components/send/account-list-item.js
@@ -1,7 +1,7 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
-const connect = require('../../metamask-connect')
+const connect = require('react-redux').connect
const Identicon = require('../identicon')
const CurrencyDisplay = require('./currency-display')
const { conversionRateSelector, getCurrentCurrency } = require('../../selectors')
diff --git a/ui/app/components/send/gas-fee-display-v2.js b/ui/app/components/send/gas-fee-display-v2.js
index 76ed1b5d4..1423aa84d 100644
--- a/ui/app/components/send/gas-fee-display-v2.js
+++ b/ui/app/components/send/gas-fee-display-v2.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 CurrencyDisplay = require('./currency-display')
-const connect = require('../../metamask-connect')
+const connect = require('react-redux').connect
+
+GasFeeDisplay.contextTypes = {
+ t: PropTypes.func,
+}
module.exports = connect()(GasFeeDisplay)
+
inherits(GasFeeDisplay, Component)
function GasFeeDisplay () {
Component.call(this)
@@ -33,8 +39,8 @@ GasFeeDisplay.prototype.render = function () {
readOnly: true,
})
: gasLoadingError
- ? h('div.currency-display.currency-display--message', this.props.t('setGasPrice'))
- : h('div.currency-display', this.props.t('loading')),
+ ? h('div.currency-display.currency-display--message', this.context.t('setGasPrice'))
+ : h('div.currency-display', this.context.t('loading')),
h('button.sliders-icon-container', {
onClick,
diff --git a/ui/app/components/send/gas-tooltip.js b/ui/app/components/send/gas-tooltip.js
index 607394c8b..62cdc1cad 100644
--- a/ui/app/components/send/gas-tooltip.js
+++ b/ui/app/components/send/gas-tooltip.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 InputNumber = require('../input-number.js')
-const connect = require('../../metamask-connect')
+const connect = require('react-redux').connect
+
+GasTooltip.contextTypes = {
+ t: PropTypes.func,
+}
module.exports = connect()(GasTooltip)
+
inherits(GasTooltip, Component)
function GasTooltip () {
Component.call(this)
@@ -82,7 +88,7 @@ GasTooltip.prototype.render = function () {
'marginTop': '81px',
},
}, [
- h('span.gas-tooltip-label', {}, [this.props.t('gasLimit')]),
+ h('span.gas-tooltip-label', {}, [this.context.t('gasLimit')]),
h('i.fa.fa-info-circle'),
]),
h(InputNumber, {
diff --git a/ui/app/components/send/send-v2-container.js b/ui/app/components/send/send-v2-container.js
index 5b903a96e..08c26a91f 100644
--- a/ui/app/components/send/send-v2-container.js
+++ b/ui/app/components/send/send-v2-container.js
@@ -1,4 +1,4 @@
-const connect = require('../../metamask-connect')
+const connect = require('react-redux').connect
const actions = require('../../actions')
const abi = require('ethereumjs-abi')
const SendEther = require('../../send-v2')
diff --git a/ui/app/components/send/to-autocomplete.js b/ui/app/components/send/to-autocomplete.js
index 4c54701cb..5ea17f9a2 100644
--- a/ui/app/components/send/to-autocomplete.js
+++ b/ui/app/components/send/to-autocomplete.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 AccountListItem = require('./account-list-item')
-const connect = require('../../metamask-connect')
+const connect = require('react-redux').connect
+
+ToAutoComplete.contextTypes = {
+ t: PropTypes.func,
+}
module.exports = connect()(ToAutoComplete)
+
inherits(ToAutoComplete, Component)
function ToAutoComplete () {
Component.call(this)
@@ -93,7 +99,7 @@ ToAutoComplete.prototype.render = function () {
return h('div.send-v2__to-autocomplete', {}, [
h('input.send-v2__to-autocomplete__input', {
- placeholder: this.props.t('recipientAddress'),
+ placeholder: this.context.t('recipientAddress'),
className: inError ? `send-v2__error-border` : '',
value: to,
onChange: event => onChange(event.target.value),