@0xsequence/metadata 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.
@@ -1182,7 +1182,7 @@ const webrpcErrorByCode = {
1182
1182
  [4001]: TokenDirectoryDisabledError
1183
1183
  };
1184
1184
 
1185
- const fetch = typeof global === 'object' ? global.fetch : window.fetch;
1185
+ const fetch = globalThis.fetch;
1186
1186
  class SequenceMetadata extends Metadata {
1187
1187
  constructor(hostname = 'https://metadata.sequence.app', projectAccessKey, jwtAuth) {
1188
1188
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
@@ -1182,7 +1182,7 @@ const webrpcErrorByCode = {
1182
1182
  [4001]: TokenDirectoryDisabledError
1183
1183
  };
1184
1184
 
1185
- const fetch = typeof global === 'object' ? global.fetch : window.fetch;
1185
+ const fetch = globalThis.fetch;
1186
1186
  class SequenceMetadata extends Metadata {
1187
1187
  constructor(hostname = 'https://metadata.sequence.app', projectAccessKey, jwtAuth) {
1188
1188
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
@@ -1178,7 +1178,7 @@ const webrpcErrorByCode = {
1178
1178
  [4001]: TokenDirectoryDisabledError
1179
1179
  };
1180
1180
 
1181
- const fetch = typeof global === 'object' ? global.fetch : window.fetch;
1181
+ const fetch = globalThis.fetch;
1182
1182
  class SequenceMetadata extends Metadata {
1183
1183
  constructor(hostname = 'https://metadata.sequence.app', projectAccessKey, jwtAuth) {
1184
1184
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/metadata",
3
- "version": "1.10.11",
3
+ "version": "1.10.13",
4
4
  "description": "metadata sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/metadata",
6
6
  "source": "src/index.ts",
package/src/index.ts CHANGED
@@ -2,7 +2,7 @@ export * from './metadata.gen'
2
2
 
3
3
  import { Metadata as MetadataRpc, Collections as CollectionsRpc } from './metadata.gen'
4
4
 
5
- const fetch = typeof global === 'object' ? global.fetch : window.fetch
5
+ const fetch = globalThis.fetch
6
6
 
7
7
  export class SequenceMetadata extends MetadataRpc {
8
8
  constructor(