From 6e8dc84e09ca638d9ec9df8de210f0aeea98f616 Mon Sep 17 00:00:00 2001 From: u-e Date: Fri, 25 Jan 2019 13:12:39 +0300 Subject: [PATCH] updated wallet with globalProps --- .../transaction/container/transactionContainer.js | 11 ++++++++--- src/components/transaction/view/transactionView.js | 8 +++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/components/transaction/container/transactionContainer.js b/src/components/transaction/container/transactionContainer.js index a6d1899b6..85058dc1f 100644 --- a/src/components/transaction/container/transactionContainer.js +++ b/src/components/transaction/container/transactionContainer.js @@ -1,4 +1,5 @@ import React, { PureComponent } from 'react'; +import { connect } from 'react-redux'; // Component import TransactionView from '../view/transactionView'; @@ -21,10 +22,14 @@ class TransactionContainer extends PureComponent { // Component Functions render() { - const { walletData } = this.props; + const { walletData, globalProps } = this.props; - return ; + return ; } } -export default TransactionContainer; +const mapStateToProps = state => ({ + globalProps: state.account.globalProps, +}); + +export default connect(mapStateToProps)(TransactionContainer); diff --git a/src/components/transaction/view/transactionView.js b/src/components/transaction/view/transactionView.js index 7a677c685..b30bc5be8 100644 --- a/src/components/transaction/view/transactionView.js +++ b/src/components/transaction/view/transactionView.js @@ -34,6 +34,7 @@ class TransactionView extends PureComponent { intl, intl: { formatNumber }, walletData, + globalProps, } = this.props; return ( @@ -51,7 +52,12 @@ class TransactionView extends PureComponent { {transactions && transactions.map((item, index) => { - const transactionData = groomingTransactionData(item, walletData, formatNumber); + const transactionData = groomingTransactionData( + item, + walletData, + formatNumber, + globalProps, + ); return (