client: Make sending a tx not panic and instead return an Error when signing fails - #3865
Merged
Merged
Conversation
|
@cryptopapi997 is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Author
jacobcreech
approved these changes
Oct 21, 2025
Collaborator
|
@cryptopapi997 Can you please take a look at the failed tests? |
Contributor
Author
|
@swaroop-osec Fixed now. Good one to find too! My PR didn't introduce a bug directly that was causing the test to fail, but took a codepath that wasn't tested before (calling |
jamie-osec
approved these changes
Oct 29, 2025
jamie-osec
reviewed
Oct 29, 2025
jacobcreech
approved these changes
Nov 20, 2025
akash-osec
pushed a commit
to akash-osec/anchor
that referenced
this pull request
Mar 25, 2026
…signing fails (otter-sec#3865) * . * changelog * switch error order * copy over changes from other branch * fix test * switch to solana-signer
akash-osec
pushed a commit
to akash-osec/anchor
that referenced
this pull request
Jul 25, 2026
…signing fails (otter-sec#3865) * . * changelog * switch error order * copy over changes from other branch * fix test * switch to solana-signer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It appears the reason why there were seemingly unused
Results being returned by a bunch of transaction sending related functions in #3563 is because a signing failure used to return an Error at some point in the past (nowadays it just panics). Personally, I'm not a fan of this, esp as without #3563 as a developer you'd assume if you get returned aResult, that if something goes wrong it'd be part of that.This PR makes it so. Alternatively, we could also add a comment above all functions calling
signed_transaction_with_blockhashthat indicates that this function will panic if signing fails, but I feel like aResultis more inline with how the rest of anchor handles this type of thing .