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

Convert AccountPanel component to ES6 class (#7775)

This commit is contained in:
Whymarrh Whitby 2020-01-10 10:32:24 -03:30 committed by GitHub
parent 92971d3c87
commit 6947ff49e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,17 +1,9 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import { inherits } from 'util'
import Identicon from '../ui/identicon' import Identicon from '../ui/identicon'
import { addressSummary, formatBalance } from '../../helpers/utils/util' import { addressSummary, formatBalance } from '../../helpers/utils/util'
export default AccountPanel export default class AccountPanel extends Component {
render () {
inherits(AccountPanel, Component)
function AccountPanel () {
Component.call(this)
}
AccountPanel.prototype.render = function () {
const state = this.props const state = this.props
const identity = state.identity || {} const identity = state.identity || {}
const account = state.account || {} const account = state.account || {}
@ -50,6 +42,7 @@ AccountPanel.prototype.render = function () {
</div> </div>
</div> </div>
) )
}
} }
function balanceOrFaucetingIndication (account) { function balanceOrFaucetingIndication (account) {