Describe the bug
Anchor instructions named something_number where "number" is an integer fail from the client side with "Fallback instructions are not supported" as it derives the discriminator incorrectly.
To Reproduce
Name an instruction instruction_1 on the CIDL and try to call it.
Extension (mark with an X the extension):
- Solana Native [ ]
- Solana Anchor [x]
Solution
Match /_([0-9])*/ and replace by $(1). Basically, remove the last underscore if the instruction name finishes with _number.
Describe the bug
Anchor instructions named
something_numberwhere "number" is an integer fail from the client side with "Fallback instructions are not supported" as it derives the discriminator incorrectly.To Reproduce
Name an instruction
instruction_1on the CIDL and try to call it.Extension (mark with an X the extension):
Solution
Match
/_([0-9])*/and replace by$(1). Basically, remove the last underscore if the instruction name finishes with_number.