@ape.swap/bonds-sdk 5.0.4 → 5.0.6

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.
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const AbondModal: () => React.JSX.Element;
3
+ export default AbondModal;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const OabondModal: () => React.JSX.Element;
3
+ export default OabondModal;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const PmusdModal: ({ onDismiss }: {
3
+ onDismiss?: () => void;
4
+ }) => React.JSX.Element;
5
+ export default PmusdModal;
@@ -0,0 +1,3 @@
1
+ export { default as AbondModal } from './AbondModal';
2
+ export { default as OabondModal } from './OabondModal';
3
+ export { default as PmusdModal } from './PmusdModal';
@@ -4,5 +4,6 @@ declare const ButtonsRow: React.FC<{
4
4
  twitter?: string;
5
5
  earnTokenContract?: string;
6
6
  cgId?: string;
7
+ dexscreener?: string;
7
8
  }>;
8
9
  export default ButtonsRow;
@@ -9,6 +9,7 @@ export interface TooltipProps {
9
9
  isSoldOut?: boolean;
10
10
  billType?: string;
11
11
  cgId?: string;
12
+ dexscreener?: string;
12
13
  }
13
14
  declare const BondInfoTooltip: React.FunctionComponent<TooltipProps>;
14
15
  export default BondInfoTooltip;
package/dist/main.js CHANGED
@@ -59288,20 +59288,31 @@ const remove0xPrefix = (str) => {
59288
59288
  return str;
59289
59289
  };
59290
59290
 
