magic-js
magic-js copied to clipboard
Type 'SolanaExtension' is not assignable to type 'Extension<string>'. Types have separate declarations of a private property '__sdk_access_field_descriptors__'.
✅ 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
🧩 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 |
Any resolution to this?