@interest-protocol/vortex-sdk 7.2.0 → 7.3.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/utils/validate.ts"],"names":[],"mappings":"AA6NA,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAE3E;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAEjE"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/utils/validate.ts"],"names":[],"mappings":"AA8MA,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAE3E;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAEjE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interest-protocol/vortex-sdk",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "./dist/index.mjs",
@@ -18,11 +18,11 @@ interface ExpectedCommand {
18
18
  arguments: object[];
19
19
  };
20
20
  MakeMoveVec?: {
21
- elements: object[];
21
+ elements?: object[];
22
22
  };
23
23
  TransferObjects?: {
24
24
  objects: object[];
25
- address: object;
25
+ address?: object;
26
26
  };
27
27
  }
28
28
 
@@ -60,9 +60,7 @@ const EXPECTED_DEPOSIT_WITH_ACCOUNT_COMMANDS: ExpectedCommand[] = [
60
60
  },
61
61
  },
62
62
  {
63
- MakeMoveVec: {
64
- elements: [{ Input: 16 }],
65
- },
63
+ MakeMoveVec: {},
66
64
  },
67
65
  {
68
66
  MoveCall: {
@@ -81,7 +79,6 @@ const EXPECTED_DEPOSIT_WITH_ACCOUNT_COMMANDS: ExpectedCommand[] = [
81
79
  {
82
80
  TransferObjects: {
83
81
  objects: [{ Result: 3 }],
84
- address: { Input: 17 },
85
82
  },
86
83
  },
87
84
  ];
@@ -143,7 +140,6 @@ const EXPECTED_WITHDRAW_COMMANDS: ExpectedCommand[] = [
143
140
  {
144
141
  TransferObjects: {
145
142
  objects: [{ Result: 3 }],
146
- address: { Input: 15 },
147
143
  },
148
144
  },
149
145
  ];
@@ -186,14 +182,7 @@ function validateCommands(
186
182
  );
187
183
  } else if ('MakeMoveVec' in expected && expected.MakeMoveVec) {
188
184
  invariant('MakeMoveVec' in actual, `Command ${i}: Expected MakeMoveVec`);
189
- const actualMakeMoveVec = actual.MakeMoveVec as { elements: object[] };
190
- const expectedMakeMoveVec = expected.MakeMoveVec;
191
-
192
- invariant(
193
- JSON.stringify(actualMakeMoveVec.elements) ===
194
- JSON.stringify(expectedMakeMoveVec.elements),
195
- `Command ${i}: MakeMoveVec elements mismatch`
196
- );
185
+ // Skip detailed validation of MakeMoveVec elements as they vary based on coin count
197
186
  } else if ('TransferObjects' in expected && expected.TransferObjects) {
198
187
  invariant(
199
188
  'TransferObjects' in actual,
@@ -210,11 +199,7 @@ function validateCommands(
210
199
  JSON.stringify(expectedTransfer.objects),
211
200
  `Command ${i}: TransferObjects objects mismatch`
212
201
  );
213
- invariant(
214
- JSON.stringify(actualTransfer.address) ===
215
- JSON.stringify(expectedTransfer.address),
216
- `Command ${i}: TransferObjects address mismatch`
217
- );
202
+ // Skip address validation as input index varies based on coin count
218
203
  }
219
204
  }
220
205
  }