Skip to content

[BUG] --env mainnet error message references 'polkadot' instead of 'mainnet' #268

@ottovlotto

Description

@ottovlotto

Severity: UX friction (P2)
Reported by: DevEx Audit External
Source: DevEx Audit (External), 3 June 2026

Symptom

Bug: --env mainnet error message says polkadot not mainnet
Location: src/config.ts::resolveLegacyEnv + error message in getChainConfig()

--env mainnet is a documented alias that maps to polkadot. When the error fires, it references the mapped name rather than what the user typed, producing a confusing message.

Actual output:
✖ --env polkadot is not yet supported. Use --env paseo-next-v2 (default). Supported envs in this build: paseo-next-v2

Expected: --env mainnet is not yet supported. Use --env paseo-next-v2 (default).
The error should reference the argument the user actually passed, not the resolved internal name.

Reproduction

DOT_DEPLOY_VERBOSE=1 DOT_MEMORY_TRACE=1 playground deploy --signer dev --domain test --buildDir dist \
  --playground --env mainnet --suri //Alice --no-build 2> >(tee dot.log >&2)

Observe error references "polkadot" not "mainnet".

Recommended fix / next steps

  • In src/config.ts::resolveLegacyEnv, preserve the user-provided arg alongside the resolved internal name.
  • In getChainConfig(), emit the error using the user-provided arg so the message matches what they typed.
  • Location precision provided by auditor: src/config.ts::resolveLegacyEnv + error message in getChainConfig().

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions