Skip to content

Commit

Permalink
fix: remove extra number from return type of acirGetCircuitSizes (#…
Browse files Browse the repository at this point in the history
…9493)

Due to the use of `any` we're returning a `Promise<[number, number]>` in
a function which has the return type of `Promise<[number, number,
number]>`
  • Loading branch information
TomAFrench authored Nov 1, 2024
1 parent 4eef7e3 commit 1aef553
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions barretenberg/ts/src/barretenberg_api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,7 @@ export class BarretenbergApi {
return;
}

async acirGetCircuitSizes(
constraintSystemBuf: Uint8Array,
honkRecursion: boolean,
): Promise<[number, number, number]> {
async acirGetCircuitSizes(constraintSystemBuf: Uint8Array, honkRecursion: boolean): Promise<[number, number]> {
const inArgs = [constraintSystemBuf, honkRecursion].map(serializeBufferable);
const outTypes: OutputType[] = [NumberDeserializer(), NumberDeserializer()];
const result = await this.wasm.callWasmExport(
Expand All @@ -340,7 +337,7 @@ export class BarretenbergApi {
outTypes.map(t => t.SIZE_IN_BYTES),
);
const out = result.map((r, i) => outTypes[i].fromBuffer(r));
return out as any;
return out as [number, number];
}

async acirNewAcirComposer(sizeHint: number): Promise<Ptr> {
Expand Down

0 comments on commit 1aef553

Please sign in to comment.