Description:
scripts/admin.ts's top-level program declares .option("-e, --env-file <path>", "Path to .env file"), but the register-importer command (and the pool/contractClient/platformKeypair it imports from apps/api/src/db.js and stellar.js) are instantiated at module load time from whatever .env dotenv already picked up, before the option is even parsed. Passing --env-file has no effect, silently connecting to the default DB/network instead of the one requested.
Acceptance Criteria:
Relevant Files:
scripts/admin.ts — declares --env-file but pool/contractClient/platformKeypair are imported eagerly before it's parsed
Description:
scripts/admin.ts's top-level program declares
.option("-e, --env-file <path>", "Path to .env file"), but the register-importer command (and the pool/contractClient/platformKeypair it imports from apps/api/src/db.js and stellar.js) are instantiated at module load time from whatever .env dotenv already picked up, before the option is even parsed. Passing --env-file has no effect, silently connecting to the default DB/network instead of the one requested.Acceptance Criteria:
Relevant Files:
scripts/admin.ts— declares --env-file but pool/contractClient/platformKeypair are imported eagerly before it's parsed