diff --git a/lib/types/account-types.js b/lib/types/account-types.js --- a/lib/types/account-types.js +++ b/lib/types/account-types.js @@ -108,6 +108,7 @@ +username: string, +password: string, +logInActionSource: LogInActionSource, + +primaryIdentityPublicKey?: string, }; export type LogInRequest = { diff --git a/native/account/log-in-panel.react.js b/native/account/log-in-panel.react.js --- a/native/account/log-in-panel.react.js +++ b/native/account/log-in-panel.react.js @@ -239,11 +239,17 @@ async logInAction(extraInfo: LogInExtraInfo): Promise { try { + invariant( + this.props.primaryIdentityPublicKey !== null && + this.props.primaryIdentityPublicKey !== undefined, + 'primaryIdentityPublicKey must exist in logInAction', + ); const result = await this.props.logIn({ ...extraInfo, username: this.usernameInputText, password: this.passwordInputText, logInActionSource: logInActionSources.logInFromNativeForm, + primaryIdentityPublicKey: this.props.primaryIdentityPublicKey, }); this.props.setActiveAlert(false); await setNativeCredentials({