@ape.swap/bonds-sdk 4.4.1-test.5 → 4.4.1-test.6

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/main.js +15 -19
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -63547,9 +63547,6 @@ const getVestingTermsTooltipString = (bond) => {
63547
63547
  const vestingCliff = bond === null || bond === void 0 ? void 0 : bond.vestingCliff;
63548
63548
  if (!vestingCliff)
63549
63549
  return undefined;
63550
- if ((bond === null || bond === void 0 ? void 0 : bond.earnToken.symbol) === 'AITV') {
63551
- console.log(vestingTerm - vestingCliff);
63552
- }
63553
63550
  const vestingTime = getTimePeriods(vestingTerm - vestingCliff, true);
63554
63551
  const vestingCliffString = getTimePeriods(vestingCliff, true);
63555
63552
  if (vestingTerm - vestingCliff === 0) {
@@ -64771,7 +64768,7 @@ const fetchUserOwnedBillsDataAsync = (chainId, account, bondData, tokenPrices, p
64771
64768
  }
64772
64769
  });
64773
64770
  const fetchUserOwnedBills = (chainId, account, bonds, tokenPrices, priceApiUrl) => __awaiter$9(void 0, void 0, void 0, function* () {
64774
- 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;
64771
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
64775
64772
  // Maps all the bills in the list repo to make a call to each of them to get Bills Id, meaning purchased bill ids
64776
64773
  const billIdCalls = bonds.map((b) => {
64777
64774
  var _a;
@@ -64811,18 +64808,17 @@ const fetchUserOwnedBills = (chainId, account, bonds, tokenPrices, priceApiUrl)
64811
64808
  console.log('Individual call for: ', bond.lpToken.symbol, '. Price: ', res.data.price);
64812
64809
  principalTokenPrice = parseFloat((_g = res.data.price) !== null && _g !== void 0 ? _g : '0');
64813
64810
  }
64814
- catch (_0) {
64811
+ catch (_y) {
64815
64812
  principalTokenPrice = 0;
64816
64813
  }
64817
64814
  }
64818
64815
  if (payoutTokenPrice === undefined) {
64819
64816
  try {
64820
- console.log(`${priceApiUrl}/price?token=${(_j = (_h = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _h === void 0 ? void 0 : _h.address) === null || _j === void 0 ? void 0 : _j[bond === null || bond === void 0 ? void 0 : bond.chainId]}&chain=${bond === null || bond === void 0 ? void 0 : bond.chainId}`);
64821
- const res = yield axios.get(`${priceApiUrl}/realtime/price?token=${(_l = (_k = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _k === void 0 ? void 0 : _k.address) === null || _l === void 0 ? void 0 : _l[bond === null || bond === void 0 ? void 0 : bond.chainId]}&chain=${bond === null || bond === void 0 ? void 0 : bond.chainId}`);
64817
+ const res = yield axios.get(`${priceApiUrl}/realtime/price?token=${(_j = (_h = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _h === void 0 ? void 0 : _h.address) === null || _j === void 0 ? void 0 : _j[bond === null || bond === void 0 ? void 0 : bond.chainId]}&chain=${bond === null || bond === void 0 ? void 0 : bond.chainId}`);
64822
64818
  console.log('Individual call for: ', bond.earnToken.symbol, '. Price: ', res.data.price);
64823
- payoutTokenPrice = parseFloat((_m = res.data.price) !== null && _m !== void 0 ? _m : '0');
64819
+ payoutTokenPrice = parseFloat((_k = res.data.price) !== null && _k !== void 0 ? _k : '0');
64824
64820
  }
64825
- catch (_1) {
64821
+ catch (_z) {
64826
64822
  payoutTokenPrice = 0;
64827
64823
  }
64828
64824
  }
@@ -64831,24 +64827,24 @@ const fetchUserOwnedBills = (chainId, account, bonds, tokenPrices, priceApiUrl)
64831
64827
  ? {
64832
64828
  address: billDataCalls[billPos].address,
64833
64829
  id: billDataCalls[billPos].params[0].toString(),
64834
- payout: new BigNumber$1((_o = billData[billPos][0]) === null || _o === void 0 ? void 0 : _o.payout.toString())
64835
- .minus((_p = billData[billPos][0]) === null || _p === void 0 ? void 0 : _p.payoutClaimed.toString())
64830
+ payout: new BigNumber$1((_l = billData[billPos][0]) === null || _l === void 0 ? void 0 : _l.payout.toString())
64831
+ .minus((_m = billData[billPos][0]) === null || _m === void 0 ? void 0 : _m.payoutClaimed.toString())
64836
64832
  .toString(),
64837
- totalPayout: (_q = billData[billPos][0]) === null || _q === void 0 ? void 0 : _q.payout.toString(),
64838
- payoutClaimed: (_r = billData[billPos][0]) === null || _r === void 0 ? void 0 : _r.payoutClaimed.toString(),
64839
- billNftAddress: (_s = bond.billNnftAddress[bond.chainId]) !== null && _s !== void 0 ? _s : '',
64840
- vesting: (_t = billData[billPos][0]) === null || _t === void 0 ? void 0 : _t.vesting.toString(),
64841
- lastBlockTimestamp: (_u = billData[billPos][0]) === null || _u === void 0 ? void 0 : _u.lastClaimTimestamp.toString(),
64842
- truePricePaid: (_v = billData[billPos][0]) === null || _v === void 0 ? void 0 : _v.truePricePaid.toString(),
64833
+ totalPayout: (_o = billData[billPos][0]) === null || _o === void 0 ? void 0 : _o.payout.toString(),
64834
+ payoutClaimed: (_p = billData[billPos][0]) === null || _p === void 0 ? void 0 : _p.payoutClaimed.toString(),
64835
+ billNftAddress: (_q = bond.billNnftAddress[bond.chainId]) !== null && _q !== void 0 ? _q : '',
64836
+ vesting: (_r = billData[billPos][0]) === null || _r === void 0 ? void 0 : _r.vesting.toString(),
64837
+ lastBlockTimestamp: (_s = billData[billPos][0]) === null || _s === void 0 ? void 0 : _s.lastClaimTimestamp.toString(),
64838
+ truePricePaid: (_t = billData[billPos][0]) === null || _t === void 0 ? void 0 : _t.truePricePaid.toString(),
64843
64839
  pendingRewards: billData[billPos + 1][0].toString(),
64844
64840
  bond,
64845
64841
  }
64846
64842
  : {
64847
64843
  address: billDataCalls[billPos].address,
64848
64844
  id: billDataCalls[billPos].params[0].toString(),
64849
- payoutClaimed: (_y = (_x = (_w = billData === null || billData === void 0 ? void 0 : billData[billPos]) === null || _w === void 0 ? void 0 : _w[0]) === null || _x === void 0 ? void 0 : _x.payoutClaimed) === null || _y === void 0 ? void 0 : _y.toString(),
64845
+ payoutClaimed: (_w = (_v = (_u = billData === null || billData === void 0 ? void 0 : billData[billPos]) === null || _u === void 0 ? void 0 : _u[0]) === null || _v === void 0 ? void 0 : _v.payoutClaimed) === null || _w === void 0 ? void 0 : _w.toString(),
64850
64846
  payout: billData[billPos][0].toString(),
64851
- billNftAddress: (_z = bond.billNnftAddress[bond.chainId]) !== null && _z !== void 0 ? _z : '',
64847
+ billNftAddress: (_x = bond.billNnftAddress[bond.chainId]) !== null && _x !== void 0 ? _x : '',
64852
64848
  vesting: billData[billPos][1].toString(),
64853
64849
  lastBlockTimestamp: billData[billPos][2].toString(),
64854
64850
  truePricePaid: billData[billPos][3].toString(),
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.4.1-test.5",
6
+ "version": "4.4.1-test.6",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",