Update Transfer logic + Better logging (#4098)

* Add logs and better Transfer Store logic

* Fix wallet transfer

* Fix wrong gas in Wallet

* Move log levels to Parity tab
This commit is contained in:
Nicolas Gotchac
2017-01-10 13:26:30 +01:00
committed by Jaco Greeff
parent ae7619431b
commit cee2ac43c0
5 changed files with 352 additions and 55 deletions

View File

@@ -15,7 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import React, { Component, PropTypes } from 'react';
import { SelectField } from 'material-ui';
import { MenuItem, SelectField } from 'material-ui';
import { nodeOrStringProptype } from '~/util/proptypes';
@@ -42,11 +42,12 @@ export default class Select extends Component {
onChange: PropTypes.func,
onKeyDown: PropTypes.func,
type: PropTypes.string,
value: PropTypes.any
value: PropTypes.any,
values: PropTypes.array
}
render () {
const { children, className, disabled, error, hint, label, onBlur, onChange, onKeyDown, value } = this.props;
const { className, disabled, error, hint, label, onBlur, onChange, onKeyDown, value } = this.props;
return (
<SelectField
@@ -65,9 +66,36 @@ export default class Select extends Component {
onKeyDown={ onKeyDown }
underlineDisabledStyle={ UNDERLINE_DISABLED }
underlineStyle={ UNDERLINE_NORMAL }
value={ value }>
{ children }
value={ value }
>
{ this.renderChildren() }
</SelectField>
);
}
renderChildren () {
const { children, values } = this.props;
if (children) {
return children;
}
if (!values) {
return null;
}
return values.map((data, index) => {
const { name = index, value = index } = data;
return (
<MenuItem
key={ index }
label={ name }
value={ value }
>
{ name }
</MenuItem>
);
});
}
}