Cleanup certifications (#7454)
* Cleanup certifications * Add key for accounts
This commit is contained in:
parent
ce69c4e6ea
commit
71da3af1a2
@ -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
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user