@0xsequence/api 0.0.0-20240718140827 → 0.0.0-20240807210827

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.
@@ -851,7 +851,7 @@ const webrpcErrorByCode = {
851
851
  [3000]: NotFoundError
852
852
  };
853
853
 
854
- const fetch = typeof global === 'object' ? global.fetch : window.fetch;
854
+ const fetch = globalThis.fetch;
855
855
  class SequenceAPIClient extends API {
856
856
  constructor(hostname, projectAccessKey, jwtAuth) {
857
857
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
@@ -851,7 +851,7 @@ const webrpcErrorByCode = {
851
851
  [3000]: NotFoundError
852
852
  };
853
853
 
854
- const fetch = typeof global === 'object' ? global.fetch : window.fetch;
854
+ const fetch = globalThis.fetch;
855
855
  class SequenceAPIClient extends API {
856
856
  constructor(hostname, projectAccessKey, jwtAuth) {
857
857
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
@@ -847,7 +847,7 @@ const webrpcErrorByCode = {
847
847
  [3000]: NotFoundError
848
848
  };
849
849
 
850
- const fetch = typeof global === 'object' ? global.fetch : window.fetch;
850
+ const fetch = globalThis.fetch;
851
851
  class SequenceAPIClient extends API {
852
852
  constructor(hostname, projectAccessKey, jwtAuth) {
853
853
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/api",
3
- "version": "0.0.0-20240718140827",
3
+ "version": "0.0.0-20240807210827",
4
4
  "description": "api sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api",
6
6
  "source": "src/index.ts",
package/src/index.ts CHANGED
@@ -2,7 +2,7 @@ export * from './api.gen'
2
2
 
3
3
  import { API as ApiRpc } from './api.gen'
4
4
 
5
- const fetch = typeof global === 'object' ? global.fetch : window.fetch
5
+ const fetch = globalThis.fetch
6
6
 
7
7
  export class SequenceAPIClient extends ApiRpc {
8
8
  constructor(