@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 +11 -9
- package/dist/types/yourbonds.d.ts +0 -1
- package/package.json +1 -1
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:
|
|
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
|
-
|
|
76475
|
-
|
|
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 = (
|
|
76492
|
-
const trueBillPrice = (
|
|
76493
|
-
const initPrice = getBalanceNumber(new BigNumber$1(trueBillPrice.toString()), (
|
|
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 = (
|
|
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,
|