Skip to content

Gateway - Solana wallet creation fails when nodeURL has leading whitespace #233

Open

Description

@rapcmia

Describe the bug

While adding a Solana wallet through the Gateway wallet flow, the request failed instead of creating the wallet. Gateway returned Endpoint URL must start with http: or https: from /wallet/add.

Image
#### HAPI logs
2026-09-11 00:17:42 | info |    Adding new wallet for chain: solana
2026-09-11 00:17:42 | error |   Unhandled error: {
  "error": "Endpoint URL must start with `http:` or `https:`.",
  "url": "/wallet/add",
  "params": {}
}

The configured solana-mainnet-beta nodeURL contained a leading space before https://. Gateway accepted this configuration but passed the untrimmed value to the Solana client, which rejected it while the connection was being initialized. Removing the leading space allows the endpoint to use the expected URL format. Gateway should trim surrounding whitespace or reject the value when the configuration is saved, before it can break wallet operations.

Image
Current shape:
  nodeURL: ' https://...'

Required shape:
  nodeURL: 'https://...'

This was found during QA testing after whitespace was accidentally added to the saved nodeURL. Solana is the confirmed reproduction. Ethereum was not tested, but the same mistake may affect Ethereum and other networks that accept a user-provided node URL, so those network configurations should be checked as well.

Fixed after i remove the whitespace

Image

Steps to reproduce bug

  1. Configure the Solana mainnet-beta nodeURL with a leading space before https://
  2. Save the network configuration
  3. Attempt to add a new Solana wallet
  4. Check the Gateway response or log for Endpoint URL must start with http: or https:

Activity

  1. cardosofede commented on Sep 11, 2026

    @cardosofede
    Contributor

    Thanks @rapcmia for the clear repro. Condor now strips surrounding whitespace from every string value in a Gateway network config before saving it from the dashboard, so a pasted https://... nodeURL reaches Gateway as https://...: hummingbot/condor@040bb73 (branch general_improvements). The Telegram flows already trimmed their input.

    Two things this doesn't cover:

    • A nodeURL that was already saved with a space stays broken until it's re-saved.
    • Writes that bypass Condor (direct Gateway API, Swagger, editing the YAML) can still store it.

    So Gateway should still trim or reject the value on save, as the issue suggests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions