Skip to content

fix(cli): default account funding to testnet#519

Open
parvahuja wants to merge 1 commit into
wevm:mainfrom
parvahuja:parv/mppx-cli-payment-ux
Open

fix(cli): default account funding to testnet#519
parvahuja wants to merge 1 commit into
wevm:mainfrom
parvahuja:parv/mppx-cli-payment-ux

Conversation

@parvahuja

Copy link
Copy Markdown

Summary

  • default account faucet funding to testnet when no network or RPC URL is specified
  • print a testnet funding command after account creation
  • return FUNDING_FAILED with exit code 1 for unstructured funding failures

Why

account fund is described as a testnet faucet command, but without --network testnet it currently resolves to mainnet. In a before smoke test, mppx account fund --account codex-cli-ux-before-1780948475 printed Funding ... on mainnet, failed against https://rpc.tempo.xyz, and still exited with status 0.

Validation

  • pnpm check
  • pnpm check:types
  • VITE_NODE_ENV=unit pnpm test --project cli src/cli/utils.test.ts
  • Fixed smoke: pnpm mppx account create --account codex-cli-ux-demo-1780948460; pnpm mppx account fund --account codex-cli-ux-demo-1780948460 printed Funding ... on testnet and completed successfully; account deleted
  • Explicit-mainnet failure smoke: pnpm mppx account fund --account codex-cli-ux-fail-1780948512 --network mainnet returned FUNDING_FAILED and exited 1; account deleted

Note: plain pnpm test src/cli/utils.test.ts without VITE_NODE_ENV=unit still tries to start Tempo localnet in this environment and fails with missing container runtime.

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