refactor: Centralise Binance env config#3256
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cffe3fd16b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| */ | ||
| export function binanceCredentialsConfigured(): boolean { | ||
| const { apiKey, hmacKey, gckmsKeyName } = readBinanceCredentialConfig(); | ||
| return isDefined(apiKey) && (isDefined(hmacKey) || isDefined(gckmsKeyName)); |
There was a problem hiding this comment.
Validate GCKMS arg type before treating creds as configured
binanceCredentialsConfigured() now relies on isDefined(gckmsKeyName), but minimist can return non-string values (notably false for --no-binanceSecretKey). Because isDefined(false) is true, this path reports Binance credentials as complete even when no secret key name exists, so callers like hasBinanceRoute() can incorrectly enable Binance routes and later fail when getBinanceApiClient() tries to resolve a bogus GCKMS key.
Useful? React with 👍 / 👎.
No description provided.