Handle PNI keys from ProvisionMessage

This commit is contained in:
Fedor Indutny 2022-03-01 15:01:21 -08:00 committed by GitHub
parent 19441cd3f3
commit 2b0c98f943
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 63 additions and 35 deletions

View file

@ -21,6 +21,7 @@ import { InstallError } from '../../components/installScreen/InstallScreenErrorS
import { MAX_DEVICE_NAME_LENGTH } from '../../components/installScreen/InstallScreenChoosingDeviceNameStep';
import { HTTPError } from '../../textsecure/Errors';
import { isRecord } from '../../util/isRecord';
import * as Errors from '../../types/errors';
import { normalizeDeviceName } from '../../util/normalizeDeviceName';
type PropsType = ComponentProps<typeof InstallScreen>;
@ -183,7 +184,7 @@ export function SmartInstallScreen(): ReactElement {
} catch (error) {
log.error(
'confirmNumber: error clearing database',
error && error.stack ? error.stack : error
Errors.toLogFormat(error)
);
}
}
@ -205,13 +206,17 @@ export function SmartInstallScreen(): ReactElement {
);
window.removeSetupMenuItems();
} catch (err: unknown) {
} catch (error) {
log.error(
'account.registerSecondDevice: got an error',
Errors.toLogFormat(error)
);
if (hasCleanedUp) {
return;
}
setState({
step: InstallScreenStep.Error,
error: getInstallError(err),
error: getInstallError(error),
});
}
})();