Merge pull request #826 from neuroscr/tls-fix

make sure invalid Pubkey is shown to the user and stop loading animation
pull/828/head
Ryan Tharp 5 years ago committed by GitHub
commit 8cca388eec

@ -827,7 +827,10 @@ export class RegistrationTabs extends React.Component<{}, State> {
const onError = async (error: any) => { const onError = async (error: any) => {
window.log.error(error); window.log.error(error);
// clear the ... to make sure the user realize we're not doing anything
this.setState({
loading: false,
});
await this.resetRegistration(); await this.resetRegistration();
}; };
@ -839,6 +842,11 @@ export class RegistrationTabs extends React.Component<{}, State> {
const validationError = c.validateNumber(); const validationError = c.validateNumber();
if (validationError) { if (validationError) {
onError('Invalid public key').ignore(); onError('Invalid public key').ignore();
window.pushToast({
title: window.i18n('invalidNumberError'),
type: 'error',
id: 'invalidNumberError',
});
return; return;
} }

Loading…
Cancel
Save