From 5ee972aea2c49008afaca3a0ef130d720d5ff602 Mon Sep 17 00:00:00 2001 From: Loris Leiva Date: Mon, 29 Jul 2024 14:30:57 +0100 Subject: [PATCH] Generate client changes --- clients/js/src/generated/programs/computeBudget.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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; }