@argonprotocol/mainchain 1.4.13-dev.b31b2822 → 1.4.13-dev.f1c9e746

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs CHANGED
@@ -7368,13 +7368,8 @@ async function waitForLoad() {
7368
7368
  await _utilcrypto.cryptoWaitReady.call(void 0, );
7369
7369
  }
7370
7370
  async function getClient(host, options) {
7371
- let provider;
7372
- if (host.startsWith("http")) {
7373
- provider = new (0, _api.HttpProvider)(host);
7374
- } else {
7375
- provider = new (0, _api.WsProvider)(host);
7376
- }
7377
7371
  options ??= {};
7372
+ const provider = _nullishCoalesce(options.provider, () => ( (host.startsWith("http") ? new (0, _api.HttpProvider)(host) : new (0, _api.WsProvider)(host))));
7378
7373
  options.metadata ??= {};
7379
7374
  for (const genesisHash of Object.values(genesis_default)) {
7380
7375
  options.metadata[`${genesisHash}-${specVersion}`] = result;