Skip to content

fix(sdk-coin-sol): fall back to custom instruction on decode failure#9341

Merged
sachushaji merged 1 commit into
masterfrom
sachuabraham/scaas-10578-sdk-coin-sol-customtx-validation-crashes-on-undecodable
Jul 23, 2026
Merged

fix(sdk-coin-sol): fall back to custom instruction on decode failure#9341
sachushaji merged 1 commit into
masterfrom
sachuabraham/scaas-10578-sdk-coin-sol-customtx-validation-crashes-on-undecodable

Conversation

@sachushaji

Copy link
Copy Markdown
Contributor

decodeInstruction from @solana/spl-token cannot decode Token-2022 extension-family instructions (Pause, PermissionedBurn, transfer fee ops, ...) at any published version and throws
TokenInvalidInstructionTypeError, crashing customTx validation client- and server-side. Wrap the call in try/catch and return CustomInstruction, the same path already used for
decodable-but-unmapped instructions.

Ticket: SCAAS-10578

decodeInstruction from @solana/spl-token cannot decode Token-2022
extension-family instructions (Pause, PermissionedBurn, transfer fee
ops, ...) at any published version and throws
TokenInvalidInstructionTypeError, crashing customTx validation
client- and server-side. Wrap the call in try/catch and return
CustomInstruction, the same path already used for
decodable-but-unmapped instructions.

Ticket: SCAAS-10578
@linear-code

linear-code Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

SCAAS-10578

@sachushaji
sachushaji marked this pull request as ready for review July 23, 2026 13:54
@sachushaji
sachushaji requested a review from a team as a code owner July 23, 2026 13:54
@sachushaji
sachushaji merged commit e9fd851 into master Jul 23, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants