1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Use destructuring assignment (#8093)

* Use destructuring assignment

* remove `state` const

* Use defaultProps
This commit is contained in:
ricky 2020-02-24 14:38:41 -05:00 committed by GitHub
parent fcd404015b
commit 54f0830324
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,11 +10,14 @@ export default class AccountPanel extends Component {
isFauceting: PropTypes.bool,
}
static defaultProps = {
identity: {},
account: {},
isFauceting: false,
}
render () {
const state = this.props
const identity = state.identity || {}
const account = state.account || {}
const isFauceting = state.isFauceting
const { identity, account, isFauceting } = this.props
const panelState = {
key: `accountPanel${identity.address}`,