fix linting issues (#2758)

This commit is contained in:
Jannis Redmann 2016-10-20 16:09:58 +02:00 committed by Jaco Greeff
parent d70503b874
commit 67f734cb20
4 changed files with 14 additions and 7 deletions

View File

@ -43,7 +43,7 @@ export default class AddDapps extends Component {
<Button label={ 'Done' } onClick={ onClose } icon={ <DoneIcon /> } /> <Button label={ 'Done' } onClick={ onClose } icon={ <DoneIcon /> } />
] } ] }
visible={ open } visible={ open }
scroll={ true } scroll
> >
<List> <List>
{ available.map(this.renderApp) } { available.map(this.renderApp) }

View File

@ -64,11 +64,10 @@ const hardcoded = [
]; ];
export default function () { export default function () {
// return fetch('//127.0.0.1:8080/api/apps') // return fetch('//127.0.0.1:8080/api/apps')
// .then((res) => res.ok ? res.json() : []) // .then((res) => res.ok ? res.json() : [])
return Promise.resolve(hardcoded) // TODO return Promise.resolve(hardcoded) // TODO
.then((apps) => apps.map((app) => { .then((apps) => apps.map((app) => {
return Object.assign({}, app, { hash: sha3(app.id) }) return Object.assign({}, app, { hash: sha3(app.id) });
})); }));
} }

View File

@ -22,6 +22,8 @@ import TxHashLink from '../TxHashLink';
import styles from './SignRequest.css'; import styles from './SignRequest.css';
const nullable = (type) => React.PropTypes.oneOfType([ React.PropTypes.oneOf([ null ]), type ]);
export default class SignRequest extends Component { export default class SignRequest extends Component {
// TODO [todr] re-use proptypes? // TODO [todr] re-use proptypes?
@ -34,7 +36,9 @@ export default class SignRequest extends Component {
onConfirm: PropTypes.func, onConfirm: PropTypes.func,
onReject: PropTypes.func, onReject: PropTypes.func,
status: PropTypes.string, status: PropTypes.string,
className: PropTypes.string className: PropTypes.string,
chain: nullable(PropTypes.object),
balance: nullable(PropTypes.object)
}; };
state = { state = {
@ -61,7 +65,7 @@ export default class SignRequest extends Component {
} }
render () { render () {
const { chain, balance, className } = this.props; const { className } = this.props;
return ( return (
<div className={ `${styles.container} ${className || ''}` }> <div className={ `${styles.container} ${className || ''}` }>
{ this.renderDetails() } { this.renderDetails() }

View File

@ -26,6 +26,8 @@ import styles from './TransactionFinished.css';
import * as tUtil from '../util/transaction'; import * as tUtil from '../util/transaction';
import { capitalize } from '../util/util'; import { capitalize } from '../util/util';
const nullable = (type) => React.PropTypes.oneOfType([ React.PropTypes.oneOf([ null ]), type ]);
export default class TransactionFinished extends Component { export default class TransactionFinished extends Component {
static contextTypes = { static contextTypes = {
api: PropTypes.object.isRequired api: PropTypes.object.isRequired
@ -42,7 +44,10 @@ export default class TransactionFinished extends Component {
to: PropTypes.string, // undefined if it's a contract to: PropTypes.string, // undefined if it's a contract
txHash: PropTypes.string, // undefined if transacation is rejected txHash: PropTypes.string, // undefined if transacation is rejected
className: PropTypes.string, className: PropTypes.string,
data: PropTypes.string data: PropTypes.string,
chain: nullable(PropTypes.object),
fromBalance: nullable(PropTypes.object),
toBalance: nullable(PropTypes.object)
}; };
state = { state = {
@ -81,7 +86,6 @@ export default class TransactionFinished extends Component {
} }
const { className, date, id } = this.props; const { className, date, id } = this.props;
const { totalValue } = this.state;
return ( return (
<div className={ `${styles.container} ${className || ''}` }> <div className={ `${styles.container} ${className || ''}` }>