mirror of
https://github.com/trezor/trezor-wallet
synced 2025-07-05 22:32:33 +00:00
33 lines
1.0 KiB
JavaScript
33 lines
1.0 KiB
JavaScript
/* @flow */
|
|
'use strict';
|
|
|
|
import React, { Component, PropTypes } from 'react';
|
|
import { bindActionCreators } from 'redux';
|
|
import { connect } from 'react-redux';
|
|
|
|
import Summary from './Summary';
|
|
import * as SummaryActions from '../../../actions/SummaryActions';
|
|
|
|
const mapStateToProps = (state, own) => {
|
|
return {
|
|
location: state.router.location,
|
|
devices: state.connect.devices,
|
|
accounts: state.accounts,
|
|
discovery: state.discovery,
|
|
tokens: state.tokens,
|
|
summary: state.summary,
|
|
fiat: state.fiat,
|
|
localStorage: state.localStorage
|
|
};
|
|
}
|
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
return {
|
|
summaryActions: bindActionCreators(SummaryActions, dispatch),
|
|
initAccount: bindActionCreators(SummaryActions.init, dispatch),
|
|
updateAccount: bindActionCreators(SummaryActions.update, dispatch),
|
|
disposeAccount: bindActionCreators(SummaryActions.dispose, dispatch),
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Summary) |