@snapshot-labs/snapshot.js 0.11.20 → 0.11.22

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/README.md CHANGED
@@ -48,9 +48,9 @@ yarn test:once
48
48
 
49
49
  ```bash
50
50
  # Format ABI
51
- ts-node scripts/abi.ts
51
+ yarn ts-node scripts/abi.ts
52
52
  # Generate hash for types
53
- ts-node scripts/generateHashWithTypes.ts
53
+ yarn ts-node scripts/generateHashWithTypes.ts
54
54
  ```
55
55
 
56
56
  ### License
@@ -60,11 +60,13 @@ export interface Vote {
60
60
  }
61
61
  export interface Follow {
62
62
  from?: string;
63
+ network?: string;
63
64
  space: string;
64
65
  timestamp?: number;
65
66
  }
66
67
  export interface Unfollow {
67
68
  from?: string;
69
+ network?: string;
68
70
  space: string;
69
71
  timestamp?: number;
70
72
  }
@@ -260,6 +260,7 @@ var voteString2Types = {
260
260
  var followTypes = {
261
261
  Follow: [
262
262
  { name: 'from', type: 'address' },
263
+ { name: 'network', type: 'string' },
263
264
  { name: 'space', type: 'string' },
264
265
  { name: 'timestamp', type: 'uint64' }
265
266
  ]
@@ -267,6 +268,7 @@ var followTypes = {
267
268
  var unfollowTypes = {
268
269
  Unfollow: [
269
270
  { name: 'from', type: 'address' },
271
+ { name: 'network', type: 'string' },
270
272
  { name: 'space', type: 'string' },
271
273
  { name: 'timestamp', type: 'uint64' }
272
274
  ]
@@ -364,7 +366,7 @@ var Client = /** @class */ (function () {
364
366
  if (!message.timestamp)
365
367
  message.timestamp = parseInt((Date.now() / 1e3).toFixed());
366
368
  domainData = __assign({}, domain);
367
- if (!((_a = window === null || window === void 0 ? void 0 : window.ethereum) === null || _a === void 0 ? void 0 : _a.isTrust)) return [3 /*break*/, 2];
369
+ if (!(typeof window !== 'undefined' && ((_a = window.ethereum) === null || _a === void 0 ? void 0 : _a.isTrust))) return [3 /*break*/, 2];
368
370
  _b = domainData;
369
371
  return [4 /*yield*/, signer.provider.getNetwork()];
370
372
  case 1:
@@ -250,6 +250,7 @@ var voteString2Types = {
250
250
  var followTypes = {
251
251
  Follow: [
252
252
  { name: 'from', type: 'address' },
253
+ { name: 'network', type: 'string' },
253
254
  { name: 'space', type: 'string' },
254
255
  { name: 'timestamp', type: 'uint64' }
255
256
  ]
@@ -257,6 +258,7 @@ var followTypes = {
257
258
  var unfollowTypes = {
258
259
  Unfollow: [
259
260
  { name: 'from', type: 'address' },
261
+ { name: 'network', type: 'string' },
260
262
  { name: 'space', type: 'string' },
261
263
  { name: 'timestamp', type: 'uint64' }
262
264
  ]
@@ -354,7 +356,7 @@ var Client = /** @class */ (function () {
354
356
  if (!message.timestamp)
355
357
  message.timestamp = parseInt((Date.now() / 1e3).toFixed());
356
358
  domainData = __assign({}, domain);
357
- if (!((_a = window === null || window === void 0 ? void 0 : window.ethereum) === null || _a === void 0 ? void 0 : _a.isTrust)) return [3 /*break*/, 2];
359
+ if (!(typeof window !== 'undefined' && ((_a = window.ethereum) === null || _a === void 0 ? void 0 : _a.isTrust))) return [3 /*break*/, 2];
358
360
  _b = domainData;
359
361
  return [4 /*yield*/, signer.provider.getNetwork()];
360
362
  case 1: