diff --git a/native/selectors/socket-selectors.js b/native/selectors/socket-selectors.js --- a/native/selectors/socket-selectors.js +++ b/native/selectors/socket-selectors.js @@ -18,6 +18,7 @@ } from 'lib/types/session-types.js'; import type { OneTimeKeyGenerator } from 'lib/types/socket-types.js'; +import { commCoreModule } from '../native-modules.js'; import { calendarActiveSelector } from '../navigation/nav-selectors.js'; import type { AppState } from '../redux/state-types.js'; import type { NavPlusRedux } from '../types/selector-types.js'; @@ -51,6 +52,16 @@ return str; } +async function getSignedIdentityKeysBlob(): Promise { + await commCoreModule.initializeCryptoAccount(); + const { blobPayload, signature } = await commCoreModule.getUserPublicKey(); + const signedIdentityKeysBlob: SignedIdentityKeysBlob = { + payload: blobPayload, + signature, + }; + return signedIdentityKeysBlob; +} + const nativeGetClientResponsesSelector: ( input: NavPlusRedux, ) => ( @@ -71,7 +82,7 @@ getClientResponsesFunc( calendarActive, oneTimeKeyGenerator, - null, + getSignedIdentityKeysBlob, serverRequests, ), );