@snapshot-labs/snapshot.js 0.4.1 → 0.4.2

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.
@@ -31,6 +31,7 @@ export interface Vote {
31
31
  proposal: string;
32
32
  type: string;
33
33
  choice: number | number[] | string;
34
+ privacy?: string;
34
35
  }
35
36
  export interface Follow {
36
37
  from?: string;
@@ -353,7 +353,9 @@ var Client = /** @class */ (function () {
353
353
  type = type2 ? voteString2Types : voteStringTypes;
354
354
  message.choice = JSON.stringify(message.choice);
355
355
  }
356
- // @ts-ignore
356
+ if ((message === null || message === void 0 ? void 0 : message.privacy) === 'shutter')
357
+ type = type2 ? voteString2Types : voteStringTypes;
358
+ delete message.privacy;
357
359
  delete message.type;
358
360
  return [4 /*yield*/, this.sign(web3, address, message, type)];
359
361
  case 1: return [2 /*return*/, _a.sent()];
@@ -344,7 +344,9 @@ var Client = /** @class */ (function () {
344
344
  type = type2 ? voteString2Types : voteStringTypes;
345
345
  message.choice = JSON.stringify(message.choice);
346
346
  }
347
- // @ts-ignore
347
+ if ((message === null || message === void 0 ? void 0 : message.privacy) === 'shutter')
348
+ type = type2 ? voteString2Types : voteStringTypes;
349
+ delete message.privacy;
348
350
  delete message.type;
349
351
  return [4 /*yield*/, this.sign(web3, address, message, type)];
350
352
  case 1: return [2 /*return*/, _a.sent()];