0

Need a bit of help

I've been trying to complete a "cancel sell" operation using the instructions gotten from the magicEden Api

But the problem I keep facing is after signing the transaction

At the point of serializing

It returns "signature verification failed "

Been battling with it, so a little assistance will go a long way

below is a code snippet to better understand language used : typescript

// Make the request.
  const response = await fetch(endpointUrl, {
      method: 'GET',
      headers: headers,
    });

// Check the status code.
  if (response.status === 200) {
    // The request was successful.
      const data = await response.json();
      console.log(data);
      cancelIx = data
    } else {
      // The request failed.
      console.log('Request failed);
    }

let ix = Transaction.from(Buffer.from(cancelIx.txSigned.data))

// moving forward to sign and send transaction
let transaction = new Transaction()
transaction.add(ix)
const blockhash = (await connection.getRecentBlockhash()).blockhash
transaction.recentBlockhash = blockhashObj

if (clientWallet.publicKey) {
  transaction.feePayer = clientWallet.publicKey
} 

const signedTx = await clientWallet.signTransaction(transaction)
// point of failure
const rawTransaction = signedTx.serialize()
let options = {
  skipPreflight: true,
  commitment: "confirmed",
}
// Send the transaction
const signature = await connection.sendRawTransaction(rawTransaction, options)
random_dev
  • 153
  • 2
  • 9

0 Answers0