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 { inherits } from 'util'
import Identicon from '../ui/identicon'
import { addressSummary, formatBalance } from '../../helpers/utils/util'
export default AccountPanel
inherits(AccountPanel, Component)
function AccountPanel () {
Component.call(this)
}
AccountPanel.prototype.render = function () {
export default class AccountPanel extends Component {
render () {
const state = this.props
const identity = state.identity || {}
const account = state.account || {}
@ -51,6 +43,7 @@ AccountPanel.prototype.render = function () {
</div>
)
}
}
function balanceOrFaucetingIndication (account) {
return {