Skip to content

fix: add ARC_TESTNET_RPC_KEY to .env.example and remove hardcoded fallback#29

Open
consumeobeydie wants to merge 1 commit into
circlefin:masterfrom
consumeobeydie:fix/arc-rpc-key-env-var
Open

fix: add ARC_TESTNET_RPC_KEY to .env.example and remove hardcoded fallback#29
consumeobeydie wants to merge 1 commit into
circlefin:masterfrom
consumeobeydie:fix/arc-rpc-key-env-var

Conversation

@consumeobeydie

Copy link
Copy Markdown

Problem

lib/circle/gateway-sdk.ts line 42 contains a hardcoded fallback RPC key:

const arcRpcKey = process.env.ARC_TESTNET_RPC_KEY || 'c0ca2582063a5bbd5db2f98c139775e982b16919';

This key is not documented in .env.example or README.md, so developers who clone the repo have no indication that this variable exists or that they should set it. The hardcoded fallback also means the key is exposed in the public repository.

Fix

  • Removed the hardcoded fallback value
  • Added a console.warn when ARC_TESTNET_RPC_KEY is not set
  • Added ARC_TESTNET_RPC_KEY to .env.example
  • Added ARC_TESTNET_RPC_KEY to the Environment Variables table in README.md

Changes

  • .env.example — added ARC_TESTNET_RPC_KEY=your-arc-testnet-rpc-key
  • lib/circle/gateway-sdk.ts — removed hardcoded fallback, added warning
  • README.md — documented the variable in the env vars table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant