Please help fix an issue with phantom wallet
here is my code
It's writing not enough solana, but I have enough
var transaction = new solanaWeb3.Transaction().add(
solanaWeb3.SystemProgram.transfer({
fromPubkey: fromWallet,
toPubkey: toWallet,
lamports: 100
}),
);
transaction.feePayer = await provider.publicKey;
let blockhashObj = await connection.getRecentBlockhash();
transaction.recentBlockhash = await blockhashObj.blockhash;
// Transaction constructor initialized successfully
if(transaction) {
console.log("Txn created successfully");
}
const { signature } = await provider.signAndSendTransaction(transaction);
console.log("SIGNATURE", signature);
console.log("SUCCESS");