diff --git a/tests/setup/health-checks.ts b/tests/setup/health-checks.ts index 3f1febb..22a6067 100644 --- a/tests/setup/health-checks.ts +++ b/tests/setup/health-checks.ts @@ -59,8 +59,8 @@ export async function checkRpcFunctional(rpcUrl: string, kraikenAddress?: string } // Step 2: Resolve the Kraiken address for the eth_call probe. - // Use the address supplied by the caller; fall back to deployments-local.json. - let resolvedKraikenAddress = kraikenAddress; + // Priority: caller-supplied address → STACK_KRAIKEN_ADDRESS env var → deployments-local.json. + let resolvedKraikenAddress = kraikenAddress ?? process.env.STACK_KRAIKEN_ADDRESS; if (!resolvedKraikenAddress) { const deploymentsPath = resolve(repoRoot, 'onchain', 'deployments-local.json');