Skip to content

Commit

Permalink
chore: Remove connectkit button from navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
wryonik committed Oct 4, 2024
1 parent 8c7cc13 commit 110a949
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 39 deletions.
5 changes: 0 additions & 5 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import CloseIcon from "@mui/icons-material/Close";
import MailOutlineIcon from "@mui/icons-material/MailOutline";
import MenuIcon from "@mui/icons-material/Menu";
import { Dialog, Toolbar } from "@mui/material";
import { AppBar, Grid, IconButton, Slide } from "@mui/material/";
import Box from "@mui/material/Box";
import { useTheme } from "@mui/material/styles";
import { TransitionProps } from "@mui/material/transitions";
import Typography from "@mui/material/Typography";
import { ConnectKitButton } from "connectkit";
import React, { useState } from "react";
import { Link } from "react-router-dom";
import { Button } from "./Button";
Expand Down Expand Up @@ -152,7 +150,6 @@ const MobileNav = ({
>
Learn More
</Button>
<ConnectKitButton />
</Grid>
</Dialog>
);
Expand Down Expand Up @@ -234,7 +231,6 @@ const NavBar: React.FC = () => {
{NAV_LINKS.map((navLink) => {
return (
<Button
color="primary"
href={navLink.link}
target="_blank"
sx={{
Expand Down Expand Up @@ -300,7 +296,6 @@ const NavBar: React.FC = () => {
>
Learn More
</Button>
<ConnectKitButton />
</Box>
</Grid>
</Grid>
Expand Down
5 changes: 1 addition & 4 deletions src/components/RequestedRecoveries.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import MonetizationOnIcon from "@mui/icons-material/MonetizationOn";
import { Box, Grid, Typography } from "@mui/material";
import { useCallback, useContext, useEffect, useRef, useState } from "react";
import { useCallback, useEffect, useRef, useState } from "react";
import toast from "react-hot-toast";
import { useNavigate } from "react-router-dom";
import { encodeAbiParameters, encodeFunctionData } from "viem";
Expand All @@ -13,11 +13,9 @@ import Loader from "./Loader";
import { safeEmailRecoveryModule } from "../../contracts.base-sepolia.json";
import { safeAbi } from "../abi/Safe";
import { safeEmailRecoveryModuleAbi } from "../abi/SafeEmailRecoveryModule";
import { StepsContext } from "../App";
import cancelRecoveryIcon from "../assets/cancelRecoveryIcon.svg";
import completeRecoveryIcon from "../assets/completeRecoveryIcon.svg";
import infoIcon from "../assets/infoIcon.svg";
import { STEPS } from "../constants";
import { useAppContext } from "../context/AppContextHook";

import { config } from "../providers/config";
Expand All @@ -37,7 +35,6 @@ const RequestedRecoveries = () => {
const { writeContractAsync } = useWriteContract();
const { guardianEmail } = useAppContext();
const navigate = useNavigate();
const stepsContext = useContext(StepsContext);

const [newOwner, setNewOwner] = useState<string>();
const safeWalletAddress = address;
Expand Down
2 changes: 1 addition & 1 deletion src/components/burnerWallet/GuardianSetup.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
import {
Box,
Grid,
Expand Down Expand Up @@ -41,7 +42,6 @@ import { useGetSafeAccountAddress } from "../../utils/useGetSafeAccountAddress";
import { Button } from "../Button";
import InputField from "../InputField";
import Loader from "../Loader";
import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";

//logic for valid email address check for input
const isValidEmail = (email: string) => {
Expand Down
23 changes: 1 addition & 22 deletions src/components/burnerWallet/RequestedRecoveries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import { Box, Grid, Typography } from "@mui/material";
import { useCallback, useContext, useEffect, useRef, useState } from "react";
import toast from "react-hot-toast";
import { useNavigate } from "react-router-dom";
import { keccak256 } from "viem";
import { readContract } from "wagmi/actions";
import {
universalEmailRecoveryModule,
validatorsAddress,
} from "../../../contracts.base-sepolia.json";
import { safeAbi } from "../../abi/Safe";
import { abi as universalEmailRecoveryModuleAbi } from "../../abi/UniversalEmailRecoveryModule.json";
import { StepsContext } from "../../App";
import cancelRecoveryIcon from "../../assets/cancelRecoveryIcon.svg";
Expand All @@ -30,8 +29,6 @@ import { useGetSafeAccountAddress } from "../../utils/useGetSafeAccountAddress";
import { Button } from "../Button";
import InputField from "../InputField";
import Loader from "../Loader";
import { useReadContract } from "wagmi";
import { safeAbi } from "../../abi/Safe";

const BUTTON_STATES = {
TRIGGER_RECOVERY: "Trigger Recovery",
Expand Down Expand Up @@ -130,24 +127,6 @@ const RequestedRecoveries = () => {
throw new Error("safe owners data not found");
}

const prevOwner = getPreviousOwnerInLinkedList(
safeOwnersData[0],
safeOwnersData
);

const recoveryCallData = getRecoveryCallData(
prevOwner,
safeOwnersData[0],
newOwner
);

const recoveryData = getRecoveryData(
safeWalletAddress,
recoveryCallData
) as `0x${string}`;

const recoveryDataHash = keccak256(recoveryData);

// This function fetches the command template for the recoveryRequest API call. The command template will be in the following format: ['Recover', 'account', '{ethAddr}', 'using', 'recovery', 'hash', '{string}']
const command = (await readContract(config, {
abi: universalEmailRecoveryModuleAbi,
Expand Down
7 changes: 2 additions & 5 deletions src/components/burnerWallet/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ import {
WalletClient,
} from "viem";
import { createPublicClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { baseSepolia } from "viem/chains";
import {
universalEmailRecoveryModule,
validatorsAddress,
} from "../../../contracts.base-sepolia.json";
import { privateKeyToAccount } from "viem/accounts";
import { baseSepolia } from "viem/chains";
import { normalize } from "viem/ens"; // For ENS name normalization

export const publicClient = createPublicClient({
transport: http("https://sepolia.base.org"),
Expand Down Expand Up @@ -51,7 +49,6 @@ export async function run(
smartAccountClient: object,
guardianAddr: string
) {
const ownableValidatorAddress = validatorsAddress;
// Universal Email Recovery Module with
// ECDSAOwnedDKIMRegistry
// Verifier
Expand Down
3 changes: 1 addition & 2 deletions src/pages/landingPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import AccountBalanceWalletOutlinedIcon from "@mui/icons-material/AccountBalanceWalletOutlined";
import DraftsOutlinedIcon from "@mui/icons-material/DraftsOutlined";
import SwapHorizIcon from "@mui/icons-material/SwapHoriz";
import { Box, Grid, Typography, useTheme } from "@mui/material";
import { Grid, Typography, useTheme } from "@mui/material";
import { useContext, useState } from "react";
import toast from "react-hot-toast";
import { useNavigate } from "react-router-dom";
Expand Down

0 comments on commit 110a949

Please sign in to comment.