Page MenuHomePhabricator

D4963.diff
No OneTemporary

D4963.diff

diff --git a/landing/landing.react.js b/landing/landing.react.js
--- a/landing/landing.react.js
+++ b/landing/landing.react.js
@@ -9,7 +9,6 @@
import Keyservers from './keyservers.react';
import Privacy from './privacy.react';
import QR from './qr.react';
-import SIWE from './siwe.react';
import Support from './support.react';
import Team from './team.react';
import Terms from './terms.react';
@@ -40,8 +39,6 @@
return <QR />;
} else if (onTeam) {
return <Team />;
- } else if (onSIWE) {
- return <SIWE />;
} else {
return <AppLanding />;
}
diff --git a/landing/root.js b/landing/root.js
--- a/landing/root.js
+++ b/landing/root.js
@@ -30,13 +30,13 @@
function RootComponent() {
return (
- <WagmiConfig client={wagmiClient}>
- <RainbowKitProvider chains={chains}>
- <BrowserRouter basename={routerBasename}>
- <Landing />
- </BrowserRouter>
- </RainbowKitProvider>
- </WagmiConfig>
+ <BrowserRouter basename={routerBasename}>
+ <WagmiConfig client={wagmiClient}>
+ <RainbowKitProvider chains={chains}>
+ <Landing />
+ </RainbowKitProvider>
+ </WagmiConfig>
+ </BrowserRouter>
);
}
diff --git a/landing/siwe.react.js b/landing/siwe.react.js
--- a/landing/siwe.react.js
+++ b/landing/siwe.react.js
@@ -1,48 +1,49 @@
-// @flow
+// // @flow
-import { ConnectButton } from '@rainbow-me/rainbowkit';
-import * as React from 'react';
-import './siwe.css';
-import { SiweMessage } from 'siwe';
-import { useAccount, useSigner } from 'wagmi';
+// import { ConnectButton } from '@rainbow-me/rainbowkit';
+// import * as React from 'react';
+// import './siwe.css';
+// import { SiweMessage } from 'siwe';
+// import { useAccount, useSigner } from 'wagmi';
-function createSiweMessage(address, statement) {
- const domain = window.location.host;
- const origin = window.location.origin;
- const message = new SiweMessage({
- domain,
- address,
- statement,
- uri: origin,
- version: '1',
- chainId: '1',
- });
- return message.prepareMessage();
-}
-async function signInWithEthereum(address, signer) {
- const message = createSiweMessage(address, 'Sign in to Comm with Ethereum');
- const signedMessage = await signer.signMessage(message);
- window.postMessage?.(signedMessage);
- return signedMessage;
-}
+// function createSiweMessage(address, statement) {
+// const domain = window.location.host;
+// const origin = window.location.origin;
+// const message = new SiweMessage({
+// domain,
+// address,
+// statement,
+// uri: origin,
+// version: '1',
+// chainId: '1',
+// });
+// return message.prepareMessage();
+// }
-function SIWE(): React.Node {
- const { data } = useAccount();
- const { address } = data || {};
- const { data: signer } = useSigner();
- React.useEffect(() => {
- if (!address || !signer) {
- return;
- }
- signInWithEthereum(address, signer);
- }, [address, signer]);
- return (
- <div>
- <h1>SIWE</h1>
- <ConnectButton />
- </div>
- );
-}
+// async function signInWithEthereum(address, signer) {
+// const message = createSiweMessage(address, 'Sign in to Comm with Ethereum');
+// const signedMessage = await signer.signMessage(message);
+// window.postMessage?.(signedMessage);
+// return signedMessage;
+// }
-export default SIWE;
+// function SIWE(): React.Node {
+// const { data } = useAccount();
+// const { address } = data || {};
+// const { data: signer } = useSigner();
+// React.useEffect(() => {
+// if (!address || !signer) {
+// return;
+// }
+// signInWithEthereum(address, signer);
+// }, [address, signer]);
+// return (
+// <div>
+// <h1>SIWE</h1>
+// <ConnectButton />
+// </div>
+// );
+// }
+
+// export default SIWE;
diff --git a/native/navigation/root-navigator.react.js b/native/navigation/root-navigator.react.js
--- a/native/navigation/root-navigator.react.js
+++ b/native/navigation/root-navigator.react.js
@@ -38,7 +38,9 @@
SidebarListModalRouteName,
type ScreenParamList,
type RootParamList,
-} from './route-names';
+ SIWEModalRouteName,
+} from "./route-names";
+import {SIWEModal} from "../account/siwe-modal.react";
enableScreens();
@@ -139,9 +141,15 @@
>
<Root.Screen
name={LoggedOutModalRouteName}
- component={LoggedOutModal}
+ component={SIWEModal}
options={disableGesturesScreenOptions}
/>
+ <Root.Screen
+ name={SIWEModalRouteName}
+ component={SIWEModal}
+ options={modalOverlayScreenOptions}
+ />
+
<Root.Screen name={AppRouteName} component={AppNavigator} />
<Root.Screen
name={ThreadPickerModalRouteName}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 28, 4:33 PM (4 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2727448
Default Alt Text
D4963.diff (4 KB)

Event Timeline