-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
web3.js: partialSign breaks deserialized transactions #20743
Comments
We're having same issue, have you been able to get around it? |
For anyone who's interested in, we had some success with the below:
|
We were having success with this code block as well and is no longer working ^ |
This was working in @solana/web3.js version 1.31.0 and in all higher versions the workaround is broken. I believe this is due to this commit: solana-labs/solana-web3.js@410780a |
Actually, I'm going to reopen this until it's confirmed to be fixed by #23720 as well. |
#23720 has been merged and published in |
Maybe just revert this commit? change order of account depending on it's base58 representation in transaction looks very odd. e.g. it's very hard to sign offline transaction like here: As soon as serialize/deserialize problem was solved by #23720, we don't need to shuffle accounts by it's base58 names. |
Could you post the completed code here again? |
Closing this on the basis of #23720 having been merged; please reopen if there's more work to be done! |
I have the opposite error. signTransactions removes the partialSigned. This is a problem because wallet adaptors can't partial sign, they can only sign, which removes any partial sign done in a backend server. I had to do the opposite, sign using the wallet adapter, then serialize the transaction send it over to the backend, and then the backend partial signs using a private key and sends the transaction I can't do it the other way around, eg. i always have to end with partial sign and not sign. Because sign removes partial sign, which means i want have the wallet adaptor which does not have partial sign be the last. Am am i getting something wrong? |
@shirecoding , please don't necropost. The web3.js code isn't in this repository anymore 😞 |
Problem
Whenever
partialSign
is applied to a transaction that's been previously partially signed, serialized, and deserialized, it clears all existing signatures on the transaction:I tried various workarounds, for example taking signatures from
tx
and manually applying them todeserializedTx
, but doing it that way causes validation of those signatures to fail. This means it's not possible to applypartialSign
/addSignature
to transactions that have been deserialized from the wire, which is a serious limitation.Could someone recommend a workaround for this?
The text was updated successfully, but these errors were encountered: