@argonprotocol/mainchain 1.4.13-dev.6ac99b65 → 1.4.13-dev.94019742

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/browser/index.js CHANGED
@@ -7261,8 +7261,13 @@ async function waitForLoad() {
7261
7261
  await cryptoWaitReady();
7262
7262
  }
7263
7263
  async function getClient(host, options) {
7264
+ let provider;
7265
+ if (host.startsWith("http")) {
7266
+ provider = new HttpProvider(host);
7267
+ } else {
7268
+ provider = new WsProvider(host);
7269
+ }
7264
7270
  options ?? (options = {});
7265
- const provider = options.provider ?? (host.startsWith("http") ? new HttpProvider(host) : new WsProvider(host));
7266
7271
  options.metadata ?? (options.metadata = {});
7267
7272
  for (const genesisHash of Object.values(genesis_default)) {
7268
7273
  options.metadata[`${genesisHash}-${specVersion}`] = result;