Newer
Older
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
import React, { PureComponent } from 'react';
import { AccountHeader, Clickable, MenuPopup } from 'fether-ui';
import { Link, withRouter } from 'react-router-dom';
import Health from '../Health';
import TokensList from './TokensList';
import withAccount from '../utils/withAccount';
Axel Chalon
committed
@withRouter
isParitySignerAccount = () => {
const {
account: { type }
} = this.props;
return type === 'signer';
};
const backupAccountItem = {
name: 'Backup Account',
onClick: () => history.push(`/backup/${address}`)
name: 'Add Tokens',
onClick: () => history.push(`/whitelist/${address}`)
if (this.isParitySignerAccount() === false) {
menuItems.unshift(backupAccountItem);
}
return menuItems;
const {
account: { address, name, type }
} = this.props;
Luke Schoen
committed
<div className='tokens'>
<MenuPopup
className='popup-menu-account'
horizontalOffset={1}
menuItems={this.menuItems()}
size='small'
trigger={<Clickable className='icon -menu' />}