diff --git a/js/src/modals/CreateWallet/WalletDetails/walletDetails.js b/js/src/modals/CreateWallet/WalletDetails/walletDetails.js index d3776e2cb..ee0cc77e2 100644 --- a/js/src/modals/CreateWallet/WalletDetails/walletDetails.js +++ b/js/src/modals/CreateWallet/WalletDetails/walletDetails.js @@ -16,18 +16,21 @@ import React, { Component, PropTypes } from 'react'; import { FormattedMessage } from 'react-intl'; +import { connect } from 'react-redux'; import { Form, TypedInput, Input, AddressSelect, InputAddress } from '~/ui'; import styles from '../createWallet.css'; -export default class WalletDetails extends Component { +class WalletDetails extends Component { static propTypes = { accounts: PropTypes.object.isRequired, wallet: PropTypes.object.isRequired, errors: PropTypes.object.isRequired, onChange: PropTypes.func.isRequired, - walletType: PropTypes.string.isRequired + walletType: PropTypes.string.isRequired, + + knownAddresses: PropTypes.array }; render () { @@ -103,7 +106,10 @@ export default class WalletDetails extends Component { } renderMultisigDetails () { - const { accounts, wallet, errors } = this.props; + const { accounts, knownAddresses, wallet, errors } = this.props; + const allowedOwners = knownAddresses + // Exclude sender and already owners of the wallet + .filter((address) => !wallet.owners.includes(address) && address !== wallet.account); return (