From 0bbd2184d6f45885af366f82885cd783486eba5b Mon Sep 17 00:00:00 2001 From: Igor Loskutov Date: Mon, 26 Aug 2024 13:59:08 -0400 Subject: [PATCH] (typing) allow readonly array of wallets for WalletProvider --- packages/core/react/src/WalletProvider.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/react/src/WalletProvider.tsx b/packages/core/react/src/WalletProvider.tsx index be50c5d7f..c568d055f 100644 --- a/packages/core/react/src/WalletProvider.tsx +++ b/packages/core/react/src/WalletProvider.tsx @@ -16,7 +16,7 @@ import { WalletProviderBase } from './WalletProviderBase.js'; export interface WalletProviderProps { children: ReactNode; - wallets: Adapter[]; + wallets: readonly Adapter[]; autoConnect?: boolean | ((adapter: Adapter) => Promise); localStorageKey?: string; onError?: (error: WalletError, adapter?: Adapter) => void; @@ -49,7 +49,7 @@ export function WalletProvider({ onError, }: WalletProviderProps) { const { connection } = useConnection(); - const adaptersWithStandardAdapters = useStandardWalletAdapters(adapters); + const adaptersWithStandardAdapters = useStandardWalletAdapters(adapters as Adapter[]); const mobileWalletAdapter = useMemo(() => { if (!getIsMobile(adaptersWithStandardAdapters)) { return null;