0

I'm trying to make a buy on Magic Eden but when I try sendAndConfirmTransaction() I got:

Error: Signature Verification Failed

I am calling an API that sent me back the instruction for build the tx.

var status = await buyTx(input
).then((res) =>{
    const tx = solanaWeb3.Transaction.from(Buffer.from(res.data))
    console.log(tx)
    const sig = solanaWeb3.sendAndConfirmTransaction(conn, tx, [accountFromSeed])
    console.log(sig)
})

In the cosole.log(tx) I can see this in signatures making me think yhat is already signed by ME but only need my wallet signature:

Transaction {
  signatures: [
    { signature: null, publicKey: [PublicKey] },
    {
      signature: <Buffer  ... 14 more bytes>,
      publicKey: [PublicKey]
    }
  ],

1 Answer 1

0

The solution was to partialSign the tx and I was able to sign it without problems.

var status = await BuyTx(input
).then((res) =>{
  const tx = solanaWeb3.Transaction.from(Buffer.from(res.createBuyTx.data));
  tx.partialSign(accountFromSeed);
  console.log(tx);
})

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.