diff --git a/web3.js/src/system-program.js b/web3.js/src/system-program.js index 9fbc2e924b..3ff5c79a28 100644 --- a/web3.js/src/system-program.js +++ b/web3.js/src/system-program.js @@ -471,9 +471,9 @@ export class SystemInstruction { * @private */ static checkKeyLength(keys: Array, expectedLength: number) { - if (keys.length !== expectedLength) { + if (keys.length < expectedLength) { throw new Error( - `invalid instruction; key length mismatch ${keys.length} != ${expectedLength}`, + `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`, ); } }