I have Magiceden API bearer token and using the buyNow endpoint
Which return Buffer data as in the picture.
I tried to create the Transaction like this:
const transactionME = Transaction.from(Buffer.from(data.ix.txSigned.data))
const transactionME = VersionedTransaction.deserialize(Buffer.from(data.ix.v0.txSigned.data))
Then sign like this using the wallet adapter:
const signedTxns = await signAllTransactions([transactionME])
Then send like this:
const signature = await sendTransaction(transaction, connection);
let sig = await conn.connection.sendRawTransaction(signedTxns[i].serialize(), preflightCommitment: "confirmed",skipPreflight: false})
But always getting the following error:
"Program log: AnchorError caused by account: seller_trade_state. Error Code: AccountNotInitialized. Error Number: 3012. Error Message: The program expected this account to be already initialized."
I even tried to create everything from IDL getting exactly the same error:
I really do not understand how to do it.