Skip to content

Commit 1832d8c

Browse files
committed
removed chain connection message
1 parent 5bb8f16 commit 1832d8c

File tree

4 files changed

+15
-24
lines changed

4 files changed

+15
-24
lines changed

packages/web/components/MegaMenu/MegaMenuHeader.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ export const MegaMenuHeader: React.FC = () => {
122122
>
123123
Connect
124124
</MetaButton>
125-
<Text color="red"> Mainnet Required</Text>
126125
</Stack>
127126
)}
128127
</Box>

packages/web/components/Setup/WizardPane.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const WizardPane = <T,>({
9595
} = useForm();
9696
const current = watch(field, existing);
9797
const dirty = current !== existing || dirtyFields[field];
98-
const { connecting, connected, connect } = useWeb3();
98+
const { connecting, connected, connect, chainId } = useWeb3();
9999
const toast = useToast();
100100

101101
useEffect(() => {
@@ -142,14 +142,18 @@ export const WizardPane = <T,>({
142142
[current, field, setValue],
143143
);
144144

145-
if (!connecting && !connected) {
145+
if ((!connecting && !connected) || chainId !== '0x1') {
146146
return (
147147
<Stack mt={['-12rem', '-8rem']}>
148148
<Image w="min(40rem, 100%)" maxW="130%" src={cursiveTitle} />
149149
<Box align="center" mt="10vh ! important">
150-
<MetaButton onClick={connect} px={[8, 12]}>
151-
Connect To Progress
152-
</MetaButton>
150+
{connecting || !connected ? (
151+
<MetaButton onClick={connect} px={[8, 12]} isLoading={connecting}>
152+
Connect To Progress
153+
</MetaButton>
154+
) : (
155+
<Text fontSize="xl">Please switch to Mainnet to continue</Text>
156+
)}
153157
</Box>
154158
<Flex justify="center" mt="2rem ! important">
155159
<Tooltip label="Join Our Discord" hasArrow>

packages/web/contexts/Web3Context.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export type Web3ContextType = {
2828
provider: Maybe<providers.Web3Provider>;
2929
ceramic: Maybe<CeramicApi>;
3030
address: Maybe<string>;
31-
chainId: Maybe<number>;
31+
chainId: Maybe<string>;
3232
authToken: Maybe<string>;
3333
connect: () => Promise<void>;
3434
disconnect: () => void;
@@ -102,7 +102,7 @@ type Web3State = {
102102
wallet: Maybe<Web3Modal>;
103103
provider: Maybe<providers.Web3Provider>;
104104
address: Maybe<string>;
105-
chainId: Maybe<number>;
105+
chainId: Maybe<string>;
106106
authToken: Maybe<string>;
107107
};
108108

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
1-
import { MegaMenu } from 'components/MegaMenu';
21
import { SetupDone } from 'components/Setup/SetupDone';
32
import { SetupProfile } from 'components/Setup/SetupProfile';
43
import { SetupContextProvider } from 'contexts/SetupContext';
5-
import { InferGetStaticPropsType } from 'next';
64
import React from 'react';
75

8-
export const getStaticProps = async () => ({
9-
props: {
10-
hideTopMenu: true,
11-
},
12-
});
13-
14-
export type DefaultSetupProps = InferGetStaticPropsType<typeof getStaticProps>;
15-
16-
const SetupComplete: React.FC<DefaultSetupProps> = () => (
6+
const SetupComplete: React.FC = () => (
177
<SetupContextProvider>
18-
<MegaMenu>
19-
<SetupProfile>
20-
<SetupDone />
21-
</SetupProfile>
22-
</MegaMenu>
8+
<SetupProfile>
9+
<SetupDone />
10+
</SetupProfile>
2311
</SetupContextProvider>
2412
);
2513
export default SetupComplete;

0 commit comments

Comments
 (0)