@ape.swap/bonds-sdk 4.5.6 → 4.5.7

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/main.js CHANGED
@@ -65203,7 +65203,7 @@ function fetchUserOwnedSolanaBonds(user, bondData, tokenPrices, priceApiUrl) {
65203
65203
  address: bondPda.toBase58(),
65204
65204
  id: idTrimmed,
65205
65205
  asset: nftMint.toBase58(),
65206
- vesting: bondAccount.vesting.toString(),
65206
+ // vesting: bondAccount.vesting.toString(),
65207
65207
  vestingTerm: bondAccount.vestingTerm.toString(),
65208
65208
  payout: (Number(bondAccount.payout) - Number(bondAccount.payoutClaimed)).toString(),
65209
65209
  totalPayout: bondAccount.payout.toString(),
@@ -76409,7 +76409,7 @@ const fetchPreTGEUserBonds = (chains, tokenPrices, preTGEList, account, apiUrl)
76409
76409
  try {
76410
76410
  const preTGEBonds = preTGEList.filter((bond) => chains.includes(bond.chainId));
76411
76411
  const results = yield Promise.all(preTGEBonds.map((bond) => __awaiter$9(void 0, void 0, void 0, function* () {
76412
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
76412
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
76413
76413
  try {
76414
76414
  const calls = [
76415
76415
  {
@@ -76469,10 +76469,12 @@ const fetchPreTGEUserBonds = (chains, tokenPrices, preTGEList, account, apiUrl)
76469
76469
  .toString(),
76470
76470
  payoutClaimed: (_r = billData[0][0]) === null || _r === void 0 ? void 0 : _r.payoutClaimed.toString(),
76471
76471
  billNftAddress: (_s = billData[1][0]) === null || _s === void 0 ? void 0 : _s.toString(),
76472
- vesting: (_u = (_t = billData[0][0]) === null || _t === void 0 ? void 0 : _t.vesting) === null || _u === void 0 ? void 0 : _u.toString(),
76472
+ // vesting: billData[0][0]?.vesting?.toString(),
76473
+ vestingTerm: (_u = (_t = billData[0][0]) === null || _t === void 0 ? void 0 : _t.vestingTerm) === null || _u === void 0 ? void 0 : _u.toString(),
76473
76474
  lastBlockTimestamp: (_w = (_v = billData[0][0]) === null || _v === void 0 ? void 0 : _v.lastClaimTimestamp) === null || _w === void 0 ? void 0 : _w.toString(),
76474
- truePricePaid: (_y = (_x = billData[0][0]) === null || _x === void 0 ? void 0 : _x.truePricePaid) === null || _y === void 0 ? void 0 : _y.toString(),
76475
- pendingRewards: (_z = billData[2][0]) === null || _z === void 0 ? void 0 : _z.toString(),
76475
+ vestingStartTimestamp: (_y = (_x = billData[0][0]) === null || _x === void 0 ? void 0 : _x.vestingStartTimestamp) === null || _y === void 0 ? void 0 : _y.toString(),
76476
+ truePricePaid: (_0 = (_z = billData[0][0]) === null || _z === void 0 ? void 0 : _z.truePricePaid) === null || _0 === void 0 ? void 0 : _0.toString(),
76477
+ pendingRewards: (_1 = billData[2][0]) === null || _1 === void 0 ? void 0 : _1.toString(),
76476
76478
  };
76477
76479
  }
76478
76480
  const accountInfo = {
@@ -76488,11 +76490,11 @@ const fetchPreTGEUserBonds = (chains, tokenPrices, preTGEList, account, apiUrl)
76488
76490
  };
76489
76491
  const finalized = res[3][0];
76490
76492
  const terms = res[4];
76491
- const vestingTerm = (_0 = terms === null || terms === void 0 ? void 0 : terms.vestingTerm) === null || _0 === void 0 ? void 0 : _0.toNumber();
76492
- const trueBillPrice = (_1 = res[5]) === null || _1 === void 0 ? void 0 : _1[0];
76493
- const initPrice = getBalanceNumber(new BigNumber$1(trueBillPrice.toString()), (_3 = (_2 = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _2 === void 0 ? void 0 : _2.decimals) === null || _3 === void 0 ? void 0 : _3[bond === null || bond === void 0 ? void 0 : bond.chainId]);
76493
+ const vestingTerm = (_2 = terms === null || terms === void 0 ? void 0 : terms.vestingTerm) === null || _2 === void 0 ? void 0 : _2.toNumber();
76494
+ const trueBillPrice = (_3 = res[5]) === null || _3 === void 0 ? void 0 : _3[0];
76495
+ const initPrice = getBalanceNumber(new BigNumber$1(trueBillPrice.toString()), (_5 = (_4 = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _4 === void 0 ? void 0 : _4.decimals) === null || _5 === void 0 ? void 0 : _5[bond === null || bond === void 0 ? void 0 : bond.chainId]);
76494
76496
  const initialRelease = terms === null || terms === void 0 ? void 0 : terms.initialRelease;
76495
- const earnTokenPrice = (_5 = (_4 = tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices[bond === null || bond === void 0 ? void 0 : bond.chainId]) === null || _4 === void 0 ? void 0 : _4.find((tokenPrice) => { var _a, _b; return ((_a = tokenPrice.tokenAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = bond.earnToken.address[bond.chainId]) === null || _b === void 0 ? void 0 : _b.toLowerCase()); })) === null || _5 === void 0 ? void 0 : _5.price;
76497
+ const earnTokenPrice = (_7 = (_6 = tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices[bond === null || bond === void 0 ? void 0 : bond.chainId]) === null || _6 === void 0 ? void 0 : _6.find((tokenPrice) => { var _a, _b; return ((_a = tokenPrice.tokenAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = bond.earnToken.address[bond.chainId]) === null || _b === void 0 ? void 0 : _b.toLowerCase()); })) === null || _7 === void 0 ? void 0 : _7.price;
76496
76498
  return Object.assign(Object.assign({}, bond), { accountInfo,
76497
76499
  userOwnedBillsData,
76498
76500
  finalized,
@@ -8,7 +8,6 @@ export interface UserBill {
8
8
  address: string;
9
9
  id: string;
10
10
  asset?: string;
11
- vesting: string;
12
11
  vestingTerm?: string;
13
12
  payout: string;
14
13
  totalPayout?: string;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "4.5.6",
6
+ "version": "4.5.7",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",