@typus/typus-perp-sdk 1.1.32-codegen-exp12 → 1.1.32-codegen-exp13

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.
Files changed (2) hide show
  1. package/dist/src/fetch.js +8 -10
  2. package/package.json +1 -1
package/dist/src/fetch.js CHANGED
@@ -198,15 +198,13 @@ function parseOptionBidReceipts(positions) {
198
198
  async function getUserStake(client, input) {
199
199
  let tx = new transactions_1.Transaction();
200
200
  for (let i of input.indexes) {
201
- // tx.add(
202
- // allocateIncentive({
203
- // arguments: {
204
- // version: STAKE_POOL_VERSION,
205
- // registry: STAKE_POOL,
206
- // index: BigInt(i),
207
- // },
208
- // })
209
- // );
201
+ tx.add((0, stake_pool_1.allocateIncentive)({
202
+ arguments: {
203
+ version: _1.STAKE_POOL_VERSION,
204
+ registry: _1.STAKE_POOL,
205
+ index: BigInt(i),
206
+ },
207
+ }));
210
208
  tx.add((0, stake_pool_1.getUserShares)({
211
209
  arguments: {
212
210
  registry: _1.STAKE_POOL,
@@ -221,7 +219,7 @@ async function getUserStake(client, input) {
221
219
  let results = [];
222
220
  for (var x = 0; x < input.indexes.length; x++) {
223
221
  // @ts-ignore
224
- var returnValues = res.results[x].returnValues[0][0];
222
+ var returnValues = res.results[2 * x + 1].returnValues[0][0];
225
223
  // console.log(returnValues);
226
224
  var reader = new bcs_1.BcsReader(new Uint8Array(returnValues));
227
225
  let length = reader.readULEB();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typus/typus-perp-sdk",
3
- "version": "1.1.32-codegen-exp12",
3
+ "version": "1.1.32-codegen-exp13",
4
4
  "repository": "https://github.com/Typus-Lab/typus-perp-sdk.git",
5
5
  "author": "Typus",
6
6
  "description": "typus perp sdk",