We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4ac52b commit 3e113c0Copy full SHA for 3e113c0
modules/sdk-coin-sol/src/lib/utils.ts
@@ -282,7 +282,11 @@ export function matchTransactionTypeByInstructionsOrder(
282
283
// Check instructions by order using the index.
284
for (const keyName of instructionsKeys) {
285
- const result = getInstructionType(instructionsCopy[instructionIndexes[keyName]]);
+ const index = instructionIndexes[keyName];
286
+ if (index >= instructionsCopy.length) {
287
+ return false;
288
+ }
289
+ const result = getInstructionType(instructionsCopy[index]);
290
if (result !== keyName) {
291
return false;
292
}
0 commit comments