@snapshot-labs/snapshot.js 0.11.14 → 0.11.16

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapshot-labs/snapshot.js",
3
- "version": "0.11.14",
3
+ "version": "0.11.16",
4
4
  "repository": "snapshot-labs/snapshot.js",
5
5
  "license": "MIT",
6
6
  "main": "dist/snapshot.cjs.js",
@@ -18,7 +18,7 @@
18
18
  "minLength": 0,
19
19
  "maxLengthWithSpaceType": {
20
20
  "default": 10000,
21
- "turbo": 20000
21
+ "turbo": 40000
22
22
  }
23
23
  },
24
24
  "discussion": {
package/src/sign/index.ts CHANGED
@@ -107,9 +107,11 @@ export default class Client {
107
107
  fetch(address, init)
108
108
  .then((res) => {
109
109
  if (res.ok) return resolve(res.json());
110
+ if (res.headers.get('content-type')?.includes('application/json'))
111
+ return res.json().then(reject).catch(reject);
110
112
  throw res;
111
113
  })
112
- .catch((e) => reject(e));
114
+ .catch(reject);
113
115
  });
114
116
  }
115
117