@ape.swap/bonds-sdk 2.2.9 → 2.3.0

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
@@ -18326,6 +18326,7 @@ var types = {};
18326
18326
  (_c[LiquidityDex.PancakeSwapV2] = {
18327
18327
  factory: '0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73',
18328
18328
  protocol: Protocols.V2,
18329
+ router: '0x10ED43C718714eb63d5aA57B78B54704E256024E',
18329
18330
  }),
18330
18331
  (_c[LiquidityDex.ApeSwapV3] = {
18331
18332
  factory: '0x7Bc382DdC5928964D7af60e7e2f6299A1eA6F48d',
@@ -39209,10 +39210,6 @@ const vestingTimeRemaining = (userBill) => {
39209
39210
  const currentTime = new Date().getTime() / 1000;
39210
39211
  return getTimePeriods(parseInt(userBill.lastBlockTimestamp) + parseInt(userBill.vesting) - currentTime, true);
39211
39212
  };
39212
- const vestingTimeRemainingYourBonds = (userBill) => {
39213
- const currentTime = new Date().getTime() / 1000;
39214
- return (parseInt(userBill.lastBlockTimestamp) + parseInt(userBill.vesting) - currentTime);
39215
- };
39216
39213
  const discountEarnTokenPrice = (bond) => {
39217
39214
  var _a, _b;
39218
39215
  const earnTokenPrice = parseFloat((_a = bond === null || bond === void 0 ? void 0 : bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0');
@@ -71712,7 +71709,7 @@ const YourBonds = () => {
71712
71709
  return;
71713
71710
  if (sortConfig === null) {
71714
71711
  const sortedBills = (_a = [...userBonds]) === null || _a === void 0 ? void 0 : _a.sort((a, b) => {
71715
- const claimableDifference = parseFloat(vestingTimeRemainingYourBonds(b).toFixed(3)) - parseFloat(vestingTimeRemainingYourBonds(a).toFixed(3));
71712
+ const claimableDifference = parseFloat(claimable(b).toFixed(3)) - parseFloat(claimable(a).toFixed(3));
71716
71713
  if (claimableDifference !== 0) {
71717
71714
  return claimableDifference;
71718
71715
  }
@@ -74115,7 +74112,6 @@ const ProjectDescription = ({ description }) => {
74115
74112
  };
74116
74113
 
74117
74114
  const BondModalHeaderAlt = ({ bondData, onDismiss, showProjectInfoButton, }) => {
74118
- var _a, _b, _c, _d, _e, _f;
74119
74115
  const [onOpenSlippageModal] = useModal(jsx$2(SlippageModal, {}));
74120
74116
  const handleClose = () => {
74121
74117
  if (typeof window !== 'undefined') {
@@ -74135,7 +74131,7 @@ const BondModalHeaderAlt = ({ bondData, onDismiss, showProjectInfoButton, }) =>
74135
74131
  // },
74136
74132
  // })
74137
74133
  // }
74138
- return (jsx$2(Flex, { className: "modaltable-container title-container", children: jsx$2(Flex, { className: "slipagge-close-icons", sx: { flexDirection: 'row' }, children: onDismiss ? (jsxs(Fragment$1, { children: [jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_c = (_b = (_a = bondData === null || bondData === void 0 ? void 0 : bondData.earnToken) === null || _a === void 0 ? void 0 : _a.address) === null || _b === void 0 ? void 0 : _b[bondData === null || bondData === void 0 ? void 0 : bondData.chainId]) !== null && _c !== void 0 ? _c : '', earnTokenSymbol: (_e = (_d = bondData === null || bondData === void 0 ? void 0 : bondData.earnToken) === null || _d === void 0 ? void 0 : _d.symbol) !== null && _e !== void 0 ? _e : '', bondContract: (_f = bondData.billAddress) !== null && _f !== void 0 ? _f : '', projectLink: bondData === null || bondData === void 0 ? void 0 : bondData.projectLink, twitter: bondData === null || bondData === void 0 ? void 0 : bondData.twitter, audit: bondData === null || bondData === void 0 ? void 0 : bondData.audit, chain: bondData === null || bondData === void 0 ? void 0 : bondData.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(7%, -2%)", children: jsx$2(Flex, { className: "more-icon", sx: { opacity: 0.8 }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }), jsx$2(Flex, { sx: { pr: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) }), jsx$2(IconButton, { icon: "close", color: "text", variant: "transparent", onClick: handleClose })] })) : (jsx$2(Flex, { sx: {}, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })) }) }));
74134
+ return (jsx$2(Flex, { className: "modaltable-container title-container", children: jsx$2(Flex, { className: "slipagge-close-icons", sx: { flexDirection: 'row' }, children: onDismiss ? (jsxs(Fragment$1, { children: [jsx$2(Flex, { sx: { pr: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) }), jsx$2(IconButton, { icon: "close", color: "text", variant: "transparent", onClick: handleClose })] })) : (jsx$2(Flex, { sx: {}, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })) }) }));
74139
74135
  };
74140
74136
 
74141
74137
  const ImageAndShortDescription = ({ bondData, onDismiss }) => {
@@ -12,7 +12,6 @@ export declare const vestingTimeRemaining: (userBill: UserBill) => {
12
12
  minutes: number;
13
13
  seconds: number;
14
14
  };
15
- export declare const vestingTimeRemainingYourBonds: (userBill: UserBill) => number;
16
15
  export declare const discountEarnTokenPrice: (bond: BondsData) => string;
17
16
  export declare const maxBuy: (bond: BondsData) => 0 | BigNumber;
18
17
  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.9",
6
+ "version": "2.3.0",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",