diff --git a/motoko/cert-var/frontend/src/actor.js b/motoko/cert-var/frontend/src/actor.js index d3098a6c28..1e3a8f8f07 100644 --- a/motoko/cert-var/frontend/src/actor.js +++ b/motoko/cert-var/frontend/src/actor.js @@ -17,7 +17,6 @@ if (!canisterId) { export const backend = createActor(canisterId, { agentOptions: { - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }, }); diff --git a/motoko/daily_planner/frontend/src/actor.js b/motoko/daily_planner/frontend/src/actor.js index 9667a63427..2faad99e50 100644 --- a/motoko/daily_planner/frontend/src/actor.js +++ b/motoko/daily_planner/frontend/src/actor.js @@ -17,7 +17,6 @@ if (!canisterId) { export const backend = createActor(canisterId, { agentOptions: { - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }, }); diff --git a/motoko/evm_block_explorer/frontend/src/actor.js b/motoko/evm_block_explorer/frontend/src/actor.js index 2deca93941..3e182773c5 100644 --- a/motoko/evm_block_explorer/frontend/src/actor.js +++ b/motoko/evm_block_explorer/frontend/src/actor.js @@ -18,7 +18,6 @@ if (!canisterId) { export const backend = createActor(canisterId, { agentOptions: { - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }, }); diff --git a/motoko/filevault/frontend/src/actor.js b/motoko/filevault/frontend/src/actor.js index f625439699..228e61c384 100644 --- a/motoko/filevault/frontend/src/actor.js +++ b/motoko/filevault/frontend/src/actor.js @@ -13,7 +13,6 @@ if (!canisterId) { } const agentOptions = { - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }; diff --git a/motoko/flying_ninja/frontend/src/actor.js b/motoko/flying_ninja/frontend/src/actor.js index 963914fc80..bec7dd52dc 100644 --- a/motoko/flying_ninja/frontend/src/actor.js +++ b/motoko/flying_ninja/frontend/src/actor.js @@ -18,7 +18,6 @@ if (!canisterId) { export const backend = createActor(canisterId, { agentOptions: { - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }, }); diff --git a/motoko/hello_world/frontend/src/actor.js b/motoko/hello_world/frontend/src/actor.js index f5a230e432..988da6f963 100644 --- a/motoko/hello_world/frontend/src/actor.js +++ b/motoko/hello_world/frontend/src/actor.js @@ -18,7 +18,6 @@ if (!canisterId) { export const backend = createActor(canisterId, { agentOptions: { - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }, }); diff --git a/motoko/ic-pos/frontend/src/actors.tsx b/motoko/ic-pos/frontend/src/actors.tsx index ed1e48ae7c..fc289063c5 100644 --- a/motoko/ic-pos/frontend/src/actors.tsx +++ b/motoko/ic-pos/frontend/src/actors.tsx @@ -5,7 +5,6 @@ import { IcrcLedgerCanister, IcrcIndexCanister } from "@icp-sdk/canisters/ledger import { createActor } from "./bindings/backend"; import { useAuth } from "./lib/auth"; import { - host, rootKey, backendCanisterId, icrc1LedgerCanisterId, @@ -22,7 +21,7 @@ export function useBackendActor() { const actor = useMemo( () => createActor(backendCanisterId, { - agentOptions: { host, rootKey, identity }, + agentOptions: { rootKey, identity }, }), [identity] ); @@ -35,7 +34,7 @@ export function useIcrcLedger() { const { identity } = useAuth(); return useMemo(() => { - const agent = HttpAgent.createSync({ host, rootKey, identity }); + const agent = HttpAgent.createSync({ rootKey, identity }); return IcrcLedgerCanister.create({ agent, canisterId: Principal.fromText(icrc1LedgerCanisterId), @@ -48,7 +47,7 @@ export function useIcrcIndex() { const { identity } = useAuth(); return useMemo(() => { - const agent = HttpAgent.createSync({ host, rootKey, identity }); + const agent = HttpAgent.createSync({ rootKey, identity }); return IcrcIndexCanister.create({ agent, canisterId: Principal.fromText(icrc1IndexCanisterId), diff --git a/motoko/ic-pos/frontend/src/lib/env.ts b/motoko/ic-pos/frontend/src/lib/env.ts index f7668fbbd5..cb968d5a96 100644 --- a/motoko/ic-pos/frontend/src/lib/env.ts +++ b/motoko/ic-pos/frontend/src/lib/env.ts @@ -34,8 +34,6 @@ export const icrc1IndexCanisterId = requireCanisterId( ); export const rootKey = env?.IC_ROOT_KEY; -export const host = window.location.origin; - export const isLocal = /localhost|127\.0\.0\.1/.test(window.location.hostname); // Internet Identity provider. Locally the network serves II at diff --git a/motoko/llm_chatbot/frontend/src/actor.js b/motoko/llm_chatbot/frontend/src/actor.js index 4b4bc18cd5..221d09ffd5 100644 --- a/motoko/llm_chatbot/frontend/src/actor.js +++ b/motoko/llm_chatbot/frontend/src/actor.js @@ -16,7 +16,6 @@ if (!canisterId) { export const backend = createActor(canisterId, { agentOptions: { - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }, }); diff --git a/motoko/random_maze/frontend/src/actor.js b/motoko/random_maze/frontend/src/actor.js index 9667a63427..2faad99e50 100644 --- a/motoko/random_maze/frontend/src/actor.js +++ b/motoko/random_maze/frontend/src/actor.js @@ -17,7 +17,6 @@ if (!canisterId) { export const backend = createActor(canisterId, { agentOptions: { - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }, }); diff --git a/motoko/superheroes/frontend/src/actor.js b/motoko/superheroes/frontend/src/actor.js index 9667a63427..2faad99e50 100644 --- a/motoko/superheroes/frontend/src/actor.js +++ b/motoko/superheroes/frontend/src/actor.js @@ -17,7 +17,6 @@ if (!canisterId) { export const backend = createActor(canisterId, { agentOptions: { - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }, }); diff --git a/motoko/vetkeys/basic_bls_signing/frontend/src/main.ts b/motoko/vetkeys/basic_bls_signing/frontend/src/main.ts index a2c4a5510e..c8b7d737da 100644 --- a/motoko/vetkeys/basic_bls_signing/frontend/src/main.ts +++ b/motoko/vetkeys/basic_bls_signing/frontend/src/main.ts @@ -27,7 +27,6 @@ async function getBasicBlsSigningActor(): Promise { } const agent = await HttpAgent.create({ identity: await authClient.getIdentity(), - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }); basicBlsSigningActor = createActor(canisterId, { agent }); diff --git a/motoko/vetkeys/basic_ibe/frontend/src/main.ts b/motoko/vetkeys/basic_ibe/frontend/src/main.ts index d37760c1bd..f906f58643 100644 --- a/motoko/vetkeys/basic_ibe/frontend/src/main.ts +++ b/motoko/vetkeys/basic_ibe/frontend/src/main.ts @@ -36,7 +36,6 @@ async function getBasicIbeActor(): Promise { const agent = await HttpAgent.create({ identity: await authClient.getIdentity(), - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }); basicIbeActor = createActor(canisterId, { agent }); diff --git a/motoko/vetkeys/basic_vetkd/frontend/src/main.js b/motoko/vetkeys/basic_vetkd/frontend/src/main.js index beeb81f019..1fda14dbaa 100644 --- a/motoko/vetkeys/basic_vetkd/frontend/src/main.js +++ b/motoko/vetkeys/basic_vetkd/frontend/src/main.js @@ -27,7 +27,6 @@ async function getActor() { if (!canisterId) throw new Error("Canister ID for backend is not set. Deploy first."); const agent = await HttpAgent.create({ identity: authClient ? await authClient.getIdentity() : undefined, - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }); backendActor = createActor(canisterId, { agent }); diff --git a/motoko/vetkeys/encrypted_notes_app_vetkd/frontend/src/lib/actor.ts b/motoko/vetkeys/encrypted_notes_app_vetkd/frontend/src/lib/actor.ts index d953820035..2aeb7169ac 100644 --- a/motoko/vetkeys/encrypted_notes_app_vetkd/frontend/src/lib/actor.ts +++ b/motoko/vetkeys/encrypted_notes_app_vetkd/frontend/src/lib/actor.ts @@ -12,7 +12,6 @@ export async function createActor(options?: { identity?: any }): Promise { } const agent = await HttpAgent.create({ identity: await authClient.getIdentity(), - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }); basicBlsSigningActor = createActor(canisterId, { agent }); diff --git a/rust/vetkeys/basic_ibe/frontend/src/main.ts b/rust/vetkeys/basic_ibe/frontend/src/main.ts index 84b586974d..0470fcff23 100644 --- a/rust/vetkeys/basic_ibe/frontend/src/main.ts +++ b/rust/vetkeys/basic_ibe/frontend/src/main.ts @@ -36,7 +36,6 @@ async function getBasicIbeActor(): Promise { const agent = await HttpAgent.create({ identity: await authClient.getIdentity(), - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }); basicIbeActor = createActor(canisterId, { agent }); diff --git a/rust/vetkeys/basic_timelock_ibe/frontend/src/main.ts b/rust/vetkeys/basic_timelock_ibe/frontend/src/main.ts index 71d23845bf..5bf2f852c6 100644 --- a/rust/vetkeys/basic_timelock_ibe/frontend/src/main.ts +++ b/rust/vetkeys/basic_timelock_ibe/frontend/src/main.ts @@ -30,7 +30,6 @@ async function getBasicTimelockIbeCanister(): Promise { const agent = await HttpAgent.create({ identity: await authClient.getIdentity(), - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }); diff --git a/rust/vetkeys/basic_vetkd/frontend/src/main.js b/rust/vetkeys/basic_vetkd/frontend/src/main.js index beeb81f019..1fda14dbaa 100644 --- a/rust/vetkeys/basic_vetkd/frontend/src/main.js +++ b/rust/vetkeys/basic_vetkd/frontend/src/main.js @@ -27,7 +27,6 @@ async function getActor() { if (!canisterId) throw new Error("Canister ID for backend is not set. Deploy first."); const agent = await HttpAgent.create({ identity: authClient ? await authClient.getIdentity() : undefined, - host: window.location.origin, rootKey: canisterEnv?.IC_ROOT_KEY, }); backendActor = createActor(canisterId, { agent }); diff --git a/rust/vetkeys/encrypted_notes_app_vetkd/frontend/src/lib/actor.ts b/rust/vetkeys/encrypted_notes_app_vetkd/frontend/src/lib/actor.ts index d953820035..2aeb7169ac 100644 --- a/rust/vetkeys/encrypted_notes_app_vetkd/frontend/src/lib/actor.ts +++ b/rust/vetkeys/encrypted_notes_app_vetkd/frontend/src/lib/actor.ts @@ -12,7 +12,6 @@ export async function createActor(options?: { identity?: any }): Promise