diff --git a/js/src/modals/CreateAccount/store.js b/js/src/modals/CreateAccount/store.js index cc2160ab9..cab221f4e 100644 --- a/js/src/modals/CreateAccount/store.js +++ b/js/src/modals/CreateAccount/store.js @@ -35,6 +35,7 @@ export default class Store { @observable gethAddresses = []; @observable gethImported = []; @observable isBusy = false; + @observable isTest = false; @observable isWindowsPhrase = false; @observable name = ''; @observable nameError = ERRORS.noName; @@ -310,6 +311,10 @@ export default class Store { this.stage--; } + @action setIsTest = isTest => { + this.isTest = isTest; + } + createAccount = (vaultStore) => { if (!this.canCreate) { return false; 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 (