Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3114789
D4348.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
D4348.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,6 +9,7 @@
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';
@@ -24,6 +25,7 @@
const onKeyservers = useRouteMatch({ path: '/keyservers' });
const onQR = useRouteMatch({ path: '/qr' });
const onTeam = useRouteMatch({ path: '/team' });
+ const onSIWE = useRouteMatch({ path: '/siwe' });
const activePage = React.useMemo(() => {
if (onPrivacy) {
@@ -38,10 +40,12 @@
return <QR />;
} else if (onTeam) {
return <Team />;
+ } else if (onSIWE) {
+ return <SIWE />;
} else {
return <AppLanding />;
}
- }, [onKeyservers, onPrivacy, onSupport, onTerms, onTeam, onQR]);
+ }, [onKeyservers, onPrivacy, onSupport, onTerms, onTeam, onQR, onSIWE]);
let header;
if (!onQR) {
diff --git a/landing/root.js b/landing/root.js
--- a/landing/root.js
+++ b/landing/root.js
@@ -1,18 +1,46 @@
// @flow
+import { getDefaultWallets, RainbowKitProvider } from '@rainbow-me/rainbowkit';
import * as React from 'react';
import { hot } from 'react-hot-loader/root';
import { BrowserRouter } from 'react-router-dom';
+import '@rainbow-me/rainbowkit/dist/index.css';
+import { chain, configureChains, createClient, WagmiConfig } from 'wagmi';
+// import { alchemyProvider } from 'wagmi/providers/alchemy';
+import { publicProvider } from 'wagmi/providers/public';
import Landing from './landing.react';
+const { chains, provider } = configureChains(
+ [chain.mainnet, chain.polygon, chain.optimism, chain.arbitrum],
+ [
+ // alchemyProvider({ alchemyId: process.env.ALCHEMY_ID }),
+ publicProvider(),
+ ],
+);
+
+const { connectors } = getDefaultWallets({
+ appName: 'comm',
+ chains,
+});
+
+const wagmiClient = createClient({
+ autoConnect: true,
+ connectors,
+ provider,
+});
+
declare var routerBasename: string;
function RootComponent() {
return (
- <BrowserRouter basename={routerBasename}>
- <Landing />
- </BrowserRouter>
+ <WagmiConfig client={wagmiClient}>
+ <RainbowKitProvider chains={chains}>
+ <BrowserRouter basename={routerBasename}>
+ <Landing />
+ </BrowserRouter>
+ </RainbowKitProvider>
+ </WagmiConfig>
);
}
diff --git a/landing/siwe.css b/landing/siwe.css
new file mode 100644
--- /dev/null
+++ b/landing/siwe.css
@@ -0,0 +1,11 @@
+div {
+ justify-content: center;
+ align-content: center;
+ padding-top: 20px;
+ padding-bottom: 50px;
+}
+
+h1 {
+ text-align: center;
+ margin-bottom: 20px;
+}
diff --git a/landing/siwe.react.js b/landing/siwe.react.js
new file mode 100644
--- /dev/null
+++ b/landing/siwe.react.js
@@ -0,0 +1,16 @@
+// @flow
+
+import { ConnectButton } from '@rainbow-me/rainbowkit';
+import * as React from 'react';
+import './siwe.css';
+
+function SIWE(): React.Node {
+ return (
+ <div>
+ <h1>SIWE</h1>
+ <ConnectButton />
+ </div>
+ );
+}
+
+export default SIWE;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 1, 8:44 PM (22 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2401333
Default Alt Text
D4348.diff (3 KB)
Attached To
Mode
D4348: Summary: added boilerplate for SIWE
Attached
Detach File
Event Timeline
Log In to Comment