@0xsequence/guard 1.1.14 → 1.1.15

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.
@@ -202,13 +202,11 @@ class GuardSigner {
202
202
  this.requests.delete(id);
203
203
  }
204
204
  } catch (e) {
205
- console.log('in GuardSigner.evaluateRequest: ', e);
205
+ var _this$onError;
206
206
  // The guard signer may reject the request for a number of reasons
207
207
  // like for example, if it's being the first signer (it waits for other signers to sign first)
208
- if (e.cause.includes('signer does not match latest image hash')) {
209
- var _this$onError;
210
- (_this$onError = this.onError) == null ? void 0 : _this$onError.call(this, e);
211
- }
208
+ // We always forward the error here and filter on client side.
209
+ (_this$onError = this.onError) == null ? void 0 : _this$onError.call(this, e);
212
210
  }
213
211
  }
214
212
  suffix() {
@@ -202,13 +202,11 @@ class GuardSigner {
202
202
  this.requests.delete(id);
203
203
  }
204
204
  } catch (e) {
205
- console.log('in GuardSigner.evaluateRequest: ', e);
205
+ var _this$onError;
206
206
  // The guard signer may reject the request for a number of reasons
207
207
  // like for example, if it's being the first signer (it waits for other signers to sign first)
208
- if (e.cause.includes('signer does not match latest image hash')) {
209
- var _this$onError;
210
- (_this$onError = this.onError) == null ? void 0 : _this$onError.call(this, e);
211
- }
208
+ // We always forward the error here and filter on client side.
209
+ (_this$onError = this.onError) == null ? void 0 : _this$onError.call(this, e);
212
210
  }
213
211
  }
214
212
  suffix() {
@@ -198,13 +198,11 @@ class GuardSigner {
198
198
  this.requests.delete(id);
199
199
  }
200
200
  } catch (e) {
201
- console.log('in GuardSigner.evaluateRequest: ', e);
201
+ var _this$onError;
202
202
  // The guard signer may reject the request for a number of reasons
203
203
  // like for example, if it's being the first signer (it waits for other signers to sign first)
204
- if (e.cause.includes('signer does not match latest image hash')) {
205
- var _this$onError;
206
- (_this$onError = this.onError) == null ? void 0 : _this$onError.call(this, e);
207
- }
204
+ // We always forward the error here and filter on client side.
205
+ (_this$onError = this.onError) == null ? void 0 : _this$onError.call(this, e);
208
206
  }
209
207
  }
210
208
  suffix() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/guard",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "guard sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/guard",
6
6
  "source": "src/index.ts",
@@ -10,8 +10,8 @@
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "ethers": "^5.7.2",
13
- "@0xsequence/core": "1.1.14",
14
- "@0xsequence/signhub": "1.1.14"
13
+ "@0xsequence/core": "1.1.15",
14
+ "@0xsequence/signhub": "1.1.15"
15
15
  },
16
16
  "files": [
17
17
  "src",
package/src/signer.ts CHANGED
@@ -104,12 +104,10 @@ export class GuardSigner implements signers.SapientSigner {
104
104
  this.requests.delete(id)
105
105
  }
106
106
  } catch (e) {
107
- console.log('in GuardSigner.evaluateRequest: ', e)
108
107
  // The guard signer may reject the request for a number of reasons
109
108
  // like for example, if it's being the first signer (it waits for other signers to sign first)
110
- if (e.cause.includes('signer does not match latest image hash')) {
111
- this.onError?.(e)
112
- }
109
+ // We always forward the error here and filter on client side.
110
+ this.onError?.(e)
113
111
  }
114
112
  }
115
113