Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3097732
D9584.id32358.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D9584.id32358.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D9584: [native] Use object as param to getInitialNotificationsEncryptedMessage
Attached
Detach File
Event Timeline
Log In to Comment