diff --git a/clients/js/src/generated/programs/computeBudget.ts b/clients/js/src/generated/programs/computeBudget.ts index 15788a1..cc712da 100644 --- a/clients/js/src/generated/programs/computeBudget.ts +++ b/clients/js/src/generated/programs/computeBudget.ts @@ -6,7 +6,12 @@ * @see https://github.com/kinobi-so/kinobi */ -import { containsBytes, getU8Encoder, type Address } from '@solana/web3.js'; +import { + containsBytes, + getU8Encoder, + type Address, + type ReadonlyUint8Array, +} from '@solana/web3.js'; import { type ParsedRequestHeapFrameInstruction, type ParsedRequestUnitsInstruction, @@ -27,10 +32,9 @@ export enum ComputeBudgetInstruction { } export function identifyComputeBudgetInstruction( - instruction: { data: Uint8Array } | Uint8Array + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array ): ComputeBudgetInstruction { - const data = - instruction instanceof Uint8Array ? instruction : instruction.data; + const data = 'data' in instruction ? instruction.data : instruction; if (containsBytes(data, getU8Encoder().encode(0), 0)) { return ComputeBudgetInstruction.RequestUnits; }