Skip to content

Commit

Permalink
webapp: remove unused vars
Browse files Browse the repository at this point in the history
  • Loading branch information
inciner8r committed Feb 22, 2024
1 parent 6ef2591 commit 7d41601
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 41 deletions.
2 changes: 0 additions & 2 deletions webapp/src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useNavigate } from "react-router-dom";
import { useContext, useEffect, useState } from "react";
import { AuthContext } from "../context/AuthContext";
import { useAccount, useSignMessage, useNetwork } from "wagmi";
import { getChallengeId, getToken } from "../modules/api";
import { useWallet } from "@aptos-labs/wallet-adapter-react";

Expand All @@ -12,7 +11,6 @@ const Header = () => {
const [message, setMessage] = useState<string>("");
const [challengeId, setChallengeId] = useState<string>("");
const [signature, setSignature] = useState<string | undefined>();
const { signMessageAsync } = useSignMessage();

const {
connect,
Expand Down
78 changes: 39 additions & 39 deletions webapp/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,48 @@ import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";

import "@rainbow-me/rainbowkit/styles.css";
import {
getDefaultWallets,
RainbowKitProvider,
midnightTheme,
} from "@rainbow-me/rainbowkit";
import { configureChains, createClient, WagmiConfig } from "wagmi";
import { mainnet, polygon, optimism, arbitrum, goerli } from "wagmi/chains";
import { publicProvider } from "wagmi/providers/public";
// import "@rainbow-me/rainbowkit/styles.css";
// import {
// getDefaultWallets,
// RainbowKitProvider,
// midnightTheme,
// } from "@rainbow-me/rainbowkit";
// import { configureChains, createClient, WagmiConfig } from "wagmi";
// import { mainnet, polygon, optimism, arbitrum, goerli } from "wagmi/chains";
// import { publicProvider } from "wagmi/providers/public";
import { AuthProvider } from "./context/AuthContext";
import { PetraWallet } from "petra-plugin-wallet-adapter";
import { AptosWalletAdapterProvider } from "@aptos-labs/wallet-adapter-react";

const { chains, provider, webSocketProvider } = configureChains(
[
mainnet,
polygon,
optimism,
arbitrum,
...(process.env.REACT_APP_ENABLE_TESTNETS === "true" ? [goerli] : []),
],
[publicProvider()]
);
// const { chains, provider, webSocketProvider } = configureChains(
// [
// mainnet,
// polygon,
// optimism,
// arbitrum,
// ...(process.env.REACT_APP_ENABLE_TESTNETS === "true" ? [goerli] : []),
// ],
// [publicProvider()]
// );

const { connectors } = getDefaultWallets({
appName: "Sotreus",
chains,
projectId: process.env.WALLET_CONNECT_PROJECT_ID,
});
// const { connectors } = getDefaultWallets({
// appName: "Sotreus",
// chains,
// projectId: process.env.WALLET_CONNECT_PROJECT_ID,
// });

const wagmiClient = createClient({
autoConnect: true,
connectors,
provider,
webSocketProvider,
});
// const wagmiClient = createClient({
// autoConnect: true,
// connectors,
// provider,
// webSocketProvider,
// });

const wallets = [new PetraWallet()];

ReactDOM.render(
<React.StrictMode>
<WagmiConfig client={wagmiClient}>
{/* <WagmiConfig client={wagmiClient}>
<RainbowKitProvider
modalSize="compact"
chains={chains}
Expand All @@ -55,14 +55,14 @@ ReactDOM.render(
fontStack: "system",
overlayBlur: "small",
})}
>
<AptosWalletAdapterProvider plugins={wallets} autoConnect={true}>
<AuthProvider>
<App />
</AuthProvider>
</AptosWalletAdapterProvider>
</RainbowKitProvider>
</WagmiConfig>
> */}
<AptosWalletAdapterProvider plugins={wallets} autoConnect={true}>
<AuthProvider>
<App />
</AuthProvider>
</AptosWalletAdapterProvider>
{/* </RainbowKitProvider>
</WagmiConfig> */}
</React.StrictMode>,
document.getElementById("root")
);

0 comments on commit 7d41601

Please sign in to comment.