Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property '_chainWallets' is protected but type 'MainWalletBase' is not a class derived from 'MainWalletBase'.ts #142

Closed
cryptoclans opened this issue Jan 17, 2023 · 1 comment

Comments

@cryptoclans
Copy link

cryptoclans commented Jan 17, 2023

I am using:


"@cosmos-kit/react": "^1.0.4",
"@cosmos-kit/core": "^1.0.3",
import { wallets as vectisWallets } from "@cosmos-kit/vectis";
import { wallets as wcv2Wallets } from "@cosmos-kit/walletconnect-v2";
import { wallets as cosmostationWallets } from "@cosmos-kit/cosmostation";
import { wallets as keplrWallets } from "@cosmos-kit/keplr";
import { wallets as leapWallets } from "@cosmos-kit/leap";

 <ChainProvider
                    chains={chains}
                    assetLists={assets}
                    signerOptions={signerOptions}
                    walletModal={getModal("simple_v2")}

                    // error here
                    wallets={[
                        ...wcv2Wallets,
                        ...keplrWallets,
                        ...cosmostationWallets,
                        ...leapWallets,
                        ...vectisWallets,
                    ]}
                >

The error I am getting is:


(property) wallets: MainWalletBase[]
Type '(WCWalletV2 | KeplrExtensionWallet | KeplrMobileWallet | CosmostationExtensionWallet | CosmostationMobileWallet | LeapExtensionWallet | VectisExtensionWallet)[]' is not assignable to type 'MainWalletBase[]'.
  Type 'WCWalletV2 | KeplrExtensionWallet | KeplrMobileWallet | CosmostationExtensionWallet | CosmostationMobileWallet | LeapExtensionWallet | VectisExtensionWallet' is not assignable to type 'MainWalletBase'.
    Type 'WCWalletV2' is not assignable to type 'MainWalletBase'.
      Property '_chainWallets' is protected but type 'MainWalletBase' is not a class derived from 'MainWalletBase'.ts(2322)

I think it is something I am doing wrong, just can't find what it might be!

@cryptoclans
Copy link
Author

Deleted node modules folder and reinstalled. Then the error went away.

Saw the same issue here which gave me the idea that a fresh install might fix it as I did use cosmos create app initially before updating versions.

cosmology-tech/create-cosmos-app#38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants