mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-30 08:09:15 +01:00
662c19d4da
* added warning fix added warning for send screen fix changed condition fix fixed test review updates * review updates * fix * fixed failing test * added check for transaction type * fixed failing unit test * added description for localization * review updates * review updates
30 lines
812 B
JavaScript
30 lines
812 B
JavaScript
import { connect } from 'react-redux';
|
|
import { getAccountsWithLabels, getAddressBookEntry } from '../../../selectors';
|
|
import { showModal } from '../../../store/actions';
|
|
import ConfirmPageContainer from './confirm-page-container.component';
|
|
|
|
function mapStateToProps(state, ownProps) {
|
|
const to = ownProps.toAddress;
|
|
|
|
const contact = getAddressBookEntry(state, to);
|
|
return {
|
|
contact,
|
|
toName: contact?.name || ownProps.toName,
|
|
isOwnedAccount: getAccountsWithLabels(state)
|
|
.map((accountWithLabel) => accountWithLabel.address)
|
|
.includes(to),
|
|
to,
|
|
};
|
|
}
|
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
return {
|
|
showBuyModal: () => dispatch(showModal({ name: 'DEPOSIT_ETHER' })),
|
|
};
|
|
};
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps,
|
|
)(ConfirmPageContainer);
|