From cb3d253556ae6258e999d28bf0ae42d89c541a2f Mon Sep 17 00:00:00 2001 From: Dan Steren Date: Thu, 21 Sep 2023 15:36:32 -0600 Subject: [PATCH] Wrap raw ArrayBuffer in Uint8Array view --- src/lib_new/ic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_new/ic.ts b/src/lib_new/ic.ts index 7fc84399b5..99af9b64de 100644 --- a/src/lib_new/ic.ts +++ b/src/lib_new/ic.ts @@ -564,7 +564,7 @@ export const ic: Ic = globalThis._azleIc }, caller: () => { const callerBytes = globalThis._azleIc.caller(); - return Principal.fromUint8Array(callerBytes); + return Principal.fromUint8Array(new Uint8Array(callerBytes)); }, candidDecode: (candidEncoded) => { return globalThis._azleIc.candidDecode(candidEncoded.buffer);