Closed jojobyte closed 1 month ago
Attempting to create a new client on mainnet throws an error.
mainnet
it should start a client connected to mainnet
new Dash.Client({ network: 'mainnet' }) throws DAPIClientError: There is no connection config for network 'mainnet'
new Dash.Client({ network: 'mainnet' })
DAPIClientError: There is no connection config for network 'mainnet'
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
npm install dash
<script src="./node_modules/dash/dist/dash.min.js"></script>
Unable connect to mainnet.
Version used:
"dependencies": { "dash": "^4.0.1" }
It will be fixed in Platform 1.4
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' })
throwsDAPIClientError: 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-L103Steps to Reproduce
npm install dash
<script src="./node_modules/dash/dist/dash.min.js"></script>
to htmlnew Dash.Client({ network: 'mainnet' })
DAPIClientError: There is no connection config for network 'mainnet'
error in consoleContext
Unable connect to
mainnet
.Your Environment
Version used: