diff --git a/ui/app/components/app/account-panel.js b/ui/app/components/app/account-panel.js index 55d35b3c5..faf5f31f4 100644 --- a/ui/app/components/app/account-panel.js +++ b/ui/app/components/app/account-panel.js @@ -1,55 +1,48 @@ import React, { Component } from 'react' -import { inherits } from 'util' import Identicon from '../ui/identicon' import { addressSummary, formatBalance } from '../../helpers/utils/util' -export default AccountPanel +export default class AccountPanel extends Component { + render () { + const state = this.props + const identity = state.identity || {} + const account = state.account || {} + const isFauceting = state.isFauceting + const panelState = { + key: `accountPanel${identity.address}`, + identiconKey: identity.address, + identiconLabel: identity.name || '', + attributes: [ + { + key: 'ADDRESS', + value: addressSummary(identity.address), + }, + balanceOrFaucetingIndication(account, isFauceting), + ], + } -inherits(AccountPanel, Component) -function AccountPanel () { - Component.call(this) -} - -AccountPanel.prototype.render = function () { - const state = this.props - const identity = state.identity || {} - const account = state.account || {} - const isFauceting = state.isFauceting - - const panelState = { - key: `accountPanel${identity.address}`, - identiconKey: identity.address, - identiconLabel: identity.name || '', - attributes: [ - { - key: 'ADDRESS', - value: addressSummary(identity.address), - }, - balanceOrFaucetingIndication(account, isFauceting), - ], + return ( +