Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3346842
D4963.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D4963.id.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 10:03 AM (15 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2570161
Default Alt Text
D4963.id.diff (4 KB)
Attached To
Mode
D4963: [landing] revert changes in D4510
Attached
Detach File
Event Timeline
Log In to Comment