diff --git a/src/helpers/connector.ts b/src/helpers/connector.ts index 1c01d94..4aaa261 100644 --- a/src/helpers/connector.ts +++ b/src/helpers/connector.ts @@ -1,10 +1,11 @@ import { + Connector, StarknetkitCompoundConnector, StarknetkitConnector, } from "../connectors" export function extractConnector( - connector: StarknetkitConnector | StarknetkitCompoundConnector, + connector: Connector | StarknetkitConnector | StarknetkitCompoundConnector, useFallback: boolean = false, ) { if ((connector as StarknetkitCompoundConnector).isCompoundConnector) { @@ -16,7 +17,11 @@ export function extractConnector( } export function findConnectorById( - connectors: (StarknetkitConnector | StarknetkitCompoundConnector)[], + connectors: ( + | Connector + | StarknetkitConnector + | StarknetkitCompoundConnector + )[], id: string | null, ) { const connector = connectors.find((c) => { diff --git a/src/helpers/mapModalWallets.ts b/src/helpers/mapModalWallets.ts index 45c5ace..08ac245 100644 --- a/src/helpers/mapModalWallets.ts +++ b/src/helpers/mapModalWallets.ts @@ -2,6 +2,7 @@ import { WalletProvider } from "@starknet-io/get-starknet-core" import { isString } from "lodash-es" import type { StarknetWindowObject } from "@starknet-io/types-js" import { + Connector, StarknetkitCompoundConnector, StarknetkitConnector, } from "../connectors/connector" @@ -12,7 +13,11 @@ import { extractConnector, findConnectorById } from "./connector" import { getStoreVersionFromBrowser } from "./getStoreVersionFromBrowser" interface SetConnectorsExpandedParams { - availableConnectors: (StarknetkitConnector | StarknetkitCompoundConnector)[] + availableConnectors: ( + | Connector + | StarknetkitConnector + | StarknetkitCompoundConnector + )[] installedWallets: StarknetWindowObject[] discoveryWallets: WalletProvider[] storeVersion: StoreVersion | null @@ -21,6 +26,7 @@ interface SetConnectorsExpandedParams { export function getModalWallet( connectorOrCompoundConnector: + | Connector | StarknetkitConnector | StarknetkitCompoundConnector, discoveryWallets?: WalletProvider[], diff --git a/src/types/modal.ts b/src/types/modal.ts index 8ad8c6c..2fb88fc 100644 --- a/src/types/modal.ts +++ b/src/types/modal.ts @@ -50,7 +50,7 @@ export type ModalWallet = { downloads?: Record subtitle?: string title?: string - connector: StarknetkitConnector | StarknetkitCompoundConnector + connector: Connector | StarknetkitConnector | StarknetkitCompoundConnector } export type Callback = (