Error when signing with Phantom wallet: Caused By: Error: signature must be base58 encoded: [object Object]
yukosgiti opened this issue · comments
Yüksel Kapan commented
// inside jsx component
const connection = new Connection("https://api.devnet.solana.com/");
const metaplex = new Metaplex(connection, { cluster: "devnet" }).use(
walletAdapterIdentity(wallet)
)
const handleClick = async (e: any) => {
if (!metaplex || !wallet.publicKey) return;
const { nft: collectionNft } = await metaplex.nfts().create({
name: "Test,
uri: "<pinata json url>",
sellerFeeBasisPoints: 0,
isCollection: true,
});
console.log({ collectionNft });
};
);
When user signs with phantom walet I get the following error:
What's wierd is the transaction still happens on the chain
Yüksel Kapan commented
I was using an older version of solana wallet related libraries. When I updated them to be the latest it fixed all the problems
"@solana/wallet-adapter-base"
"@solana/wallet-adapter-react"
"@solana/wallet-adapter-react-ui"
"@solana/wallet-adapter-wallets"
"@solana/web3.js"
"@project-serum/anchor"