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 @@ -238,12 +238,19 @@ }; async logInAction(extraInfo: LogInExtraInfo): Promise { + const { primaryIdentityPublicKey } = this.props; try { + invariant( + primaryIdentityPublicKey !== null && + primaryIdentityPublicKey !== undefined, + 'primaryIdentityPublicKey must exist in logInAction', + ); const result = await this.props.logIn({ ...extraInfo, username: this.usernameInputText, password: this.passwordInputText, logInActionSource: logInActionSources.logInFromNativeForm, + primaryIdentityPublicKey: primaryIdentityPublicKey, }); this.props.setActiveAlert(false); await setNativeCredentials({