@ape.swap/bonds-sdk 4.0.0-test.15 → 4.0.0-test.16

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 +6 -3
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -79899,17 +79899,20 @@ const UserBondRowPreTGE = ({ userBond }) => {
79899
79899
  const redeemableIn = formatTimeLeft(((_b = userBond === null || userBond === void 0 ? void 0 : userBond.redeemTime) !== null && _b !== void 0 ? _b : 0) - new Date().getTime() / 1000, true, true);
79900
79900
  const depositAmount = getBalanceNumber(new BigNumber$1((_d = (_c = userBond === null || userBond === void 0 ? void 0 : userBond.accountInfo) === null || _c === void 0 ? void 0 : _c.depositAmount) !== null && _d !== void 0 ? _d : '0'), (_f = (_e = userBond === null || userBond === void 0 ? void 0 : userBond.lpToken) === null || _e === void 0 ? void 0 : _e.decimals) === null || _f === void 0 ? void 0 : _f[userBond === null || userBond === void 0 ? void 0 : userBond.chainId]);
79901
79901
  const truePricePaid = getBalanceNumber(new BigNumber$1((_h = (_g = userBond === null || userBond === void 0 ? void 0 : userBond.accountInfo) === null || _g === void 0 ? void 0 : _g.truePricePaid) !== null && _h !== void 0 ? _h : '0'), (_k = (_j = userBond === null || userBond === void 0 ? void 0 : userBond.lpToken) === null || _j === void 0 ? void 0 : _j.decimals) === null || _k === void 0 ? void 0 : _k[userBond === null || userBond === void 0 ? void 0 : userBond.chainId]);
79902
+ const initialRelease = userBond === null || userBond === void 0 ? void 0 : userBond.initialRelease;
79902
79903
  const vestingTimePeriods = getTimePeriods((_l = userBond.vestingTerm) !== null && _l !== void 0 ? _l : 0, false);
79903
79904
  const vestingString = hasRedeemed
79904
79905
  ? getPendingVestingString(userBond === null || userBond === void 0 ? void 0 : userBond.userOwnedBillsData)
79905
- : `${vestingTimePeriods.months} Months`;
79906
+ : initialRelease === 1
79907
+ ? `0 D`
79908
+ : `${vestingTimePeriods.months} Months`;
79906
79909
  const userAllocation = depositAmount / ((_m = userBond === null || userBond === void 0 ? void 0 : userBond.initPrice) !== null && _m !== void 0 ? _m : 0);
79907
- const initialRelease = !hasRedeemed && saleFinalized && (userBond === null || userBond === void 0 ? void 0 : userBond.initialRelease) ? userAllocation * (userBond === null || userBond === void 0 ? void 0 : userBond.initialRelease) : 0;
79910
+ const initialReleaseTokens = !hasRedeemed && saleFinalized && (userBond === null || userBond === void 0 ? void 0 : userBond.initialRelease) ? userAllocation * (userBond === null || userBond === void 0 ? void 0 : userBond.initialRelease) : 0;
79908
79911
  // pendingRewards variable follows the naming of the SC, but it actually means currently claimable tokens
79909
79912
  const pendingRewards = getBalanceNumber(new BigNumber$1((_p = (_o = userBond === null || userBond === void 0 ? void 0 : userBond.userOwnedBillsData) === null || _o === void 0 ? void 0 : _o.pendingRewards) !== null && _p !== void 0 ? _p : '0'), (_r = (_q = userBond === null || userBond === void 0 ? void 0 : userBond.earnToken) === null || _q === void 0 ? void 0 : _q.decimals) === null || _r === void 0 ? void 0 : _r[userBond.chainId]);
79910
79913
  // payout variable follows the naming of the SC, but it actually means total tokens vested
79911
79914
  const payout = getBalanceNumber(new BigNumber$1((_t = (_s = userBond === null || userBond === void 0 ? void 0 : userBond.userOwnedBillsData) === null || _s === void 0 ? void 0 : _s.payout) !== null && _t !== void 0 ? _t : '0'), (_v = (_u = userBond === null || userBond === void 0 ? void 0 : userBond.earnToken) === null || _u === void 0 ? void 0 : _u.decimals) === null || _v === void 0 ? void 0 : _v[userBond.chainId]);
79912
- const claimableAmount = hasRedeemed ? pendingRewards : initialRelease;
79915
+ const claimableAmount = hasRedeemed ? pendingRewards : initialReleaseTokens;
79913
79916
  const claimableUSD = claimableAmount * ((_w = userBond.initPrice) !== null && _w !== void 0 ? _w : 0);
79914
79917
  const pendingAmount = hasRedeemed ? payout : depositAmount / truePricePaid;
79915
79918
  const pendingUSD = pendingAmount * ((_x = userBond === null || userBond === void 0 ? void 0 : userBond.earnTokenPrice) !== null && _x !== void 0 ? _x : 0);
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.0.0-test.15",
6
+ "version": "4.0.0-test.16",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",