You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Im trying to write (I thought) a simple transaction which takes 1 SOL and sends back an NFT from a different wallet. As far as I understand, this is just 3 instructions and 2 signatures:
Transfer SOL from A to B
CreateAssociatedTokenAccount in A for NFT
Transfer NFT from B to A
This message is created server side. I then use CompileMessage() to compile the message to a byte array and send to the client. The client signs and sends the signed TX back. The server then checks the transaction is valid (hasnt been tampered with), signs and sends the transaction on chain.
Ive been working on this all weekend and keep getting the same error "Transaction signature verification failure". So, Ive commented everything out, except instruction 1 (transfer SOL from A to B). It worked. After several hours of un-comment and commenting later, Ive found something which has left me stumpped.
This works
byte[] signedClientTransaction = [ ...... This is the signed TX from the client ...... ];
var result = await _rpcClient.SendTransactionAsync(signedClientTransaction , commitment: Commitment.Finalized);
This fails with "Transaction signature verification failure"
byte[] signedClientTransaction = [ ...... This is the signed TX from the client ...... ];
var transaction = Transaction.Deserialize(signedClientTransaction);
signedClientTransaction = transaction.Serialize();
var result = await _rpcClient.SendTransactionAsync(signedClientTransaction , commitment: Commitment.Finalized);
Surely Deserializing and then Serializing the same transaction should do nothing? Am I missing something?
To Reproduce
See above
Expected behavior
I would expect deserializing and serializing the same transaction to have no effect.
Desktop (please complete the following information):
OS: Windows
Browser N/A
Version Latest
The text was updated successfully, but these errors were encountered:
Describe the bug
Im trying to write (I thought) a simple transaction which takes 1 SOL and sends back an NFT from a different wallet. As far as I understand, this is just 3 instructions and 2 signatures:
This message is created server side. I then use CompileMessage() to compile the message to a byte array and send to the client. The client signs and sends the signed TX back. The server then checks the transaction is valid (hasnt been tampered with), signs and sends the transaction on chain.
Ive been working on this all weekend and keep getting the same error "Transaction signature verification failure". So, Ive commented everything out, except instruction 1 (transfer SOL from A to B). It worked. After several hours of un-comment and commenting later, Ive found something which has left me stumpped.
This works
This fails with "Transaction signature verification failure"
Surely Deserializing and then Serializing the same transaction should do nothing? Am I missing something?
To Reproduce
See above
Expected behavior
I would expect deserializing and serializing the same transaction to have no effect.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: