@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.
- package/dist/index.js +3 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -11
- package/dist/index.mjs.map +1 -1
- package/dist/utils/validate.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/utils/validate.ts +5 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/utils/validate.ts"],"names":[],"mappings":"
|
|
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
package/src/utils/validate.ts
CHANGED
|
@@ -18,11 +18,11 @@ interface ExpectedCommand {
|
|
|
18
18
|
arguments: object[];
|
|
19
19
|
};
|
|
20
20
|
MakeMoveVec?: {
|
|
21
|
-
elements
|
|
21
|
+
elements?: object[];
|
|
22
22
|
};
|
|
23
23
|
TransferObjects?: {
|
|
24
24
|
objects: object[];
|
|
25
|
-
address
|
|
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
|
-
|
|
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
|
-
|
|
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
|
}
|