Skip to content

fix(cli): spread commonFlags on billing cancel (RND-567)#160

Open
mpjunior92 wants to merge 1 commit into
release/v1.0.0from
matheuspereirajunior/rnd-567-billing-cancel-flags
Open

fix(cli): spread commonFlags on billing cancel (RND-567)#160
mpjunior92 wants to merge 1 commit into
release/v1.0.0from
matheuspereirajunior/rnd-567-billing-cancel-flags

Conversation

@mpjunior92
Copy link
Copy Markdown
Contributor

@mpjunior92 mpjunior92 commented May 20, 2026

Summary

ecloud billing cancel cherry-picked only private-key and verbose from commonFlags, leaving --environment (and --rpc-url, --max-fee-per-gas, --max-priority-fee, --nonce) undeclared. That made the command unusable in CI / scripted flows: --environment sepolia-dev errored with Nonexistent flag: --environment, and ECLOUD_ENV=sepolia-dev was ignored because the env binding lives on commonFlags.environment.

This change spreads ...commonFlags like every other billing subcommand (status, subscribe, top-up, list-cards), keeping product and force flags on top.

Resolves RND-567.

Test plan

  • pnpm --filter @layr-labs/ecloud-cli run build:dev passes
  • pnpm --filter @layr-labs/ecloud-cli run typecheck clean for cancel.ts (only pre-existing unrelated test-globals errors)
  • eslint src/commands/billing/cancel.ts clean
  • ecloud billing cancel --help now lists --environment, --rpc-url, --max-fee-per-gas, --max-priority-fee, --nonce
  • Live: ecloud billing cancel --environment sepolia-dev --force --private-key … reaches the cancellation flow (no "Nonexistent flag" / "Cannot prompt")

The `billing cancel` command was cherry-picking only `private-key` and
`verbose` from commonFlags, leaving `--environment`, `--rpc-url`,
`--max-fee-per-gas`, `--max-priority-fee`, and `--nonce` undeclared.
This made the command unusable in CI/scripted flows because there was
no non-interactive way to pick the environment.

Spread `...commonFlags` like the other billing subcommands
(status, subscribe, top-up, list-cards) so all common flags are
accepted; keep `product` and `force` flags on top.
@mpjunior92 mpjunior92 self-assigned this May 20, 2026
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