updated wallet with globalProps

This commit is contained in:
u-e 2019-01-25 13:12:39 +03:00
parent b0b116bbe1
commit 6e8dc84e09
2 changed files with 15 additions and 4 deletions

View File

@ -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 <TransactionView walletData={walletData} />;
return <TransactionView walletData={walletData} globalProps={globalProps} />;
}
}
export default TransactionContainer;
const mapStateToProps = state => ({
globalProps: state.account.globalProps,
});
export default connect(mapStateToProps)(TransactionContainer);

View File

@ -34,6 +34,7 @@ class TransactionView extends PureComponent {
intl,
intl: { formatNumber },
walletData,
globalProps,
} = this.props;
return (
@ -51,7 +52,12 @@ class TransactionView extends PureComponent {
<Card>
{transactions
&& transactions.map((item, index) => {
const transactionData = groomingTransactionData(item, walletData, formatNumber);
const transactionData = groomingTransactionData(
item,
walletData,
formatNumber,
globalProps,
);
return (
<CollapsibleCard