From 45d6b0b0fe9b5a6db599e18dab90253fb3dbbaf4 Mon Sep 17 00:00:00 2001 From: BenRey <44082144+Ben-Rey@users.noreply.github.com> Date: Mon, 27 May 2024 14:21:12 +0200 Subject: [PATCH] fix type read only (#614) --- packages/massa-web3/src/experimental/client/publicAPI.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/massa-web3/src/experimental/client/publicAPI.ts b/packages/massa-web3/src/experimental/client/publicAPI.ts index 6ea70f36..a10ed26f 100644 --- a/packages/massa-web3/src/experimental/client/publicAPI.ts +++ b/packages/massa-web3/src/experimental/client/publicAPI.ts @@ -103,7 +103,8 @@ export class PublicAPI { } return { - value: (res.result.Ok as unknown as Uint8Array) ?? null, + // @ts-expect-error - wrong type returned by the API interface + value: new Uint8Array(res.result.Ok), info: { gasCost: res.gas_cost, error: res.result.Error,