Skip to content

[Low] Hardcoded WebSocket URL — no environment-based override #86

Description

@ether-btc

Severity: Low

Location: src/heartbeat.ts:36 (WS_URL = "wss://api.moltlaunch.com/ws")

Description:
The WebSocket URL is hardcoded with no environment-based override. If the Moltlaunch API moves to a different host or if the agent needs to connect to a staging environment, the code requires a code change.

Suggested Fix:
Make the WebSocket URL configurable via config or environment variable:

const WS_URL = process.env.MLTL_WS_URL ?? "wss://api.moltlaunch.com/ws";

Apply the same pattern to getAgentByWallet in cli.ts which hardcodes https://api.moltlaunch.com.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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