Skip to content

DAPIClientError: There is no connection config for network 'mainnet' #2022

@jojobyte

Description

@jojobyte

Attempting to create a new client on mainnet throws an error.

Expected Behavior

it should start a client connected to mainnet

Current Behavior

new Dash.Client({ network: 'mainnet' }) throws DAPIClientError: There is no connection config for network 'mainnet'

Possible Solution

It appears https://github.com/dashpay/platform/blob/v1.0-dev/packages/js-dapi-client/lib/networkConfigs.js is missing any options for mainnet, adding some presumably would fix this, as the error comes from https://github.com/dashpay/platform/blob/v1.0-dev/packages/js-dapi-client/lib/dapiAddressProvider/createDAPIAddressProviderFromOptions.js#L101-L103

Steps to Reproduce

  1. npm install dash
  2. Add <script src="./node_modules/dash/dist/dash.min.js"></script> to html
  3. try to create a new client with new Dash.Client({ network: 'mainnet' })
  4. See DAPIClientError: There is no connection config for network 'mainnet' error in console

Context

Unable connect to mainnet.

Your Environment

Version used:

  "dependencies": {
    "dash": "^4.0.1"
  }

Metadata

Metadata

Assignees

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