Are you sure you want to remove the following address from your addressbook?
{ account.meta.description }
);
}
onDeleteConfirmed = () => {
const { api, router } = this.context;
const { account, route, newError } = this.props;
account.meta.deleted = true;
api.parity
.setAccountMeta(account.address, account.meta)
.then(() => {
router.push(route);
this.closeDeleteDialog();
})
.catch((error) => {
console.error('onDeleteConfirmed', error);
newError(new Error(`Deletion failed: ${error.message}`));
this.closeDeleteDialog();
});
}
closeDeleteDialog = () => {
this.props.onClose();
}
}
function mapStateToProps (state) {
return {};
}
function mapDispatchToProps (dispatch) {
return bindActionCreators({ newError }, dispatch);
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(Delete);