// // Interface to the key manager // import React from 'react' import App from 'app' import { ButtonToolbar, Button, Glyphicon, Alert } from 'react-bootstrap' import {VerticalLayout, Row} from 'components/layout' import bitmask from 'lib/bitmask' import './addressbook.less' export default class Addressbook extends React.Component { static get defaultProps() {return{ account: null }} constructor(props) { super(props) this.state = { keys: null, errorMsg: "" } this.close = this.close.bind(this) } componentWillMount() { bitmask.keys.list(true).then(keys => { this.setState({keys: keys}) }, error => { this.setState({errorMsg: error}) }) } close() { App.show('main', {initialAccount: this.props.account}) } render() { let alert = null let keyList = null if (this.state.errorMsg) { alert = ( {this.state.errorMsg} ) } keyList = list of keys goes here let buttons = ( ) let page = (
{buttons}
{this.props.account.address}

Addressbook

{alert} {keyList}
) return page } }