Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3342855
D6876.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D6876.diff
View Options
diff --git a/web/account/log-in-form.react.js b/web/account/log-in-form.react.js
--- a/web/account/log-in-form.react.js
+++ b/web/account/log-in-form.react.js
@@ -11,7 +11,7 @@
import SIWELoginForm from './siwe-login-form.react.js';
import TraditionalLoginForm from './traditional-login-form.react.js';
import OrBreak from '../components/or-break.react.js';
-import { setPrimaryIdentityPublicKey } from '../redux/primary-identity-public-key-reducer.js';
+import { setPrimaryIdentityKeys } from '../redux/primary-identity-public-key-reducer.js';
import { useSelector } from '../redux/redux-utils.js';
function LoginForm(): React.Node {
@@ -32,12 +32,14 @@
return;
}
await olm.init();
- const account = new olm.Account();
- account.create();
- const { ed25519 } = JSON.parse(account.identity_keys());
+ const identityAccount = new olm.Account();
+ identityAccount.create();
+ const { ed25519: identityED25519 } = JSON.parse(
+ identityAccount.identity_keys(),
+ );
dispatch({
- type: setPrimaryIdentityPublicKey,
- payload: ed25519,
+ type: setPrimaryIdentityKeys,
+ payload: identityED25519,
});
})();
}, [dispatch, primaryIdentityPublicKey]);
diff --git a/web/redux/primary-identity-public-key-reducer.js b/web/redux/primary-identity-public-key-reducer.js
--- a/web/redux/primary-identity-public-key-reducer.js
+++ b/web/redux/primary-identity-public-key-reducer.js
@@ -8,12 +8,12 @@
import type { Action } from './redux-setup.js';
-const setPrimaryIdentityPublicKey = 'SET_PRIMARY_IDENTITY_PUBLIC_KEY';
+const setPrimaryIdentityKeys = 'SET_PRIMARY_IDENTITY_KEYS';
function reducePrimaryIdentityPublicKey(
state: ?string,
action: Action,
): ?string {
- if (action.type === setPrimaryIdentityPublicKey) {
+ if (action.type === setPrimaryIdentityKeys) {
return action.payload;
} else if (
action.type === logOutActionTypes.success ||
@@ -26,4 +26,4 @@
return state;
}
-export { setPrimaryIdentityPublicKey, reducePrimaryIdentityPublicKey };
+export { setPrimaryIdentityKeys, reducePrimaryIdentityPublicKey };
diff --git a/web/redux/redux-setup.js b/web/redux/redux-setup.js
--- a/web/redux/redux-setup.js
+++ b/web/redux/redux-setup.js
@@ -43,7 +43,7 @@
import reduceNavInfo from './nav-reducer.js';
import {
reducePrimaryIdentityPublicKey,
- setPrimaryIdentityPublicKey,
+ setPrimaryIdentityKeys,
} from './primary-identity-public-key-reducer.js';
import { getVisibility } from './visibility.js';
import { filterThreadIDsBelongingToCommunity } from '../selectors/calendar-selectors.js';
@@ -99,7 +99,7 @@
type: 'SET_DEVICE_ID',
payload: string,
}
- | { +type: 'SET_PRIMARY_IDENTITY_PUBLIC_KEY', payload: ?string }
+ | { +type: 'SET_PRIMARY_IDENTITY_KEYS', payload: ?string }
| {
+type: 'UPDATE_CALENDAR_COMMUNITY_FILTER',
+payload: string,
@@ -184,7 +184,7 @@
if (
action.type !== updateNavInfoActionType &&
action.type !== setDeviceIDActionType &&
- action.type !== setPrimaryIdentityPublicKey
+ action.type !== setPrimaryIdentityKeys
) {
state = baseReducer(state, action).state;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 2:13 AM (18 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2567360
Default Alt Text
D6876.diff (3 KB)
Attached To
Mode
D6876: [web] Rename `setPrimaryIdentityPublicKey` to `setPrimaryIdentityKeys`
Attached
Detach File
Event Timeline
Log In to Comment