-
- (async () => {
- const actor = Actor.createActor(CandidService, {
- agent,
- canisterId: principalId,
- });
-
- try {
- const foundCandid =
- (await actor.__get_candid_interface_tmp_hack()) as string;
- console.log("candid loaded from endpoint");
- setCandidAndBindings(foundCandid);
- if (candid && foundCandid.trim() !== candid.trim()) {
- console.log("candid from endpoint is different from state!");
- console.log("endpoint", foundCandid);
- console.log("state", candid);
- }
- } catch (error) {
- console.warn("no candid found");
- }
- })();