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

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 +2 -2
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -65157,12 +65157,12 @@ function fetchUserOwnedSolanaBonds(user, bondData, tokenPrices, priceApiUrl) {
65157
65157
  let principalTokenPrice = (_c = (_b = (_a = tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices[main.ChainId.SOL]) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (t) => { var _a, _b, _c, _d; return ((_a = t === null || t === void 0 ? void 0 : t.tokenAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_d = (_c = (_b = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _b === void 0 ? void 0 : _b.address) === null || _c === void 0 ? void 0 : _c[main.ChainId.SOL]) === null || _d === void 0 ? void 0 : _d.toLowerCase()); })) === null || _c === void 0 ? void 0 : _c.price;
65158
65158
  let payoutTokenPrice = (_f = (_e = (_d = tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices[main.ChainId.SOL]) === null || _d === void 0 ? void 0 : _d.find) === null || _e === void 0 ? void 0 : _e.call(_d, (t) => { var _a, _b, _c, _d; return ((_a = t === null || t === void 0 ? void 0 : t.tokenAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_d = (_c = (_b = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _b === void 0 ? void 0 : _b.address) === null || _c === void 0 ? void 0 : _c[main.ChainId.SOL]) === null || _d === void 0 ? void 0 : _d.toLowerCase()); })) === null || _f === void 0 ? void 0 : _f.price;
65159
65159
  if (principalTokenPrice === undefined) {
65160
- const res = yield axios.get(`${priceApiUrl}/price?token=${(_h = (_g = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _g === void 0 ? void 0 : _g.address) === null || _h === void 0 ? void 0 : _h[bond === null || bond === void 0 ? void 0 : bond.chainId]}&chain=${bond === null || bond === void 0 ? void 0 : bond.chainId}`);
65160
+ const res = yield axios.get(`${priceApiUrl}/realtime/price?token=${(_h = (_g = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _g === void 0 ? void 0 : _g.address) === null || _h === void 0 ? void 0 : _h[bond === null || bond === void 0 ? void 0 : bond.chainId]}&chain=${bond === null || bond === void 0 ? void 0 : bond.chainId}`);
65161
65161
  console.log('Individual call for: ', bond.lpToken.symbol, '. Price: ', res.data.price);
65162
65162
  principalTokenPrice = parseFloat((_j = res.data.price) !== null && _j !== void 0 ? _j : '0');
65163
65163
  }
65164
65164
  if (payoutTokenPrice === undefined) {
65165
- const res = yield axios.get(`${priceApiUrl}/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}`);
65165
+ 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}`);
65166
65166
  console.log('Individual call for: ', bond.earnToken.symbol, '. Price: ', res.data.price);
65167
65167
  payoutTokenPrice = parseFloat((_m = res.data.price) !== null && _m !== void 0 ? _m : '0');
65168
65168
  }
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.6",
6
+ "version": "4.4.1-test.8",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",