@ape.swap/bonds-sdk 2.2.8 → 2.2.9

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
@@ -39209,6 +39209,10 @@ const vestingTimeRemaining = (userBill) => {
39209
39209
  const currentTime = new Date().getTime() / 1000;
39210
39210
  return getTimePeriods(parseInt(userBill.lastBlockTimestamp) + parseInt(userBill.vesting) - currentTime, true);
39211
39211
  };
39212
+ const vestingTimeRemainingYourBonds = (userBill) => {
39213
+ const currentTime = new Date().getTime() / 1000;
39214
+ return (parseInt(userBill.lastBlockTimestamp) + parseInt(userBill.vesting) - currentTime);
39215
+ };
39212
39216
  const discountEarnTokenPrice = (bond) => {
39213
39217
  var _a, _b;
39214
39218
  const earnTokenPrice = parseFloat((_a = bond === null || bond === void 0 ? void 0 : bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0');
@@ -71708,7 +71712,7 @@ const YourBonds = () => {
71708
71712
  return;
71709
71713
  if (sortConfig === null) {
71710
71714
  const sortedBills = (_a = [...userBonds]) === null || _a === void 0 ? void 0 : _a.sort((a, b) => {
71711
- const claimableDifference = parseFloat(claimable(b).toFixed(3)) - parseFloat(claimable(a).toFixed(3));
71715
+ const claimableDifference = parseFloat(vestingTimeRemainingYourBonds(b).toFixed(3)) - parseFloat(vestingTimeRemainingYourBonds(a).toFixed(3));
71712
71716
  if (claimableDifference !== 0) {
71713
71717
  return claimableDifference;
71714
71718
  }
@@ -12,6 +12,7 @@ export declare const vestingTimeRemaining: (userBill: UserBill) => {
12
12
  minutes: number;
13
13
  seconds: number;
14
14
  };
15
+ export declare const vestingTimeRemainingYourBonds: (userBill: UserBill) => number;
15
16
  export declare const discountEarnTokenPrice: (bond: BondsData) => string;
16
17
  export declare const maxBuy: (bond: BondsData) => 0 | BigNumber;
17
18
  export declare function formatNumber(input: string): 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": "2.2.8",
6
+ "version": "2.2.9",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -56,7 +56,7 @@
56
56
  "yalc": "^1.0.0-pre.53"
57
57
  },
58
58
  "dependencies": {
59
- "@ape.swap/apeswap-lists": "3.71.0",
59
+ "@ape.swap/apeswap-lists": "3.71.69",
60
60
  "@emotion/react": "11.11.4",
61
61
  "bignumber.js": "^9.1.2",
62
62
  "chart.js": "4.2.0",