Skip to content

Type 'SolanaExtension' is not assignable to type 'Extension<string>'. Types have separate declarations of a private property '__sdk_access_field_descriptors__'. #702

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

Open
enahs opened this issue Jan 24, 2024 · 1 comment

Comments

@enahs
Copy link

enahs commented Jan 24, 2024

โœ… Prerequisites

  • [x ] Did you perform a cursory search of open issues? Is this bug already reported elsewhere?
  • [x ] Are you running the latest SDK version? 22.0
  • [x ] Are you reporting to the correct repository (magic-sdk)?

๐Ÿ› Description

this is similar to #680 but obviously for solana.
Tested with the version in the [demo](Solana JavaScript Web3 example) and it works (magic-sdk 19.0.0 and magic-ext/solana 15.0.0 ) so definitely something broken here.

Per the solana integration documentation, this should work, but i get the following error from typescript:

Type 'SolanaExtension' is not assignable to type 'Extension'.
Types have separate declarations of a private property 'sdk_access_field_descriptors'

๐Ÿงฉ Steps to Reproduce

see description

๐Ÿค” Expected behavior

I expect to be able to login and get the solana wallet without an error

๐Ÿ˜ฎ Actual behavior

error causes build to break.

๐Ÿ’ป Code Sample

import { SolanaExtension } from "@magic-ext/solana";
import { Magic } from "magic-sdk";

const getMagic = () => {
  const MAGIC_LINK_PUBLISHABLE_KEY = process.env.NEXT_PUBLIC_MAGIC_LINK_PUBLISHABLE_KEY;

  try {
    const magic = new Magic(MAGIC_LINK_PUBLISHABLE_KEY, {
      extensions: [
        new SolanaExtension({
          rpcUrl: "RPC_URL_HERE",
        }),
      ],
    });
    return magic;
  } catch (err) {
    console.error(err);
  }
};
export default getMagic;

๐ŸŒŽ Environment

Software Version(s)
magic-sdk 22.0.0
magic-ext/solana 19.0.0
Browser
yarn
Operating System
@petermazzocco
Copy link

Any resolution to this?

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

No branches or pull requests

2 participants