@0xsequence/relayer 0.43.15 → 0.43.17

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,11 +642,12 @@ 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
646
  class RpcRelayer extends BaseRelayer {
646
647
  constructor(options) {
647
648
  super(options);
648
649
  this.service = void 0;
649
- this.service = new Relayer(options.url, global.fetch);
650
+ this.service = new Relayer(options.url, fetch);
650
651
  }
651
652
  async waitReceipt(metaTxnId, delay = 1000, maxFails = 5, isCancelled) {
652
653
  if (typeof metaTxnId !== 'string') {
@@ -642,11 +642,12 @@ 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
646
  class RpcRelayer extends BaseRelayer {
646
647
  constructor(options) {
647
648
  super(options);
648
649
  this.service = void 0;
649
- this.service = new Relayer(options.url, global.fetch);
650
+ this.service = new Relayer(options.url, fetch);
650
651
  }
651
652
  async waitReceipt(metaTxnId, delay = 1000, maxFails = 5, isCancelled) {
652
653
  if (typeof metaTxnId !== 'string') {
@@ -638,11 +638,12 @@ 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
642
  class RpcRelayer extends BaseRelayer {
642
643
  constructor(options) {
643
644
  super(options);
644
645
  this.service = void 0;
645
- this.service = new Relayer(options.url, global.fetch);
646
+ this.service = new Relayer(options.url, fetch);
646
647
  }
647
648
  async waitReceipt(metaTxnId, delay = 1000, maxFails = 5, isCancelled) {
648
649
  if (typeof metaTxnId !== 'string') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/relayer",
3
- "version": "0.43.15",
3
+ "version": "0.43.17",
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,14 +9,14 @@
9
9
  "author": "Horizon Blockchain Games",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
- "@0xsequence/abi": "^0.43.15",
13
- "@0xsequence/config": "^0.43.15",
14
- "@0xsequence/network": "^0.43.15",
15
- "@0xsequence/transactions": "^0.43.15",
16
- "@0xsequence/utils": "^0.43.15"
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"
17
17
  },
18
18
  "peerDependencies": {
19
- "ethers": ">=5.5"
19
+ "ethers": ">=5.5 < 6"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@0xsequence/wallet-contracts": "1.10.0",
@@ -37,12 +37,14 @@ 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
41
+
40
42
  export class RpcRelayer extends BaseRelayer implements Relayer {
41
43
  private readonly service: proto.Relayer
42
44
 
43
45
  constructor(options: RpcRelayerOptions) {
44
46
  super(options)
45
- this.service = new proto.Relayer(options.url, global.fetch)
47
+ this.service = new proto.Relayer(options.url, fetch)
46
48
  }
47
49
 
48
50
  async waitReceipt(