Skip to content

defaultNetworks - Invalid network accepted when multiple entries are added #604

@rapcmia

Description

@rapcmia

Describe the bug

When testing #583, an invalid network value in defaultNetworks is correctly rejected when submitted individually, however validation fails when multiple networks are included allowing the invalid entry

#### # /config/update
curl -sS http://localhost:15888/config/update -H 'Content-Type: application/json' -u "XXX:XXX" -d '{"namespace":"ethereum","path":"defaultNetworks","value":["ralphhandsome","ralph_pure_awesomeness"]}' | jq
{
  "message": "Configuration updated successfully: 'ethereum.defaultNetworks' set to [\"ralphhandsome\",\"ralph_pure_awesomeness\"]"
}
logs: 2026-01-28 05:46:32 | info | 	Updating config path: ethereum.defaultNetworks with value: ["ralphhandsome","ralph_pure_awesomeness"]

#### /config/?namespace=ethereum
curl -sS "http://localhost:15888/config/?namespace=ethereum" -u "XXX:XXX" | jq
{
  "defaultNetwork": "arbitrum",
  "defaultWallet": "0x08940dc9B5a19FAb9319b77C61DDA7B8067E6843",
  "rpcProvider": "url",
  "defaultNetworks": [
    "ralphhandsome",
    "ralph_pure_awesomeness"
  ]
}

Steps to reproduce

  1. Run gateway config ethereum update defaultNetworks test01,test02,test03
  2. Or use the curl curl -sS http://localhost:15888/config/update and add two on defaultNetworks like sample above

Release version

dev-2.13

Type of installation

Source

Attach required files

n/a

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