Page MenuHomePhabricator

D9584.id32358.diff
No OneTemporary

D9584.id32358.diff

diff --git a/native/account/siwe-hooks.js b/native/account/siwe-hooks.js
--- a/native/account/siwe-hooks.js
+++ b/native/account/siwe-hooks.js
@@ -31,7 +31,7 @@
const siweAuthCall = useServerCall(siweAuth);
const callSIWE = React.useCallback(
- async (message, signature, extraInfo, options) => {
+ async (message, signature, extraInfo, callServerEndpointOptions) => {
try {
return await siweAuthCall(
{
@@ -39,7 +39,7 @@
signature,
...extraInfo,
},
- options,
+ callServerEndpointOptions,
);
} catch (e) {
onFailure();
@@ -62,10 +62,12 @@
const dispatchActionPromise = useDispatchActionPromise();
return React.useCallback(
- async ({ message, signature }, options) => {
+ async ({ message, signature }, callServerEndpointOptions) => {
const extraInfo = await logInExtraInfo();
const initialNotificationsEncryptedMessage =
- await getInitialNotificationsEncryptedMessage(options);
+ await getInitialNotificationsEncryptedMessage({
+ callServerEndpointOptions,
+ });
const siwePromise = callSIWE(
message,
@@ -74,7 +76,7 @@
...extraInfo,
initialNotificationsEncryptedMessage,
},
- options,
+ callServerEndpointOptions,
);
dispatchActionPromise(
diff --git a/native/utils/crypto-utils.js b/native/utils/crypto-utils.js
--- a/native/utils/crypto-utils.js
+++ b/native/utils/crypto-utils.js
@@ -14,8 +14,11 @@
import { commCoreModule } from '../native-modules.js';
+type InitialNotifMessageOptions = {
+ +callServerEndpointOptions?: ?CallServerEndpointOptions,
+};
function useInitialNotificationsEncryptedMessage(): (
- callServerEndpointOptions?: ?CallServerEndpointOptions,
+ options?: ?InitialNotifMessageOptions,
) => Promise<string> {
const callGetOlmSessionInitializationData = useServerCall(
getOlmSessionInitializationData,
@@ -23,7 +26,8 @@
const dispatchActionPromise = useDispatchActionPromise();
return React.useCallback(
- async callServerEndpointOptions => {
+ async options => {
+ const callServerEndpointOptions = options?.callServerEndpointOptions;
const olmSessionDataPromise = callGetOlmSessionInitializationData(
callServerEndpointOptions,
);

File Metadata

Mime Type
text/plain
Expires
Wed, Oct 30, 4:15 PM (21 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2387590
Default Alt Text
D9584.id32358.diff (2 KB)

Event Timeline