From 39cecebaaee2fb4592a229d36b61095fe3d92c77 Mon Sep 17 00:00:00 2001 From: "danny.kehu" Date: Fri, 22 Nov 2024 16:03:06 +0800 Subject: [PATCH] fix type errors --- templates/connect-chain/pages/_app.tsx | 2 ++ .../connect-multi-chain/components/wallet/Chain.tsx | 12 ++++++------ templates/connect-multi-chain/pages/_app.tsx | 2 ++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/templates/connect-chain/pages/_app.tsx b/templates/connect-chain/pages/_app.tsx index 25c82ebc4..6978fd891 100644 --- a/templates/connect-chain/pages/_app.tsx +++ b/templates/connect-chain/pages/_app.tsx @@ -24,7 +24,9 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) { return ( void; }; @@ -21,7 +21,7 @@ export type ChainSelectProps = { export function ChainSelect({ chainName, chains = [], - onChange = () => {}, + onChange = () => { }, }: ChainSelectProps) { const { themeClass } = useTheme(); const [value, setValue] = useState(); @@ -31,7 +31,7 @@ export function ChainSelect({ () => chains.reduce( (cache, chain) => ((cache[chain.chain_name] = chain), cache), - {} as Record + {} as Record ), [chains] ); @@ -60,7 +60,7 @@ export function ChainSelect({ if (chain) { setValue(chain.chain_name); - setInput(chain.pretty_name); + setInput(chain.pretty_name || ''); } } }, [chains, chainName]); @@ -123,7 +123,7 @@ export function ChainSelect({ > {options.map((option) => ( - + ))} diff --git a/templates/connect-multi-chain/pages/_app.tsx b/templates/connect-multi-chain/pages/_app.tsx index 0e031826f..c9624f378 100644 --- a/templates/connect-multi-chain/pages/_app.tsx +++ b/templates/connect-multi-chain/pages/_app.tsx @@ -24,7 +24,9 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) { return (