Cleanup certifications (#7454)

* Cleanup certifications

* Add key for accounts
This commit is contained in:
Jaco Greeff 2018-01-05 13:26:43 +01:00 committed by GitHub
parent ce69c4e6ea
commit 71da3af1a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -97,9 +97,10 @@ function mapStateToProps (_, initProps) {
return (state) => { return (state) => {
const certifications = state.certifications[address] || []; const certifications = state.certifications[address] || [];
const dappsUrl = state.api.dappsUrl;
return { certifications, dappsUrl }; return {
certifications
};
}; };
} }

View File

@ -27,7 +27,6 @@ import styles from './list.css';
class List extends Component { class List extends Component {
static propTypes = { static propTypes = {
balances: PropTypes.object.isRequired, balances: PropTypes.object.isRequired,
certifications: PropTypes.object.isRequired,
accounts: PropTypes.object, accounts: PropTypes.object,
disabled: PropTypes.object, disabled: PropTypes.object,
empty: PropTypes.bool, empty: PropTypes.bool,
@ -83,6 +82,7 @@ class List extends Component {
account={ account } account={ account }
disabled={ isDisabled } disabled={ isDisabled }
handleAddSearchToken={ handleAddSearchToken } handleAddSearchToken={ handleAddSearchToken }
key={ account.address }
link={ link } link={ link }
owners={ owners } owners={ owners }
showCertifications showCertifications
@ -246,9 +246,10 @@ class List extends Component {
function mapStateToProps (state, props) { function mapStateToProps (state, props) {
const addresses = Object.keys(props.accounts); const addresses = Object.keys(props.accounts);
const balances = pick(state.balances, addresses); const balances = pick(state.balances, addresses);
const { certifications } = state;
return { balances, certifications }; return {
balances
};
} }
export default connect( export default connect(