@0xsequence/indexer 1.10.11 → 1.10.13

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.
@@ -819,7 +819,7 @@ const webrpcErrorByCode = {
819
819
  [3003]: MetadataCallFailedError
820
820
  };
821
821
 
822
- const fetch = typeof global === 'object' ? global.fetch : window.fetch;
822
+ const fetch = globalThis.fetch;
823
823
  class SequenceIndexer extends Indexer {
824
824
  constructor(hostname, projectAccessKey, jwtAuth) {
825
825
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
@@ -819,7 +819,7 @@ const webrpcErrorByCode = {
819
819
  [3003]: MetadataCallFailedError
820
820
  };
821
821
 
822
- const fetch = typeof global === 'object' ? global.fetch : window.fetch;
822
+ const fetch = globalThis.fetch;
823
823
  class SequenceIndexer extends Indexer {
824
824
  constructor(hostname, projectAccessKey, jwtAuth) {
825
825
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
@@ -815,7 +815,7 @@ const webrpcErrorByCode = {
815
815
  [3003]: MetadataCallFailedError
816
816
  };
817
817
 
818
- const fetch = typeof global === 'object' ? global.fetch : window.fetch;
818
+ const fetch = globalThis.fetch;
819
819
  class SequenceIndexer extends Indexer {
820
820
  constructor(hostname, projectAccessKey, jwtAuth) {
821
821
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/indexer",
3
- "version": "1.10.11",
3
+ "version": "1.10.13",
4
4
  "description": "indexer sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/indexer",
6
6
  "source": "src/index.ts",
package/src/index.ts CHANGED
@@ -2,7 +2,7 @@ export * from './indexer.gen'
2
2
 
3
3
  import { Indexer as IndexerRpc } from './indexer.gen'
4
4
 
5
- const fetch = typeof global === 'object' ? global.fetch : window.fetch
5
+ const fetch = globalThis.fetch
6
6
 
7
7
  export class SequenceIndexer extends IndexerRpc {
8
8
  constructor(