File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ import {
1313
1414export function ChainSelector ( ) {
1515 const { chainId } = useUserStore ( ) ;
16- const [ selectedChainId , setSelectedChainId ] = useState < string | undefined > (
17- chainId ? .toString ( )
16+ const [ selectedChainId , setSelectedChainId ] = useState < string > (
17+ chainId . toString ( ) ,
1818 ) ;
1919
2020 useEffect ( ( ) => {
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ type UserState = {
1212 setInitialized : ( isInitialized : boolean ) => void ;
1313 address : Address | undefined ;
1414 setAddress : ( param : Address | undefined ) => void ;
15- chainId : number | undefined ;
16- setChainId : ( param : number | undefined ) => void ;
15+ chainId : number ;
16+ setChainId : ( param : number ) => void ;
1717 subgraphUrl : string ;
1818 setSubgraphUrl : ( param : string ) => void ;
1919} ;
@@ -29,7 +29,7 @@ const useUserStore = create<UserState>((set) => ({
2929 setAddress : ( address : Address | undefined ) => {
3030 set ( { address : address ?. toLowerCase ( ) as Address } ) ;
3131 } ,
32- chainId : undefined ,
32+ chainId : SUPPORTED_CHAINS [ 0 ] . id ,
3333 setChainId : ( chainId : number | undefined ) => {
3434 set ( { chainId : chainId } ) ;
3535 } ,
You can’t perform that action at this time.
0 commit comments