File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import {
25
25
isGroupMember
26
26
} from "../utils/api"
27
27
28
- const injectedConnector = new InjectedConnector ( { } )
28
+ const injectedConnector = new InjectedConnector ( { supportedChainIds : [ 5 ] } )
29
29
30
30
export default function HomePage ( ) : JSX . Element {
31
31
const [ _inviteCode , setInviteCode ] = useState < string > ( "" )
@@ -141,6 +141,11 @@ export default function HomePage(): JSX.Element {
141
141
[ account , library ]
142
142
)
143
143
144
+ // Define the error handling function
145
+ const handleError = ( error : Error ) => {
146
+ console . error ( "Error during activation:" , error )
147
+ }
148
+
144
149
return (
145
150
< Container maxW = "container.md" pt = "20" pb = "20" px = "8" centerContent >
146
151
< VStack spacing = "20" pb = "30px" w = "100%" >
@@ -184,7 +189,7 @@ export default function HomePage(): JSX.Element {
184
189
< Button
185
190
colorScheme = "secondary"
186
191
variant = "solid"
187
- onClick = { ( ) => activate ( injectedConnector ) }
192
+ onClick = { ( ) => activate ( injectedConnector , handleError ) }
188
193
>
189
194
Connect Metamask
190
195
</ Button >
You can’t perform that action at this time.
0 commit comments