@0xsequence/relayer 0.43.17 → 0.43.18

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.
@@ -642,7 +642,7 @@ const FAILED_STATUSES = [ETHTxnStatus.DROPPED, ETHTxnStatus.PARTIALLY_FAILED, ET
642
642
  function isRpcRelayerOptions(obj) {
643
643
  return obj.url !== undefined && typeof obj.url === 'string';
644
644
  }
645
- const fetch = global.fetch ;
645
+ const fetch = typeof global === 'object' ? global.fetch : window.fetch;
646
646
  class RpcRelayer extends BaseRelayer {
647
647
  constructor(options) {
648
648
  super(options);
@@ -642,7 +642,7 @@ const FAILED_STATUSES = [ETHTxnStatus.DROPPED, ETHTxnStatus.PARTIALLY_FAILED, ET
642
642
  function isRpcRelayerOptions(obj) {
643
643
  return obj.url !== undefined && typeof obj.url === 'string';
644
644
  }
645
- const fetch = global.fetch ;
645
+ const fetch = typeof global === 'object' ? global.fetch : window.fetch;
646
646
  class RpcRelayer extends BaseRelayer {
647
647
  constructor(options) {
648
648
  super(options);
@@ -638,7 +638,7 @@ const FAILED_STATUSES = [ETHTxnStatus.DROPPED, ETHTxnStatus.PARTIALLY_FAILED, ET
638
638
  function isRpcRelayerOptions(obj) {
639
639
  return obj.url !== undefined && typeof obj.url === 'string';
640
640
  }
641
- const fetch = global.fetch ;
641
+ const fetch = typeof global === 'object' ? global.fetch : window.fetch;
642
642
  class RpcRelayer extends BaseRelayer {
643
643
  constructor(options) {
644
644
  super(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/relayer",
3
- "version": "0.43.17",
3
+ "version": "0.43.18",
4
4
  "description": "relayer sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/relayer",
6
6
  "source": "src/index.ts",
@@ -9,11 +9,11 @@
9
9
  "author": "Horizon Blockchain Games",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
- "@0xsequence/abi": "^0.43.17",
13
- "@0xsequence/config": "^0.43.17",
14
- "@0xsequence/network": "^0.43.17",
15
- "@0xsequence/transactions": "^0.43.17",
16
- "@0xsequence/utils": "^0.43.17"
12
+ "@0xsequence/abi": "^0.43.18",
13
+ "@0xsequence/config": "^0.43.18",
14
+ "@0xsequence/network": "^0.43.18",
15
+ "@0xsequence/transactions": "^0.43.18",
16
+ "@0xsequence/utils": "^0.43.18"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "ethers": ">=5.5 < 6"
@@ -37,7 +37,7 @@ export function isRpcRelayerOptions(obj: any): obj is RpcRelayerOptions {
37
37
  return obj.url !== undefined && typeof obj.url === 'string'
38
38
  }
39
39
 
40
- const fetch = typeof 'global' !== undefined ? global.fetch : window.fetch
40
+ const fetch = typeof global === 'object' ? global.fetch : window.fetch
41
41
 
42
42
  export class RpcRelayer extends BaseRelayer implements Relayer {
43
43
  private readonly service: proto.Relayer