aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/tx-list.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/tx-list.js')
-rw-r--r--ui/app/components/tx-list.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/ui/app/components/tx-list.js b/ui/app/components/tx-list.js
index ca683f764..0cef64ca6 100644
--- a/ui/app/components/tx-list.js
+++ b/ui/app/components/tx-list.js
@@ -1,5 +1,6 @@
const Component = require('react').Component
-const connect = require('../metamask-connect')
+const PropTypes = require('prop-types')
+const connect = require('react-redux').connect
const h = require('react-hyperscript')
const inherits = require('util').inherits
const prefixForNetwork = require('../../lib/etherscan-prefix-for-network')
@@ -19,6 +20,10 @@ module.exports = compose(
connect(mapStateToProps, mapDispatchToProps)
)(TxList)
+TxList.contextTypes = {
+ t: PropTypes.func,
+}
+
function mapStateToProps (state) {
return {
txsToRender: selectors.transactionsSelector(state),
@@ -45,7 +50,7 @@ TxList.prototype.render = function () {
return h('div.flex-column', [
h('div.flex-row.tx-list-header-wrapper', [
h('div.flex-row.tx-list-header', [
- h('div', this.props.t('transactions')),
+ h('div', this.context.t('transactions')),
]),
]),
h('div.flex-column.tx-list-container', {}, [
@@ -62,7 +67,7 @@ TxList.prototype.renderTransaction = function () {
: [h(
'div.tx-list-item.tx-list-item--empty',
{ key: 'tx-list-none' },
- [ this.props.t('noTransactions') ],
+ [ this.context.t('noTransactions') ],
)]
}
@@ -116,7 +121,7 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa
if (isUnapproved) {
opts.onClick = () => history.push(CONFIRM_TRANSACTION_ROUTE)
- opts.transactionStatus = this.props.t('notStarted')
+ opts.transactionStatus = this.context.t('notStarted')
} else if (transactionHash) {
opts.onClick = () => this.view(transactionHash, transactionNetworkId)
}