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 React, { PureComponent } from 'react';
import { connect } from 'react-redux';
// Component // Component
import TransactionView from '../view/transactionView'; import TransactionView from '../view/transactionView';
@ -21,10 +22,14 @@ class TransactionContainer extends PureComponent {
// Component Functions // Component Functions
render() { 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,
intl: { formatNumber }, intl: { formatNumber },
walletData, walletData,
globalProps,
} = this.props; } = this.props;
return ( return (
@ -51,7 +52,12 @@ class TransactionView extends PureComponent {
<Card> <Card>
{transactions {transactions
&& transactions.map((item, index) => { && transactions.map((item, index) => {
const transactionData = groomingTransactionData(item, walletData, formatNumber); const transactionData = groomingTransactionData(
item,
walletData,
formatNumber,
globalProps,
);
return ( return (
<CollapsibleCard <CollapsibleCard