Page MenuHomePhabricator

D6124.diff
No OneTemporary

D6124.diff

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

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)

Event Timeline