Skip to content

Comments

Add autoConnect to SquadsEmbeddedWalletAdapter#2

Open
jessupjn wants to merge 3 commits intoSquads-Protocol:mainfrom
jessupjn:main
Open

Add autoConnect to SquadsEmbeddedWalletAdapter#2
jessupjn wants to merge 3 commits intoSquads-Protocol:mainfrom
jessupjn:main

Conversation

@jessupjn
Copy link

@jessupjn jessupjn commented Dec 6, 2023

The following:

const wallets: Adapter[] = detectEmbeddedInSquadsIframe()
  ? [new SquadsEmbeddedWalletAdapter('https://iframe-preview.squads.so')]
  : [new PhantomWalletAdapter(), new SolflareWalletAdapter()];
return (
  <WalletProvider wallets={wallets} autoConnect>
    {props.children}
  </WalletProvider>
);

was giving me this error:

Type 'SquadsEmbeddedWalletAdapter[] | (PhantomWalletAdapter | SolflareWalletAdapter)[]' is not assignable to type 'Adapter[]'.
  Type 'SquadsEmbeddedWalletAdapter[]' is not assignable to type 'Adapter[]'.
    Type 'SquadsEmbeddedWalletAdapter' is not assignable to type 'Adapter'.
      Type 'SquadsEmbeddedWalletAdapter' is not assignable to type 'SignerWalletAdapter'.
        Property 'autoConnect' is missing in type 'SquadsEmbeddedWalletAdapter' but required in type 'WalletAdapterProps<string>'.

Changes were tested by importing my fork:

{
  ...
  "dependencies": {
    ...
    "@sqds/iframe-adapter": "github:jessupjn/iframe-adapter"
  }
}

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

Successfully merging this pull request may close these issues.

1 participant