Show busy indicator on Address forget (#6066)

* Shw busy indicator on Address forget

* Remove debug logs
This commit is contained in:
Jaco Greeff 2017-07-16 11:05:36 +02:00 committed by Arkadiy Paronyan
parent 895350e77c
commit 4fc16a9eec
2 changed files with 10 additions and 2 deletions

View File

@ -69,14 +69,14 @@ export default class ConfirmDialog extends Component {
<Portal
buttons={ [
<Button
disabled={ disabledDeny }
disabled={ disabledDeny || busy }
icon={ iconDeny || <CancelIcon /> }
key='deny'
label={ labelDeny || DEFAULT_NO }
onClick={ onDeny }
/>,
<Button
disabled={ disabledConfirm }
disabled={ disabledConfirm || busy }
icon={ iconConfirm || <CheckIcon /> }
key='confirm'
label={ labelConfirm || DEFAULT_YES }

View File

@ -41,8 +41,13 @@ class Delete extends Component {
newError: PropTypes.func
};
state = {
isBusy: false
};
render () {
const { account, confirmMessage, visible } = this.props;
const { isBusy } = this.state;
if (!visible) {
return null;
@ -50,6 +55,7 @@ class Delete extends Component {
return (
<ConfirmDialog
busy={ isBusy }
className={ styles.delete }
title={
<FormattedMessage
@ -99,6 +105,8 @@ class Delete extends Component {
const { api, router } = this.context;
const { account, route, newError } = this.props;
this.setState({ isBusy: true });
api.parity
.removeAddress(account.address)
.then(() => {