espresso-cash-public
espresso-cash-public copied to clipboard
SignedTX.encode() builds different transaction bytes than web3.js
I'm trying to sign transaction that comes to me in base64 and already signed by one of signers. When I print bytes of transaction at has stub for my signature. I've decompiled it to bytes and signed. Then I got SignedTX class, call encode method and part of bytes with signature is the same in both ByteArrays, but then it's got shuffled. So basically, first signer have signed another ByteArray and it fails on sending.
Steps to reproduce the behavior:
- Create transaction with two signers using web3.js
- Sign with first signer and convert to base64
- Decompile this base64 to message and try to sign
- Send signed transaction and see error from solana
Expected behavior Transactions bytes are in the same order
I spent more time on it. Seems like method Message.compile() creates ByteArray in different order
Can you check this ticket?
https://github.com/cryptoplease/cryptoplease-dart/pull/184