I want to sign a transaction of a user from phantom wallet and then send the transaction through web3.js but after successfully signing the transaction the web3js library function sendRawTransaction() is giving error message in console
const signedTransaction = await window.solana.signTransaction(transaction);
const signature = await connection.sendRawTransaction(signedTransaction.serialize());
await connection.confirmTransaction(signature);