@typus/typus-perp-sdk 1.0.13 → 1.0.15

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/src/fetch.js CHANGED
@@ -319,6 +319,12 @@ function getUserStake(config, user) {
319
319
  case 0:
320
320
  provider = new client_1.SuiClient({ url: config.rpcEndpoint });
321
321
  tx = new transactions_1.Transaction();
322
+ (0, functions_2.allocateIncentive)(tx, {
323
+ version: _1.STAKE_POOL_VERSION,
324
+ registry: _1.STAKE_POOL,
325
+ index: BigInt(0),
326
+ clock: constants_1.CLOCK,
327
+ });
322
328
  (0, functions_2.getUserShares)(tx, {
323
329
  registry: _1.STAKE_POOL,
324
330
  index: BigInt(0),
@@ -329,7 +335,7 @@ function getUserStake(config, user) {
329
335
  res = _a.sent();
330
336
  // console.log(res);
331
337
  if (res.results) {
332
- returnValues = res.results[0].returnValues[0][0];
338
+ returnValues = res.results[1].returnValues[0][0];
333
339
  reader = new bcs_1.BcsReader(new Uint8Array(returnValues));
334
340
  lpShares_1 = [];
335
341
  reader.readVec(function (reader) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typus/typus-perp-sdk",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "repository": "https://github.com/Typus-Lab/typus-perp-sdk.git",
5
5
  "author": "Typus",
6
6
  "description": "typus perp sdk",