Skip to content

Commit

Permalink
remove guard functions and fix threshold_ecdsa
Browse files Browse the repository at this point in the history
  • Loading branch information
lastmjs committed Sep 19, 2023
1 parent 1e6acc8 commit 8d6d858
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions examples/guard_functions/src/guards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' };
Expand Down
2 changes: 1 addition & 1 deletion src/lib_new/ic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8d6d858

Please sign in to comment.