59291
- const CircularModal = () => {
59291
+ const AbondModal = () => {
59292
59292
  const handleClick = () => {
59293
59293
  window.location.href = 'https://ape.bond/true-yield';
59294
59294
  };
59295
59295
  return (jsx$2(Modal, { title: "You've Claimed ABOND!", children: jsxs(Flex, { sx: { flexDirection: 'column' }, children: [jsx$2(Flex, { sx: { fontSize: '12px', lineHeight: '20px', color: 'primaryButton', mt: '10px' }, children: "Did You Know?" }), jsxs(Flex, { sx: { flexDirection: 'column', gap: '10px', cursor: 'pointer' }, onClick: handleClick, children: [jsx$2(Flex, { children: "You can stake ABOND to earn $USDT and extra discounts on Bonds:" }), jsx$2(Image$1, { src: 'https://ape.bond/images/circular-staking/real-yield.png' }), jsx$2(Image$1, { src: 'https://ape.bond/images/circular-staking/extra-discounts.png' }), jsx$2(Button, { sx: { width: '100%', mt: '10px' }, children: " Stake now" })] })] }) }));
59296
59296
  };
59297
59297
 
59298
- const OABONDModal = () => {
59298
+ const OabondModal = () => {
59299
59299
  const handleClick = () => {
59300
59300
  window.location.href = 'https://ape.bond/true-yield?createPosition=oABOND';
59301
59301
  };
59302
59302
  return (jsx$2(Modal, { title: "You've Claimed oABOND!", children: jsx$2(Flex, { sx: { flexDirection: 'column' }, children: jsxs(Flex, { sx: { flexDirection: 'column', gap: '10px', cursor: 'pointer' }, onClick: handleClick, children: [jsx$2(Flex, { children: "You can now stake your oABOND and turn it into veABOND at permalock:" }), jsx$2(Image$1, { src: 'https://ape.bond/images/circular-staking/real-yield.png' }), jsx$2(Button, { sx: { width: '100%', mt: '10px' }, children: "Lock now" })] }) }) }));
59303
59303
  };
59304
59304
 
59305
+ const PmusdModal = ({ onDismiss }) => {
59306
+ return (jsx$2(Modal, { title: "You've Claimed pmUSD!", children: jsx$2(Flex, { sx: { flexDirection: 'column' }, children: jsxs(Flex, { sx: { flexDirection: 'column', gap: '10px' }, children: [jsxs(Flex, { sx: {
59307
+ fontWeight: 500,
59308
+ fontSize: '14px',
59309
+ textAlign: 'left',
59310
+ color: 'textDisabledButton',
59311
+ my: '10px',
59312
+ display: 'block',
59313
+ }, children: ["Base pmUSD rewards succesfully claimed. The additional PVE rewards (10\u201315%) will be automatically transferred to your wallet within the next 24 hours. If you experience any issues or delay, please contact with", ' ', jsx$2("a", { href: "https://discord.gg/raac", target: "_blank", rel: "noreferrer", sx: { color: 'primaryButton' }, children: "RACC support channel" }), "."] }), jsx$2(Button, { sx: { width: '100%', mt: '10px' }, onClick: onDismiss, children: "close" })] }) }) }));
59314
+ };
59315
+
59305
59316
  const Actions = ({ userBill }) => {
59306
59317
  var _a, _b, _c;
59307
59318
  // Hooks
@@ -59373,17 +59384,21 @@ const Actions = ({ userBill }) => {
59373
59384
  }
59374
59385
  };
59375
59386
  // Modals
59376
- const [openCircularModal] = useModal(jsx$2(CircularModal, {}), true, false, 'circularModal');
59377
- const [openOABONDModal] = useModal(jsx$2(OABONDModal, {}), true, false, 'oABONDModal');
59387
+ const [openAbondModal] = useModal(jsx$2(AbondModal, {}), true, false, 'abondModal');
59388
+ const [openOabondModal] = useModal(jsx$2(OabondModal, {}), true, false, 'oAbondModal');
59389
+ const [openPmusdModal] = useModal(jsx$2(PmusdModal, {}), true, false, 'pmUSDModal');
59378
59390
  useEffect(() => {
59379
- var _a, _b;
59391
+ var _a, _b, _c;
59380
59392
  if (isConfirmed) {
59381
59393
  refetchUserBonds();
59382
59394
  if (((_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.earnToken.symbol.toLowerCase()) === 'abond') {
59383
- openCircularModal();
59395
+ openAbondModal();
59384
59396
  }
59385
59397
  if (((_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.earnToken.symbol.toLowerCase()) === 'oabond') {
59386
- openOABONDModal();
59398
+ openOabondModal();
59399
+ }
59400
+ if (((_c = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _c === void 0 ? void 0 : _c.earnToken.symbol.toLowerCase()) === 'pmusd') {
59401
+ openPmusdModal();
59387
59402
  }
59388
59403
  }
59389
59404
  /* eslint-disable react-hooks/exhaustive-deps */
@@ -59700,8 +59715,8 @@ const styles$a = {
59700
59715
  },
59701
59716
  };
59702
59717
 
59703
- const ButtonsRow = ({ projectLink, twitter, earnTokenContract, cgId }) => {
59704
- const dexscreenerURL = earnTokenContract ? `https://dexscreener.com/search?q=${earnTokenContract}` : undefined;
59718
+ const ButtonsRow = ({ projectLink, twitter, earnTokenContract, cgId, dexscreener }) => {
59719
+ const dexscreenerURL = dexscreener || (earnTokenContract ? `https://dexscreener.com/search?q=${earnTokenContract}` : undefined);
59705
59720
  const coingeckoURL = cgId ? `https://www.coingecko.com/en/coins/${cgId}` : undefined;
59706
59721
  return (jsxs(Flex, { sx: { justifyContent: 'center' }, children: [jsx$2(Flex, { sx: styles$a.iconButton, as: Link, href: projectLink, target: "_blank", children: jsx$2(Svg, { icon: "URL", width: 18 }) }), jsx$2(Flex, { sx: styles$a.iconButton, as: Link, href: twitter, target: "_blank", children: jsx$2(Svg, { icon: "twitter", width: 18, color: "text" }) }), dexscreenerURL && (jsx$2(Flex, { sx: styles$a.iconButton, as: Link, href: dexscreenerURL, target: "_blank", children: jsx$2(Svg, { icon: "dexscreener", width: 18, color: "text" }) })), coingeckoURL && (jsx$2(Flex, { sx: styles$a.iconButton, as: Link, href: coingeckoURL, target: "_blank", children: jsx$2(Svg, { icon: "coingecko", width: 18, color: "text" }) }))] }));
59707
59722
  };
@@ -59723,7 +59738,7 @@ const ExpandedViewButton = ({ handleNavigation, rightPos }) => {
59723
59738
  }, onClick: handleNavigation, children: ["Project Info", jsx$2(Flex, { sx: { ml: '4px' }, children: jsx$2(Svg, { icon: "expand", width: 20, color: "white" }) })] }) }));
59724
59739
  };
59725
59740
 
59726
- const BondInfoTooltip = ({ earnTokenContract, earnTokenSymbol, bondContract, projectLink, twitter, chain, isSoldOut = false, billType, cgId, }) => {
59741
+ const BondInfoTooltip = ({ earnTokenContract, earnTokenSymbol, bondContract, projectLink, twitter, chain, isSoldOut = false, billType, cgId, dexscreener, }) => {
59727
59742
  const config = useSDKConfig();
59728
59743
  const explorerLink = BLOCK_EXPLORER[chain];
59729
59744
  const urlPage = chain === main.ChainId.SOL ? 'account' : 'address';
@@ -59742,11 +59757,11 @@ const BondInfoTooltip = ({ earnTokenContract, earnTokenSymbol, bondContract, pro
59742
59757
  },
59743
59758
  });
59744
59759
  };
59745
- return (jsxs(Flex, { sx: { flexDirection: 'column', flexWrap: 'wrap' }, children: [jsx$2(ButtonsRow, { twitter: twitter, projectLink: projectLink, earnTokenContract: earnTokenContract, cgId: cgId }), (config === null || config === void 0 ? void 0 : config.referenceId) === 'apebond' && !isSoldOut && billType !== 'fcfs' && (jsx$2(Flex, { sx: { width: '100%', my: '5px', justifyContent: 'center', position: 'relative', height: '25px' }, children: jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation, rightPos: '-5px' }) })), jsx$2(Flex, { sx: { justifyContent: 'center' }, children: jsxs(Flex, { sx: { width: '144px', flexDirection: 'column' }, children: [jsx$2(Flex, { sx: styles$a.linkRow, children: tokenLink && (jsxs(Link, { href: tokenLink, sx: styles$a.link, target: "_blank", children: ["View Token Contract", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) }), jsx$2(Flex, { sx: styles$a.linkRow, children: bondLink && (jsxs(Link, { href: bondLink, sx: styles$a.link, target: "_blank", children: ["View Bond Contract", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) }), jsx$2(Flex, { sx: styles$a.linkRow, children: billType !== 'fcfs' && (jsxs(Link, { href: bondDashboard, sx: styles$a.link, target: "_blank", rel: "noopener noreferrer", children: ["View Bond Insights", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) })] }) })] }));
59760
+ return (jsxs(Flex, { sx: { flexDirection: 'column', flexWrap: 'wrap' }, children: [jsx$2(ButtonsRow, { twitter: twitter, projectLink: projectLink, earnTokenContract: earnTokenContract, cgId: cgId, dexscreener: dexscreener }), (config === null || config === void 0 ? void 0 : config.referenceId) === 'apebond' && !isSoldOut && billType !== 'fcfs' && (jsx$2(Flex, { sx: { width: '100%', my: '5px', justifyContent: 'center', position: 'relative', height: '25px' }, children: jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation, rightPos: '-5px' }) })), jsx$2(Flex, { sx: { justifyContent: 'center' }, children: jsxs(Flex, { sx: { width: '144px', flexDirection: 'column' }, children: [jsx$2(Flex, { sx: styles$a.linkRow, children: tokenLink && (jsxs(Link, { href: tokenLink, sx: styles$a.link, target: "_blank", children: ["View Token Contract", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) }), jsx$2(Flex, { sx: styles$a.linkRow, children: bondLink && (jsxs(Link, { href: bondLink, sx: styles$a.link, target: "_blank", children: ["View Bond Contract", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) }), jsx$2(Flex, { sx: styles$a.linkRow, children: billType !== 'fcfs' && (jsxs(Link, { href: bondDashboard, sx: styles$a.link, target: "_blank", rel: "noopener noreferrer", children: ["View Bond Insights", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) })] }) })] }));
59746
59761
  };
59747
59762
 
59748
59763
  const UserBondRow = ({ bill }) => {
59749
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
59764
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
59750
59765
  // Hooks
59751
59766
  const userChainId = useChainId();
59752
59767
  const SDKConfig = useSDKConfig();
@@ -59813,10 +59828,11 @@ const UserBondRow = ({ bill }) => {
59813
59828
  const isPendingCliff = vestingCliff ? currentTime - purchaseTimestamp < vestingCliff : false;
59814
59829
  const cliffCountdown = getTimePeriods(purchaseTimestamp + (vestingCliff !== null && vestingCliff !== void 0 ? vestingCliff : 0) - currentTime, true);
59815
59830
  // Modals
59816
- const [openCircularModal] = useModal(jsx$2(CircularModal, {}), true, false, 'circularModal');
59817
- const [openOABONDModal] = useModal(jsx$2(OABONDModal, {}), true, false, 'oABONDModal');
59831
+ const [openCircularModal] = useModal(jsx$2(AbondModal, {}), true, false, 'circularModal');
59832
+ const [openOABONDModal] = useModal(jsx$2(OabondModal, {}), true, false, 'oABONDModal');
59833
+ const [openPmusdModal] = useModal(jsx$2(PmusdModal, {}), true, false, 'pmUSDModal');
59818
59834
  useEffect(() => {
59819
- var _a, _b;
59835
+ var _a, _b, _c;
59820
59836
  if (isConfirmed) {
59821
59837
  refetchUserBonds();
59822
59838
  if (((_a = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _a === void 0 ? void 0 : _a.earnToken.symbol.toLowerCase()) === 'abond') {
@@ -59825,10 +59841,13 @@ const UserBondRow = ({ bill }) => {
59825
59841
  if (((_b = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _b === void 0 ? void 0 : _b.earnToken.symbol.toLowerCase()) === 'oabond') {
59826
59842
  openOABONDModal();
59827
59843
  }
59844
+ if (((_c = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _c === void 0 ? void 0 : _c.earnToken.symbol.toLowerCase()) === 'pmusd') {
59845
+ openPmusdModal();
59846
+ }
59828
59847
  }
59829
59848
  /* eslint-disable react-hooks/exhaustive-deps */
59830
59849
  }, [isConfirmed]);
59831
- return (jsxs("div", { className: "your-bonds", onClick: onOpenPurchasedBond, children: [jsxs("div", { className: "token-info-container", children: [jsx$2(TokenInfoAndName, { tokenSymbol: (_g = (_f = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _f === void 0 ? void 0 : _f.earnToken) === null || _g === void 0 ? void 0 : _g.symbol, chain: (_h = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _h === void 0 ? void 0 : _h.chainId, tag: (_k = (_j = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _j === void 0 ? void 0 : _j.tags) === null || _k === void 0 ? void 0 : _k[0], vestEnds: getTimeLeftForFullyVested(bill) > 0 ? `Ends in ${getPendingVestingString(bill)}` : `Fully Vested`, isHotBond: true }), jsx$2("div", { className: "tooltip-column", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: ((_l = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _l === void 0 ? void 0 : _l.earnToken.address[bill === null || bill === void 0 ? void 0 : bill.bond.chainId]) || '', earnTokenSymbol: ((_m = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _m === void 0 ? void 0 : _m.earnToken.symbol) || '', bondContract: (_o = bill === null || bill === void 0 ? void 0 : bill.address) !== null && _o !== void 0 ? _o : '', projectLink: (_p = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _p === void 0 ? void 0 : _p.projectLink, twitter: (_q = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _q === void 0 ? void 0 : _q.twitter, chain: (_r = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _r === void 0 ? void 0 : _r.chainId, cgId: (_s = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _s === void 0 ? void 0 : _s.cgId }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex$1, { sx: {
59850
+ return (jsxs("div", { className: "your-bonds", onClick: onOpenPurchasedBond, children: [jsxs("div", { className: "token-info-container", children: [jsx$2(TokenInfoAndName, { tokenSymbol: (_g = (_f = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _f === void 0 ? void 0 : _f.earnToken) === null || _g === void 0 ? void 0 : _g.symbol, chain: (_h = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _h === void 0 ? void 0 : _h.chainId, tag: (_k = (_j = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _j === void 0 ? void 0 : _j.tags) === null || _k === void 0 ? void 0 : _k[0], vestEnds: getTimeLeftForFullyVested(bill) > 0 ? `Ends in ${getPendingVestingString(bill)}` : `Fully Vested`, isHotBond: true }), jsx$2("div", { className: "tooltip-column", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: ((_l = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _l === void 0 ? void 0 : _l.earnToken.address[bill === null || bill === void 0 ? void 0 : bill.bond.chainId]) || '', earnTokenSymbol: ((_m = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _m === void 0 ? void 0 : _m.earnToken.symbol) || '', bondContract: (_o = bill === null || bill === void 0 ? void 0 : bill.address) !== null && _o !== void 0 ? _o : '', projectLink: (_p = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _p === void 0 ? void 0 : _p.projectLink, twitter: (_q = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _q === void 0 ? void 0 : _q.twitter, chain: (_r = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _r === void 0 ? void 0 : _r.chainId, cgId: (_s = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _s === void 0 ? void 0 : _s.cgId, dexscreener: (_t = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _t === void 0 ? void 0 : _t.dexscreener }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex$1, { sx: {
59832
59851
  opacity: 0.8,
59833
59852
  }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }) })] }), jsxs("div", { className: "your-bonds-columns-container", children: [jsx$2(Flex$1, { sx: { width: '125px' }, children: jsx$2(ProfitCard, { userBond: bill }) }), jsxs("div", { className: "your-bonds-content", children: [jsx$2("div", { className: "your-bonds-content-title", children: "Claimable" }), jsxs("div", { className: "your-bonds-content-tokens-amount", children: [formatNumberSI(claimable(bill), 3), jsx$2("div", { className: "your-bonds-content-tokens-usd-amount", children: `($${(claimable(bill) * earnTokenPrice).toFixed(2)})` })] })] }), jsxs("div", { className: "your-bonds-content", children: [jsx$2("div", { className: "your-bonds-content-title", children: "Pending" }), jsxs("div", { className: "your-bonds-content-tokens-amount", children: [formatNumberSI(pending(bill), 3), jsx$2("div", { className: "your-bonds-content-tokens-usd-amount", children: `($${(pending(bill) * earnTokenPrice).toFixed(2)})` })] })] }), jsx$2("div", { className: "your-bonds-content hide-mobile", children: jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: getPercentageVested(bill) }), style: {
59834
59853
  width: '127px',
@@ -59849,7 +59868,7 @@ const UserBondRow = ({ bill }) => {
59849
59868
  };
59850
59869
 
59851
59870
  const UserBondRowSolana = ({ bill }) => {
59852
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
59871
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
59853
59872
  // Hooks
59854
59873
  const SDKConfig = useSDKConfig();
59855
59874
  const { setVisible } = useWalletModal();
@@ -59960,7 +59979,7 @@ const UserBondRowSolana = ({ bill }) => {
59960
59979
  setLoadingTx(false);
59961
59980
  }
59962
59981
  };
59963
- return (jsxs("div", { className: "your-bonds", onClick: () => onOpenPurchasedBond(), children: [jsxs("div", { className: "token-info-container", children: [jsx$2(TokenInfoAndName, { tokenSymbol: (_e = bill.bond) === null || _e === void 0 ? void 0 : _e.earnToken.symbol, chain: (_f = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _f === void 0 ? void 0 : _f.chainId, vestEnds: getTimeLeftForFullyVested(bill) > 0 ? `Ends in ${getPendingVestingString(bill)}` : `Fully Vested`, isHotBond: true }), jsx$2("div", { className: "tooltip-column", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: ((_g = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _g === void 0 ? void 0 : _g.earnToken.address[bill === null || bill === void 0 ? void 0 : bill.bond.chainId]) || '', earnTokenSymbol: ((_h = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _h === void 0 ? void 0 : _h.earnToken.symbol) || '', bondContract: (_j = bill === null || bill === void 0 ? void 0 : bill.address) !== null && _j !== void 0 ? _j : '', projectLink: (_k = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _k === void 0 ? void 0 : _k.projectLink, twitter: (_l = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _l === void 0 ? void 0 : _l.twitter, chain: (_m = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _m === void 0 ? void 0 : _m.chainId, cgId: (_o = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _o === void 0 ? void 0 : _o.cgId }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex, { sx: {
59982
+ return (jsxs("div", { className: "your-bonds", onClick: () => onOpenPurchasedBond(), children: [jsxs("div", { className: "token-info-container", children: [jsx$2(TokenInfoAndName, { tokenSymbol: (_e = bill.bond) === null || _e === void 0 ? void 0 : _e.earnToken.symbol, chain: (_f = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _f === void 0 ? void 0 : _f.chainId, vestEnds: getTimeLeftForFullyVested(bill) > 0 ? `Ends in ${getPendingVestingString(bill)}` : `Fully Vested`, isHotBond: true }), jsx$2("div", { className: "tooltip-column", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: ((_g = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _g === void 0 ? void 0 : _g.earnToken.address[bill === null || bill === void 0 ? void 0 : bill.bond.chainId]) || '', earnTokenSymbol: ((_h = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _h === void 0 ? void 0 : _h.earnToken.symbol) || '', bondContract: (_j = bill === null || bill === void 0 ? void 0 : bill.address) !== null && _j !== void 0 ? _j : '', projectLink: (_k = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _k === void 0 ? void 0 : _k.projectLink, twitter: (_l = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _l === void 0 ? void 0 : _l.twitter, chain: (_m = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _m === void 0 ? void 0 : _m.chainId, cgId: (_o = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _o === void 0 ? void 0 : _o.cgId, dexscreener: (_p = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _p === void 0 ? void 0 : _p.dexscreener }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex, { sx: {
59964
59983
  opacity: 0.8,
59965
59984
  }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }) })] }), jsxs("div", { className: "your-bonds-columns-container", children: [jsx$2(Flex, { sx: { width: '125px' }, children: jsx$2(ProfitCard, { userBond: bill }) }), jsxs("div", { className: "your-bonds-content", children: [jsx$2("div", { className: "your-bonds-content-title", children: "Claimable" }), jsxs("div", { className: "your-bonds-content-tokens-amount", children: [formatNumberSI(claimable(bill), 4), jsx$2("div", { className: "your-bonds-content-tokens-usd-amount", children: `($${(claimable(bill) * earnTokenPrice).toFixed(2)})` })] })] }), jsxs("div", { className: "your-bonds-content", children: [jsx$2("div", { className: "your-bonds-content-title", children: "Pending" }), jsxs("div", { className: "your-bonds-content-tokens-amount", children: [formatNumberSI(pending(bill), 4), jsx$2("div", { className: "your-bonds-content-tokens-usd-amount", children: `($${(pending(bill) * earnTokenPrice).toFixed(2)})` })] })] }), jsx$2("div", { className: "your-bonds-content hide-mobile", children: jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: getPercentageVested(bill) }), style: {
59966
59985
  width: '127px',
@@ -59973,7 +59992,7 @@ const UserBondRowSolana = ({ bill }) => {
59973
59992
  : `Fully Vested.` }) }), jsx$2("div", { className: "your-bonds-column-button", children: !accountSolana ? (jsxs(Button, { className: "button", disabled: claimable(bill) === 0 || loadingTx, load: loadingTx, onClick: (event) => {
59974
59993
  event.stopPropagation();
59975
59994
  setVisible(true);
59976
- }, fullWidth: true, children: ["Connect to ", NETWORK_LABEL[(_p = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _p === void 0 ? void 0 : _p.chainId]] })) : (jsx$2(Button, { className: "button", disabled: claimable(bill) === 0 || loadingTx || isPendingCliff, load: loadingTx, onClick: (event) => {
59995
+ }, fullWidth: true, children: ["Connect to ", NETWORK_LABEL[(_q = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _q === void 0 ? void 0 : _q.chainId]] })) : (jsx$2(Button, { className: "button", disabled: claimable(bill) === 0 || loadingTx || isPendingCliff, load: loadingTx, onClick: (event) => {
59977
59996
  event.stopPropagation();
59978
59997
  if (!loadingTx)
59979
59998
  handleClaim();
@@ -67226,7 +67245,7 @@ const BonusContainer = ({ trueBondPrices, minTier, bonus, airdropTooltip, toolti
67226
67245
  return (jsx$2("div", { className: `discount-column`, children: jsx$2(BonusComponent, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus, airdropTooltip: airdropTooltip, tooltipPosition: isMobile ? tooltipPosition : 'bottomLeft' }) }));
67227
67246
  };
67228
67247
 
67229
- const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billType, tag, bondSoldOut, trueBondPrices, minTier, bonus, airdropTooltip, vestingTermString, vestingCliffString, percentageAvailable, remainingTokensString, projectURL, twitterURL, shortDescription, soldoutBondsCount, isOpen, cgId, }) => {
67248
+ const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billType, tag, bondSoldOut, trueBondPrices, minTier, bonus, airdropTooltip, vestingTermString, vestingCliffString, percentageAvailable, remainingTokensString, projectURL, twitterURL, shortDescription, soldoutBondsCount, isOpen, cgId, dexscreener, }) => {
67230
67249
  var _a, _b, _c;
67231
67250
  const SDKConfig = useSDKConfig();
67232
67251
  const locationPath = window.location.pathname.replace('/', '');
@@ -67262,7 +67281,7 @@ const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billT
67262
67281
  flexDirection: 'column',
67263
67282
  justifyContent: 'center',
67264
67283
  display: ['none', 'none', 'none', 'flex'],
67265
- }, showTooltip: true, toolTip: remainingTokensString })) }), jsx$2("div", { className: "tooltip-column", children: soldoutBondsCount ? (jsxs(Flex, { sx: { gap: '5px', fontSize: '13px', fontWeight: 500, opacity: 0.5 }, children: ["(", soldoutBondsCount, ")", jsx$2(Svg, { icon: "caret", direction: isOpen ? 'up' : 'down', width: "8px" })] })) : (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_b = (_a = payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.address) === null || _a === void 0 ? void 0 : _a[bondChain]) !== null && _b !== void 0 ? _b : '', earnTokenSymbol: (_c = payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol) !== null && _c !== void 0 ? _c : '', bondContract: bondAddress !== null && bondAddress !== void 0 ? bondAddress : '', projectLink: projectURL, twitter: twitterURL, chain: bondChain, isSoldOut: bondSoldOut, billType: billType, cgId: cgId }), 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" }) }) })) })] })] }, `${bondAddress}-${bondChain}`));
67284
+ }, showTooltip: true, toolTip: remainingTokensString })) }), jsx$2("div", { className: "tooltip-column", children: soldoutBondsCount ? (jsxs(Flex, { sx: { gap: '5px', fontSize: '13px', fontWeight: 500, opacity: 0.5 }, children: ["(", soldoutBondsCount, ")", jsx$2(Svg, { icon: "caret", direction: isOpen ? 'up' : 'down', width: "8px" })] })) : (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_b = (_a = payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.address) === null || _a === void 0 ? void 0 : _a[bondChain]) !== null && _b !== void 0 ? _b : '', earnTokenSymbol: (_c = payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol) !== null && _c !== void 0 ? _c : '', bondContract: bondAddress !== null && bondAddress !== void 0 ? bondAddress : '', projectLink: projectURL, twitter: twitterURL, chain: bondChain, isSoldOut: bondSoldOut, billType: billType, cgId: cgId, dexscreener: dexscreener }), 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" }) }) })) })] })] }, `${bondAddress}-${bondChain}`));
67266
67285
  };
67267
67286
 
67268
67287
  const BuyAgainRow = () => {
@@ -67433,7 +67452,7 @@ const HotBondCard = ({ bond }) => {
67433
67452
  },
67434
67453
  });
67435
67454
  };
67436
- return (jsx$2(Flex, { sx: styles$7.desktopCard, className: "hot-bond-card", onClick: handleOpenModal, children: jsxs(Flex, { sx: { flexDirection: 'column', width: '100%' }, children: [jsxs(Flex, { sx: { width: '100%', height: '75px' }, children: [jsx$2(Flex, { sx: { width: '66.66%' }, children: jsx$2(TokenInfoAndName, { tokenSymbol: bond.earnToken.symbol, chain: bond.chainId, tag: (_d = bond.tags) === null || _d === void 0 ? void 0 : _d[0], isHotBond: true }) }), jsx$2(Flex, { className: "column column-tokenicons", sx: { width: '33.33% !important', justifyContent: 'center !important', alignItems: 'center' }, children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_g = (_f = (_e = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _e === void 0 ? void 0 : _e.address) === null || _f === void 0 ? void 0 : _f[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _g !== void 0 ? _g : '', earnTokenSymbol: (_j = (_h = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _h === void 0 ? void 0 : _h.symbol) !== null && _j !== void 0 ? _j : '', bondContract: (_l = (_k = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _k === void 0 ? void 0 : _k[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _l !== void 0 ? _l : '', projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, chain: bond === null || bond === void 0 ? void 0 : bond.chainId, cgId: bond === null || bond === void 0 ? void 0 : bond.cgId }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)", children: jsx$2(Svg, { icon: "more", width: "20px" }) }) })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-around' }, children: [jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400 }, children: "Bonus" }), jsx$2(Flex, { className: `${getDiscountColor(bonus)}`, sx: { width: '100%', justifyContent: 'center' }, children: bonus !== undefined ? (bonus < 0 ? '0%' : `${bonus === null || bonus === void 0 ? void 0 : bonus.toFixed(2)}%`) : '-' })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "ARR" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: calculateARR(bond, SDKConfig.useTiers) })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "Terms" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: ((_m = getTimePeriods(bond === null || bond === void 0 ? void 0 : bond.vestingTerm, true)) === null || _m === void 0 ? void 0 : _m.days)
67455
+ return (jsx$2(Flex, { sx: styles$7.desktopCard, className: "hot-bond-card", onClick: handleOpenModal, children: jsxs(Flex, { sx: { flexDirection: 'column', width: '100%' }, children: [jsxs(Flex, { sx: { width: '100%', height: '75px' }, children: [jsx$2(Flex, { sx: { width: '66.66%' }, children: jsx$2(TokenInfoAndName, { tokenSymbol: bond.earnToken.symbol, chain: bond.chainId, tag: (_d = bond.tags) === null || _d === void 0 ? void 0 : _d[0], isHotBond: true }) }), jsx$2(Flex, { className: "column column-tokenicons", sx: { width: '33.33% !important', justifyContent: 'center !important', alignItems: 'center' }, children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_g = (_f = (_e = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _e === void 0 ? void 0 : _e.address) === null || _f === void 0 ? void 0 : _f[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _g !== void 0 ? _g : '', earnTokenSymbol: (_j = (_h = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _h === void 0 ? void 0 : _h.symbol) !== null && _j !== void 0 ? _j : '', bondContract: (_l = (_k = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _k === void 0 ? void 0 : _k[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _l !== void 0 ? _l : '', projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, chain: bond === null || bond === void 0 ? void 0 : bond.chainId, cgId: bond === null || bond === void 0 ? void 0 : bond.cgId, dexscreener: bond === null || bond === void 0 ? void 0 : bond.dexscreener }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)", children: jsx$2(Svg, { icon: "more", width: "20px" }) }) })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-around' }, children: [jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400 }, children: "Bonus" }), jsx$2(Flex, { className: `${getDiscountColor(bonus)}`, sx: { width: '100%', justifyContent: 'center' }, children: bonus !== undefined ? (bonus < 0 ? '0%' : `${bonus === null || bonus === void 0 ? void 0 : bonus.toFixed(2)}%`) : '-' })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "ARR" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: calculateARR(bond, SDKConfig.useTiers) })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "Terms" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: ((_m = getTimePeriods(bond === null || bond === void 0 ? void 0 : bond.vestingTerm, true)) === null || _m === void 0 ? void 0 : _m.days)
67437
67456
  ? `${(_o = getTimePeriods(bond === null || bond === void 0 ? void 0 : bond.vestingTerm, true)) === null || _o === void 0 ? void 0 : _o.days} D`
67438
67457
  : '-' })] })] })] }) }));
67439
67458
  };
@@ -72735,7 +72754,7 @@ const ActiveBondRows = ({ chain, bonds, hideTitles, showHotBonds }) => {
72735
72754
  const bond = bondFromMap;
72736
72755
  const bondAddress = (_u = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _u === void 0 ? void 0 : _u[bond === null || bond === void 0 ? void 0 : bond.chainId];
72737
72756
  const remainingTokensString = getRemainingTokensString(bond);
72738
- return (jsx$2(BondRow, { bondAddress: bondAddress, bondChain: bond.chainId, marketingCampaign: bond.marketingCampaign, payoutToken: bond.earnToken, billType: bond.billType, tag: (_v = bond.tags) === null || _v === void 0 ? void 0 : _v[0], trueBondPrices: namingPreference === 'Bonus' ? bond.trueBondPrices : undefined, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString, projectURL: bond.projectLink, twitterURL: bond.twitter, bonus: namingPreference === 'Discount' ? `${(_w = bond === null || bond === void 0 ? void 0 : bond.discountWithFee) === null || _w === void 0 ? void 0 : _w.toFixed(2)}%` : undefined, shortDescription: bond.shortDescription, cgId: bond.cgId }, `${bondAddress}-${bond.chainId}-${index}`));
72757
+ return (jsx$2(BondRow, { bondAddress: bondAddress, bondChain: bond.chainId, marketingCampaign: bond.marketingCampaign, payoutToken: bond.earnToken, billType: bond.billType, tag: (_v = bond.tags) === null || _v === void 0 ? void 0 : _v[0], trueBondPrices: namingPreference === 'Bonus' ? bond.trueBondPrices : undefined, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString, projectURL: bond.projectLink, twitterURL: bond.twitter, bonus: namingPreference === 'Discount' ? `${(_w = bond === null || bond === void 0 ? void 0 : bond.discountWithFee) === null || _w === void 0 ? void 0 : _w.toFixed(2)}%` : undefined, shortDescription: bond.shortDescription, cgId: bond.cgId, dexscreener: bond === null || bond === void 0 ? void 0 : bond.dexscreener }, `${bondAddress}-${bond.chainId}-${index}`));
72739
72758
  }
72740
72759
  }), showHotBonds && (jsx$2(SwiperProvider, { children: jsx$2(HotBondCards, {}) }))] }, key))] }) }, key));
72741
72760
  };
@@ -23,6 +23,7 @@ interface BondRowProps {
23
23
  soldoutBondsCount?: number;
24
24
  isOpen?: boolean;
25
25
  cgId?: string;
26
+ dexscreener?: string;
26
27
  }
27
28
  declare const BondRow: React.FC<BondRowProps>;
28
29
  export default BondRow;
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": "5.0.4",
6
+ "version": "5.0.6",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -81,7 +81,7 @@
81
81
  "yalc": "^1.0.0-pre.53"
82
82
  },
83
83
  "dependencies": {
84
- "@ape.swap/apeswap-lists": "4.5.9",
84
+ "@ape.swap/apeswap-lists": "4.5.10",
85
85
  "@emotion/react": "11.14.0",
86
86
  "@jup-ag/api": "6.0.45",
87
87
  "bignumber.js": "^9.1.2",
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const CircularModal: () => React.JSX.Element;
3
- export default CircularModal;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const OABONDModal: () => React.JSX.Element;
3
- export default OABONDModal;