From 8d6d8583b4f489f23054681dd827460ffb372d8b Mon Sep 17 00:00:00 2001 From: Jordan Last Date: Tue, 19 Sep 2023 17:07:50 -0500 Subject: [PATCH] remove guard functions and fix threshold_ecdsa --- examples/guard_functions/src/guards.ts | 5 ----- src/lib_new/ic.ts | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/guard_functions/src/guards.ts b/examples/guard_functions/src/guards.ts index 773747dd91..5e2dce764c 100644 --- a/examples/guard_functions/src/guards.ts +++ b/examples/guard_functions/src/guards.ts @@ -42,11 +42,6 @@ export function throwCustomError() { ); } -export function preventUpgrades() { - console.log('preventUpgrades called'); - return 'Upgrades to this canister are disabled'; -} - export function returnNonStringErrValue() { console.log('nonStringErrValue called'); throw { badProp: 'Something other than a string' }; 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);