Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3392095
D6124.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6124.diff
View Options
diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js
--- a/native/account/siwe-panel.react.js
+++ b/native/account/siwe-panel.react.js
@@ -20,6 +20,7 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils';
+import { commCoreModule } from '../native-modules';
import { NavContext } from '../navigation/navigation-context';
import { useSelector } from '../redux/redux-utils';
import { nativeLogInExtraInfoSelector } from '../selectors/account-selectors';
@@ -73,6 +74,10 @@
);
const [nonce, setNonce] = React.useState<?string>(null);
+ const [
+ primaryIdentityPublicKey,
+ setPrimaryIdentityPublicKey,
+ ] = React.useState<?string>(null);
React.useEffect(() => {
(async () => {
@@ -83,6 +88,9 @@
setNonce(response);
})(),
);
+ await commCoreModule.initializeCryptoAccount('PLACEHOLDER');
+ const { ed25519 } = await commCoreModule.getUserPublicKey();
+ setPrimaryIdentityPublicKey(ed25519);
})();
}, [dispatchActionPromise, getSIWENonceCall]);
@@ -178,9 +186,10 @@
uri: commSIWE,
headers: {
'siwe-nonce': nonce,
+ 'siwe-primary-identity-public-key': primaryIdentityPublicKey,
},
}),
- [nonce],
+ [nonce, primaryIdentityPublicKey],
);
const onWebViewLoaded = React.useCallback(() => {
@@ -215,7 +224,7 @@
);
let bottomSheet;
- if (nonce) {
+ if (nonce && primaryIdentityPublicKey) {
bottomSheet = (
<BottomSheet
snapPoints={snapPoints}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 1, 6:57 AM (10 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2604119
Default Alt Text
D6124.diff (1 KB)
Attached To
Mode
D6124: [native] Generate `primaryIdentityPublicKey` and pass to `landing/SIWE`
Attached
Detach File
Event Timeline
Log In to Comment