@ape.swap/bonds-sdk 4.5.6 → 4.5.7-test.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.
@@ -1,10 +1,9 @@
1
1
  import React from 'react';
2
- import { ChainId } from '@ape.swap/apeswap-lists';
3
2
  declare const ButtonsRow: React.FC<{
4
3
  projectLink?: string;
5
4
  twitter?: string;
6
- bubble?: string;
5
+ earnTokenContract?: string;
7
6
  audit?: string;
8
- chain?: ChainId;
7
+ cgId?: string;
9
8
  }>;
10
9
  export default ButtonsRow;
@@ -9,6 +9,7 @@ export interface TooltipProps {
9
9
  chain: number;
10
10
  isSoldOut?: boolean;
11
11
  billType?: string;
12
+ cgId?: string;
12
13
  }
13
14
  declare const BondInfoTooltip: React.FunctionComponent<TooltipProps>;
14
15
  export default BondInfoTooltip;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SvgProps } from './types';
3
+ declare const CoinGecko: React.FC<SvgProps>;
4
+ export default CoinGecko;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SvgProps } from './types';
3
+ declare const DexScreener: React.FC<SvgProps>;
4
+ export default DexScreener;
@@ -20,7 +20,8 @@ export declare enum icons {
20
20
  EXPAND = "expand",
21
21
  LINE_CHART = "lineChart",
22
22
  URL = "URL",
23
- BUBBLE = "bubble",
23
+ DEXSCREENER = "dexscreener",
24
+ COINGECKO = "coingecko",
24
25
  AUDIT = "audit",
25
26
  FIRE = "fire",
26
27
  TAG = "tag",
package/dist/main.js CHANGED
@@ -4240,7 +4240,8 @@ var icons;
4240
4240
  icons["EXPAND"] = "expand";
4241
4241
  icons["LINE_CHART"] = "lineChart";
4242
4242
  icons["URL"] = "URL";
4243
- icons["BUBBLE"] = "bubble";
4243
+ icons["DEXSCREENER"] = "dexscreener";
4244
+ icons["COINGECKO"] = "coingecko";
4244
4245
  icons["AUDIT"] = "audit";
4245
4246
  icons["FIRE"] = "fire";
4246
4247
  icons["TAG"] = "tag";
@@ -4624,7 +4625,7 @@ const URL$1 = ({ direction = 'down', color = 'text', width, getStyles }) => {
4624
4625
  return (jsx$2("svg", { width: width || '11', height: "24", viewBox: "0 0 24 24", sx: style, children: jsx$2("path", { d: "M11.99 2C6.47 2 2 6.48 2 12C2 17.52 6.47 22 11.99 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 11.99 2ZM18.92 8H15.97C15.65 6.75 15.19 5.55 14.59 4.44C16.43 5.07 17.96 6.35 18.92 8ZM12 4.04C12.83 5.24 13.48 6.57 13.91 8H10.09C10.52 6.57 11.17 5.24 12 4.04ZM4.26 14C4.1 13.36 4 12.69 4 12C4 11.31 4.1 10.64 4.26 10H7.64C7.56 10.66 7.5 11.32 7.5 12C7.5 12.68 7.56 13.34 7.64 14H4.26ZM5.08 16H8.03C8.35 17.25 8.81 18.45 9.41 19.56C7.57 18.93 6.04 17.66 5.08 16ZM8.03 8H5.08C6.04 6.34 7.57 5.07 9.41 4.44C8.81 5.55 8.35 6.75 8.03 8ZM12 19.96C11.17 18.76 10.52 17.43 10.09 16H13.91C13.48 17.43 12.83 18.76 12 19.96ZM14.34 14H9.66C9.57 13.34 9.5 12.68 9.5 12C9.5 11.32 9.57 10.65 9.66 10H14.34C14.43 10.65 14.5 11.32 14.5 12C14.5 12.68 14.43 13.34 14.34 14ZM14.59 19.56C15.19 18.45 15.65 17.25 15.97 16H18.92C17.96 17.65 16.43 18.93 14.59 19.56ZM16.36 14C16.44 13.34 16.5 12.68 16.5 12C16.5 11.32 16.44 10.66 16.36 10H19.74C19.9 10.64 20 11.31 20 12C20 12.69 19.9 13.36 19.74 14H16.36Z" }) }));
4625
4626
  };
4626
4627
 
4627
- const Bubble = ({ direction = 'down', color = 'text', width, getStyles }) => {
4628
+ const DexScreener = ({ direction = 'down', color = 'text', width, getStyles }) => {
4628
4629
  const deg = {
4629
4630
  left: 90,
4630
4631
  up: 180,
@@ -4635,7 +4636,21 @@ const Bubble = ({ direction = 'down', color = 'text', width, getStyles }) => {
4635
4636
  degree: deg[direction],
4636
4637
  color,
4637
4638
  });
4638
- return (jsxs("svg", { width: width || '13', height: "19", viewBox: "0 0 19 13", sx: style, children: [jsxs("g", { clipPath: "url(#clip0_241_4869)", children: [jsx$2("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.223615 11.8591C0.223615 11.8591 -0.502465 9.34304 0.649961 8.18498C1.54141 7.28917 2.98866 7.28943 3.87985 8.18498C4.77105 9.08053 4.7713 10.5349 3.87985 11.4307C2.72743 12.5887 0.223615 11.8591 0.223615 11.8591Z", fill: "#4D4040" }), jsx$2("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.79913 4.50158C2.98474 3.08414 4.33367 0.842317 4.33367 0.842317C4.33367 0.842317 6.94048 0.7891 7.75487 2.20653L11.4688 8.67068C12.0995 9.76837 11.7245 11.1726 10.6328 11.806C9.54116 12.4394 8.14378 12.0634 7.51311 10.9657L3.79913 4.50158Z", fill: "#4D4040" }), jsx$2("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.0234 4.50158C10.209 3.08414 11.558 0.842317 11.558 0.842317C11.558 0.842317 14.1648 0.7891 14.9792 2.20653L18.6931 8.67068C19.3238 9.76837 18.9488 11.1726 17.8572 11.806C16.7655 12.4394 15.3681 12.0634 14.7374 10.9657L11.0234 4.50158Z", fill: "#4D4040" })] }), jsx$2("defs", { children: jsx$2("clipPath", { id: "clip0_241_4869", children: jsx$2("rect", { width: "19", height: "11.3095", fill: "white", transform: "translate(0 0.845215)" }) }) })] }));
4639
+ return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: width || '18', height: width || '18', viewBox: "0 0 252 300", sx: style, children: [jsx$2("path", { d: "M151.818 106.866c9.177-4.576 20.854-11.312 32.545-20.541 2.465 5.119 2.735 9.586 1.465 13.193-.9 2.542-2.596 4.753-4.826 6.512-2.415 1.901-5.431 3.285-8.765 4.033-6.326 1.425-13.712.593-20.419-3.197m1.591 46.886l12.148 7.017c-24.804 13.902-31.547 39.716-39.557 64.859-8.009-25.143-14.753-50.957-39.556-64.859l12.148-7.017a5.95 5.95 0 003.84-5.845c-1.113-23.547 5.245-33.96 13.821-40.498 3.076-2.342 6.434-3.518 9.747-3.518s6.671 1.176 9.748 3.518c8.576 6.538 14.934 16.951 13.821 40.498a5.95 5.95 0 003.84 5.845zM126 0c14.042.377 28.119 3.103 40.336 8.406 8.46 3.677 16.354 8.534 23.502 14.342 3.228 2.622 5.886 5.155 8.814 8.071 7.897.273 19.438-8.5 24.796-16.709-9.221 30.23-51.299 65.929-80.43 79.589-.012-.005-.02-.012-.029-.018-5.228-3.992-11.108-5.988-16.989-5.988s-11.76 1.996-16.988 5.988c-.009.005-.017.014-.029.018-29.132-13.66-71.209-49.359-80.43-79.589 5.357 8.209 16.898 16.982 24.795 16.709 2.929-2.915 5.587-5.449 8.814-8.071C69.31 16.94 77.204 12.083 85.664 8.406 97.882 3.103 111.959.377 126 0m-25.818 106.866c-9.176-4.576-20.854-11.312-32.544-20.541-2.465 5.119-2.735 9.586-1.466 13.193.901 2.542 2.597 4.753 4.826 6.512 2.416 1.901 5.432 3.285 8.766 4.033 6.326 1.425 13.711.593 20.418-3.197", fill: "currentColor" }), jsx$2("path", { d: "M197.167 75.016c6.436-6.495 12.107-13.684 16.667-20.099l2.316 4.359c7.456 14.917 11.33 29.774 11.33 46.494l-.016 26.532.14 13.754c.54 33.766 7.846 67.929 24.396 99.193l-34.627-27.922-24.501 39.759-25.74-24.231L126 299.604l-41.132-66.748-25.739 24.231-24.501-39.759L0 245.25c16.55-31.264 23.856-65.427 24.397-99.193l.14-13.754-.016-26.532c0-16.721 3.873-31.578 11.331-46.494l2.315-4.359c4.56 6.415 10.23 13.603 16.667 20.099l-2.01 4.175c-3.905 8.109-5.198 17.176-2.156 25.799 1.961 5.554 5.54 10.317 10.154 13.953 4.48 3.531 9.782 5.911 15.333 7.161 3.616.814 7.3 1.149 10.96 1.035-.854 4.841-1.227 9.862-1.251 14.978L53.2 160.984l25.206 14.129a41.926 41.926 0 015.734 3.869c20.781 18.658 33.275 73.855 41.861 100.816 8.587-26.961 21.08-82.158 41.862-100.816a41.865 41.865 0 015.734-3.869l25.206-14.129-32.665-18.866c-.024-5.116-.397-10.137-1.251-14.978 3.66.114 7.344-.221 10.96-1.035 5.551-1.25 10.854-3.63 15.333-7.161 4.613-3.636 8.193-8.399 10.153-13.953 3.043-8.623 1.749-17.689-2.155-25.799l-2.01-4.175z", fill: "currentColor" })] }));
4640
+ };
4641
+
4642
+ const CoinGecko = ({ direction = 'down', color = 'text', width, getStyles }) => {
4643
+ const deg = {
4644
+ left: 90,
4645
+ up: 180,
4646
+ right: 270,
4647
+ down: 0,
4648
+ };
4649
+ const style = getStyles({
4650
+ degree: deg[direction],
4651
+ color,
4652
+ });
4653
+ return (jsxs("svg", { width: width || '18', height: width || '18', viewBox: "0 0 1000 1011", sx: style, children: [jsx$2("g", { clipPath: "url(#clip0_732_1340)", children: jsx$2("path", { d: "M497.766 0.392197C773.882 -0.828538 998.745 223.585 999.995 501.717C1001.14 757.094 813.355 968.919 568.881 1002.85C381.112 1029.33 197.133 948.682 89.6367 791.779C33.5576 710.813 0.483151 612.448 0.00585938 506.257C-1.24422 228.125 221.611 1.65123 497.766 0.392197ZM497.903 31.6422C239.215 32.8217 30.0815 245.033 31.2549 506.117C31.6665 597.691 57.8948 683.018 102.939 755.165C134.57 668.589 140.089 587.87 148.695 483.863C155.815 373.914 185.259 282.593 370.885 231.071C411.689 221.202 454.151 224.377 497.148 234.113C563.17 221.606 636.337 219.49 685.125 300.153C708.309 309.046 731.18 317.264 753.562 323.782L753.523 323.744C944.667 376.291 926.371 481.338 833.185 569.352C809.543 594.008 784.074 617.251 767.66 634.082C700.727 702.699 585.608 832.129 586.387 968.326C804.705 927.334 969.788 733.9 968.745 501.858C967.572 240.775 756.555 30.4985 497.903 31.6422ZM429.07 282.553C375.696 282.553 332.398 326.085 332.397 379.88C332.398 433.675 375.696 477.246 429.07 477.246C482.445 477.246 525.743 433.675 525.743 379.88C525.743 326.124 482.445 282.553 429.07 282.553ZM429.07 298.178C437.715 298.178 446.05 299.546 453.872 302.08C437.212 307.802 423.443 323.825 416.208 345.052L467.438 379.206L416.203 413.361C423.738 435.478 438.364 451.95 455.964 457.009C447.543 459.997 438.49 461.621 429.07 461.621C384.426 461.621 348.023 425.147 348.022 379.88C348.023 334.622 384.418 298.178 429.07 298.178Z", fill: "currentColor" }) }), jsx$2("defs", { children: jsx$2("clipPath", { id: "clip0_732_1340", children: jsx$2("rect", { width: "1000", height: "1010.61", fill: "white", transform: "translate(0 0.38739)" }) }) })] }));
4639
4654
  };
4640
4655
 
4641
4656
  const Audit = ({ direction = 'down', color = 'text', width, getStyles }) => {
@@ -4908,8 +4923,10 @@ const Svg = (_a) => {
4908
4923
  return jsx$2(PlaceholderMonkey$1, Object.assign({}, props, { getStyles: getStyles }));
4909
4924
  case icons.URL:
4910
4925
  return jsx$2(URL$1, Object.assign({}, props, { getStyles: getStyles }));
4911
- case icons.BUBBLE:
4912
- return jsx$2(Bubble, Object.assign({}, props, { getStyles: getStyles }));
4926
+ case icons.DEXSCREENER:
4927
+ return jsx$2(DexScreener, Object.assign({}, props, { getStyles: getStyles }));
4928
+ case icons.COINGECKO:
4929
+ return jsx$2(CoinGecko, Object.assign({}, props, { getStyles: getStyles }));
4913
4930
  case icons.AUDIT:
4914
4931
  return jsx$2(Audit, Object.assign({}, props, { getStyles: getStyles }));
4915
4932
  case icons.FIRE:
@@ -65203,7 +65220,7 @@ function fetchUserOwnedSolanaBonds(user, bondData, tokenPrices, priceApiUrl) {
65203
65220
  address: bondPda.toBase58(),
65204
65221
  id: idTrimmed,
65205
65222
  asset: nftMint.toBase58(),
65206
- vesting: bondAccount.vesting.toString(),
65223
+ // vesting: bondAccount.vesting.toString(),
65207
65224
  vestingTerm: bondAccount.vestingTerm.toString(),
65208
65225
  payout: (Number(bondAccount.payout) - Number(bondAccount.payoutClaimed)).toString(),
65209
65226
  totalPayout: bondAccount.payout.toString(),
@@ -76103,19 +76120,10 @@ const styles$a = {
76103
76120
  },
76104
76121
  };
76105
76122
 
76106
- const ButtonsRow = ({ projectLink, twitter, bubble, audit, chain }) => {
76107
- const bubbleChainStringMap = {
76108
- [main.ChainId.BSC]: 'bsc',
76109
- [main.ChainId.MAINNET]: 'eth',
76110
- [main.ChainId.ARBITRUM]: 'arbi',
76111
- [main.ChainId.MATIC]: 'poly',
76112
- [main.ChainId.BASE]: 'base',
76113
- // [ChainId.SONIC]: 'sonic'
76114
- };
76115
- //@ts-ignore
76116
- const bubbleChain = bubbleChainStringMap[chain];
76117
- const bubbleURL = `https://app.bubblemaps.io/${bubbleChain}/token/${bubble}`;
76118
- 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" }) }), bubble && bubbleChain && (jsx$2(Flex, { sx: styles$a.iconButton, as: Link, href: bubbleURL, target: "_blank", children: jsx$2(Svg, { icon: "bubble", width: 18, color: "text" }) })), audit && (jsxs(Flex, { sx: Object.assign(Object.assign({}, styles$a.iconButton), { margin: '0 0 5px 0', '& svg': { marginRight: '5px' } }), as: Link, href: audit, target: "_blank", children: [jsx$2(Svg, { icon: "audit", width: 18, color: "text" }), jsx$2(Text, { sx: { paddingRight: '5px' }, children: 'Audit' })] }))] }));
76123
+ const ButtonsRow = ({ projectLink, twitter, earnTokenContract, audit, cgId }) => {
76124
+ const dexscreenerURL = earnTokenContract ? `https://dexscreener.com/search?q=${earnTokenContract}` : undefined;
76125
+ const coingeckoURL = cgId ? `https://www.coingecko.com/en/coins/${cgId}` : undefined;
76126
+ 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" }) })), audit && (jsxs(Flex, { sx: Object.assign(Object.assign({}, styles$a.iconButton), { margin: '0 0 5px 0', '& svg': { marginRight: '5px' } }), as: Link, href: audit, target: "_blank", children: [jsx$2(Svg, { icon: "audit", width: 18, color: "text" }), jsx$2(Text, { sx: { paddingRight: '5px' }, children: 'Audit' })] }))] }));
76119
76127
  };
76120
76128
 
76121
76129
  const ExpandedViewButton = ({ handleNavigation, rightPos }) => {
@@ -76135,7 +76143,7 @@ const ExpandedViewButton = ({ handleNavigation, rightPos }) => {
76135
76143
  }, onClick: handleNavigation, children: ["Project Info", jsx$2(Flex, { sx: { ml: '4px' }, children: jsx$2(Svg, { icon: "expand", width: 20, color: "white" }) })] }) }));
76136
76144
  };
76137
76145
 
76138
- const BondInfoTooltip = ({ earnTokenContract, earnTokenSymbol, bondContract, projectLink, twitter, audit, chain, isSoldOut = false, billType, }) => {
76146
+ const BondInfoTooltip = ({ earnTokenContract, earnTokenSymbol, bondContract, projectLink, twitter, audit, chain, isSoldOut = false, billType, cgId, }) => {
76139
76147
  const config = useSDKConfig();
76140
76148
  const explorerLink = BLOCK_EXPLORER[chain];
76141
76149
  const urlPage = chain === main.ChainId.SOL ? 'account' : 'address';
@@ -76154,11 +76162,11 @@ const BondInfoTooltip = ({ earnTokenContract, earnTokenSymbol, bondContract, pro
76154
76162
  },
76155
76163
  });
76156
76164
  };
76157
- return (jsxs(Flex, { sx: { flexDirection: 'column', flexWrap: 'wrap' }, children: [jsx$2(ButtonsRow, { twitter: twitter, projectLink: projectLink, bubble: earnTokenContract, audit: audit, chain: chain }), (config === null || config === void 0 ? void 0 : config.referenceId) === 'apebond' && !isSoldOut && billType !== 'fcfs' && chain !== main.ChainId.SOL && (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' && chain !== main.ChainId.SOL && (jsxs(Link, { href: bondDashboard, sx: styles$a.link, target: "_blank", children: ["View Bond Insights", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) })] }) })] }));
76165
+ return (jsxs(Flex, { sx: { flexDirection: 'column', flexWrap: 'wrap' }, children: [jsx$2(ButtonsRow, { twitter: twitter, projectLink: projectLink, earnTokenContract: earnTokenContract, audit: audit, cgId: cgId }), (config === null || config === void 0 ? void 0 : config.referenceId) === 'apebond' && !isSoldOut && billType !== 'fcfs' && chain !== main.ChainId.SOL && (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' && chain !== main.ChainId.SOL && (jsxs(Link, { href: bondDashboard, sx: styles$a.link, target: "_blank", children: ["View Bond Insights", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) })] }) })] }));
76158
76166
  };
76159
76167
 
76160
76168
  const UserBondRow = ({ bill }) => {
76161
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
76169
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
76162
76170
  // Hooks
76163
76171
  const userChainId = useChainId();
76164
76172
  const SDKConfig = useSDKConfig();
@@ -76233,7 +76241,7 @@ const UserBondRow = ({ bill }) => {
76233
76241
  }
76234
76242
  /* eslint-disable react-hooks/exhaustive-deps */
76235
76243
  }, [isConfirmed]);
76236
- 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, audit: (_r = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _r === void 0 ? void 0 : _r.audit, chain: (_s = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _s === void 0 ? void 0 : _s.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex$1, { sx: {
76244
+ 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, audit: (_r = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _r === void 0 ? void 0 : _r.audit, chain: (_s = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _s === void 0 ? void 0 : _s.chainId, cgId: (_t = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _t === void 0 ? void 0 : _t.cgId }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex$1, { sx: {
76237
76245
  opacity: 0.8,
76238
76246
  }, 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: {
76239
76247
  width: '127px',
@@ -76243,12 +76251,12 @@ const UserBondRow = ({ bill }) => {
76243
76251
  display: ['none', 'none', 'none', 'flex'],
76244
76252
  }, showTooltip: true, toolTip: getTimeLeftForFullyVested(bill) > 0
76245
76253
  ? `Fully vested in ${getPendingVestingString(bill)}.`
76246
- : `Fully Vested.` }) }), jsx$2("div", { className: "your-bonds-column-button", children: userChainId !== ((_t = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _t === void 0 ? void 0 : _t.chainId) ? (jsxs(Button, { className: "button", disabled: claimable(bill) === 0 || load, load: load, onClick: (event) => {
76254
+ : `Fully Vested.` }) }), jsx$2("div", { className: "your-bonds-column-button", children: userChainId !== ((_u = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _u === void 0 ? void 0 : _u.chainId) ? (jsxs(Button, { className: "button", disabled: claimable(bill) === 0 || load, load: load, onClick: (event) => {
76247
76255
  var _a;
76248
76256
  event.stopPropagation();
76249
76257
  // Add your claim logic here
76250
76258
  switchChain({ chainId: (_a = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _a === void 0 ? void 0 : _a.chainId });
76251
- }, fullWidth: true, children: ["Switch to ", NETWORK_LABEL[(_u = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _u === void 0 ? void 0 : _u.chainId].replace(/testnet/i, '[T]')] })) : (jsx$2(Button, { className: "button", disabled: claimable(bill) === 0 || load || isPendingCliff, load: load, onClick: (event) => {
76259
+ }, fullWidth: true, children: ["Switch to ", NETWORK_LABEL[(_v = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _v === void 0 ? void 0 : _v.chainId].replace(/testnet/i, '[T]')] })) : (jsx$2(Button, { className: "button", disabled: claimable(bill) === 0 || load || isPendingCliff, load: load, onClick: (event) => {
76252
76260
  event.stopPropagation();
76253
76261
  handleClaim(bill.id, bill.address);
76254
76262
  }, fullWidth: true, children: isPendingCliff
@@ -76257,7 +76265,7 @@ const UserBondRow = ({ bill }) => {
76257
76265
  };
76258
76266
 
76259
76267
  const UserBondRowSolana = ({ bill }) => {
76260
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
76268
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
76261
76269
  // Hooks
76262
76270
  const SDKConfig = useSDKConfig();
76263
76271
  const { setVisible } = useWalletModal();
@@ -76368,7 +76376,7 @@ const UserBondRowSolana = ({ bill }) => {
76368
76376
  setLoadingTx(false);
76369
76377
  }
76370
76378
  });
76371
- 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, audit: (_m = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _m === void 0 ? void 0 : _m.audit, chain: (_o = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _o === void 0 ? void 0 : _o.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex, { sx: {
76379
+ 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, audit: (_m = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _m === void 0 ? void 0 : _m.audit, chain: (_o = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _o === void 0 ? void 0 : _o.chainId, cgId: (_p = bill === null || bill === void 0 ? void 0 : bill.bond) === null || _p === void 0 ? void 0 : _p.cgId }), width: "205px", placement: "bottomRight", transformTip: "translate(5%, 0%)", children: jsx$2(Flex, { sx: {
76372
76380
  opacity: 0.8,
76373
76381
  }, 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: {
76374
76382
  width: '127px',
@@ -76381,7 +76389,7 @@ const UserBondRowSolana = ({ bill }) => {
76381
76389
  : `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) => {
76382
76390
  event.stopPropagation();
76383
76391
  setVisible(true);
76384
- }, 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) => {
76392
+ }, 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) => {
76385
76393
  event.stopPropagation();
76386
76394
  if (!loadingTx)
76387
76395
  handleClaim();
@@ -76409,7 +76417,7 @@ const fetchPreTGEUserBonds = (chains, tokenPrices, preTGEList, account, apiUrl)
76409
76417
  try {
76410
76418
  const preTGEBonds = preTGEList.filter((bond) => chains.includes(bond.chainId));
76411
76419
  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;
76420
+ 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
76421
  try {
76414
76422
  const calls = [
76415
76423
  {
@@ -76469,10 +76477,12 @@ const fetchPreTGEUserBonds = (chains, tokenPrices, preTGEList, account, apiUrl)
76469
76477
  .toString(),
76470
76478
  payoutClaimed: (_r = billData[0][0]) === null || _r === void 0 ? void 0 : _r.payoutClaimed.toString(),
76471
76479
  billNftAddress: (_s = billData[1][0]) === null || _s === void 0 ? void 0 : _s.toString(),
76472
- vesting: (_u = (_t = billData[0][0]) === null || _t === void 0 ? void 0 : _t.vesting) === null || _u === void 0 ? void 0 : _u.toString(),
76480
+ // vesting: billData[0][0]?.vesting?.toString(),
76481
+ vestingTerm: (_u = (_t = billData[0][0]) === null || _t === void 0 ? void 0 : _t.vestingTerm) === null || _u === void 0 ? void 0 : _u.toString(),
76473
76482
  lastBlockTimestamp: (_w = (_v = billData[0][0]) === null || _v === void 0 ? void 0 : _v.lastClaimTimestamp) === null || _w === void 0 ? void 0 : _w.toString(),
76474
- truePricePaid: (_y = (_x = billData[0][0]) === null || _x === void 0 ? void 0 : _x.truePricePaid) === null || _y === void 0 ? void 0 : _y.toString(),
76475
- pendingRewards: (_z = billData[2][0]) === null || _z === void 0 ? void 0 : _z.toString(),
76483
+ vestingStartTimestamp: (_y = (_x = billData[0][0]) === null || _x === void 0 ? void 0 : _x.vestingStartTimestamp) === null || _y === void 0 ? void 0 : _y.toString(),
76484
+ truePricePaid: (_0 = (_z = billData[0][0]) === null || _z === void 0 ? void 0 : _z.truePricePaid) === null || _0 === void 0 ? void 0 : _0.toString(),
76485
+ pendingRewards: (_1 = billData[2][0]) === null || _1 === void 0 ? void 0 : _1.toString(),
76476
76486
  };
76477
76487
  }
76478
76488
  const accountInfo = {
@@ -76488,11 +76498,11 @@ const fetchPreTGEUserBonds = (chains, tokenPrices, preTGEList, account, apiUrl)
76488
76498
  };
76489
76499
  const finalized = res[3][0];
76490
76500
  const terms = res[4];
76491
- const vestingTerm = (_0 = terms === null || terms === void 0 ? void 0 : terms.vestingTerm) === null || _0 === void 0 ? void 0 : _0.toNumber();
76492
- const trueBillPrice = (_1 = res[5]) === null || _1 === void 0 ? void 0 : _1[0];
76493
- const initPrice = getBalanceNumber(new BigNumber$1(trueBillPrice.toString()), (_3 = (_2 = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _2 === void 0 ? void 0 : _2.decimals) === null || _3 === void 0 ? void 0 : _3[bond === null || bond === void 0 ? void 0 : bond.chainId]);
76501
+ const vestingTerm = (_2 = terms === null || terms === void 0 ? void 0 : terms.vestingTerm) === null || _2 === void 0 ? void 0 : _2.toNumber();
76502
+ const trueBillPrice = (_3 = res[5]) === null || _3 === void 0 ? void 0 : _3[0];
76503
+ 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
76504
  const initialRelease = terms === null || terms === void 0 ? void 0 : terms.initialRelease;
76495
- const earnTokenPrice = (_5 = (_4 = tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices[bond === null || bond === void 0 ? void 0 : bond.chainId]) === null || _4 === void 0 ? void 0 : _4.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 || _5 === void 0 ? void 0 : _5.price;
76505
+ 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
76506
  return Object.assign(Object.assign({}, bond), { accountInfo,
76497
76507
  userOwnedBillsData,
76498
76508
  finalized,
@@ -81812,7 +81822,7 @@ const BonusContainer = ({ trueBondPrices, minTier, bonus, airdropTooltip, toolti
81812
81822
  return (jsx$2("div", { className: `discount-column`, children: jsx$2(BonusComponent, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus, airdropTooltip: airdropTooltip, tooltipPosition: isMobile ? tooltipPosition : 'bottomLeft' }) }));
81813
81823
  };
81814
81824
 
81815
- const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billType, tag, bondSoldOut, trueBondPrices, minTier, bonus, airdropTooltip, vestingTermString, vestingCliffString, percentageAvailable, remainingTokensString, projectURL, twitterURL, auditURL, shortDescription, soldoutBondsCount, isOpen, }) => {
81825
+ const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billType, tag, bondSoldOut, trueBondPrices, minTier, bonus, airdropTooltip, vestingTermString, vestingCliffString, percentageAvailable, remainingTokensString, projectURL, twitterURL, auditURL, shortDescription, soldoutBondsCount, isOpen, cgId, }) => {
81816
81826
  var _a, _b, _c;
81817
81827
  const SDKConfig = useSDKConfig();
81818
81828
  const locationPath = window.location.pathname.replace('/', '');
@@ -81848,7 +81858,7 @@ const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billT
81848
81858
  flexDirection: 'column',
81849
81859
  justifyContent: 'center',
81850
81860
  display: ['none', 'none', 'none', 'flex'],
81851
- }, 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, audit: auditURL, chain: bondChain, isSoldOut: bondSoldOut, billType: billType }), 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}`));
81861
+ }, 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, audit: auditURL, 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}`));
81852
81862
  };
81853
81863
 
81854
81864
  // import useUserApiStats from '../../../../state/bondApiStats/useUserApiStats'
@@ -82037,7 +82047,7 @@ const HotBondCard = ({ bond }) => {
82037
82047
  },
82038
82048
  });
82039
82049
  };
82040
- 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, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: bond === null || bond === void 0 ? void 0 : bond.chainId }), 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)
82050
+ 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, audit: bond === null || bond === void 0 ? void 0 : bond.audit, 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)
82041
82051
  ? `${(_o = getTimePeriods(bond === null || bond === void 0 ? void 0 : bond.vestingTerm, true)) === null || _o === void 0 ? void 0 : _o.days} D`
82042
82052
  : '-' })] })] })] }) }));
82043
82053
  };
@@ -87339,7 +87349,7 @@ const ActiveBondRows = ({ chain, bonds, hideTitles, showHotBonds }) => {
87339
87349
  const bond = bondFromMap;
87340
87350
  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];
87341
87351
  const remainingTokensString = getRemainingTokensString(bond);
87342
- 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, auditURL: bond.audit, 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 }, `${bondAddress}-${bond.chainId}-${index}`));
87352
+ 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, auditURL: bond.audit, 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}`));
87343
87353
  }
87344
87354
  }), showHotBonds && (jsx$2(SwiperProvider, { children: jsx$2(HotBondCards, {}) }))] }, key))] }) }, key));
87345
87355
  };
@@ -104277,23 +104287,23 @@ const PriceChart = ({ selectedBond, historicalPrices, }) => {
104277
104287
  return (jsxs(Flex, { sx: styles.priceContainer, children: [jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between', mb: '15px', pr: '20px' }, children: [jsx$2(Flex, { children: "Prices" }), jsxs(Flex, { children: [jsxs(Flex, { sx: { color: hasDiscount ? 'success' : 'error', fontSize: '12px', fontWeight: 500, mr: '15px' }, children: ["Bond Price: $", bondPrice] }), jsxs(Flex, { sx: { color: 'textDisabledButton', fontSize: '12px', fontWeight: 500 }, children: ["Market Price: $", getFirstNonZeroDigits(earnTokenPrice !== null && earnTokenPrice !== void 0 ? earnTokenPrice : 0)] })] })] }), show && (jsxs(Flex, { sx: styles.container, children: [jsxs(Flex, { sx: styles.buttonsContainer, children: [jsx$2(Flex, { sx: Object.assign(Object.assign({}, styles.button), { mr: '15px' }), onClick: () => setChartOption('line'), children: jsx$2(Svg, { icon: "lineChart", width: 20 }) }), jsx$2(Flex, { sx: styles.button, onClick: () => setChartOption('candleStick'), children: "D" })] }), historicalPrices && historicalPrices.length > 0 ? (chartOption === 'line' ? (jsx$2(LineChart, { historicalPrices: historicalPrices, hasDiscount: hasDiscount, bondPrice: bondPrice, tokenPrice: (_c = selectedBond.payoutTokenPrice) !== null && _c !== void 0 ? _c : '0' })) : (jsx$2(CandleStickChart, { historicalPrices: historicalPrices, hasDiscount: hasDiscount, bondPrice: bondPrice, tokenPrice: (_d = selectedBond.payoutTokenPrice) !== null && _d !== void 0 ? _d : '0' }))) : (jsxs(Flex, { sx: { flexDirection: 'column', justifyContent: 'center', alignItems: 'center', width: '100%' }, children: [jsx$2(Svg, { icon: "placeholderMonkey" }), jsx$2(Flex, { sx: { mt: '15px' }, children: "No Historical Price for this Token" })] }))] }))] }));
104278
104288
  };
104279
104289
 
104280
- function useHistoricalPrice(cmcId) {
104290
+ function useHistoricalPrice(cgId) {
104281
104291
  const queryClient = useQueryClient();
104282
104292
  return useQuery({
104283
- queryKey: [QUERY_KEYS.HISTORICAL_PRICE, cmcId || ''],
104284
- queryFn: () => getHistoricalPrice(cmcId, queryClient),
104293
+ queryKey: [QUERY_KEYS.HISTORICAL_PRICE, cgId || ''],
104294
+ queryFn: () => getHistoricalPrice(cgId, queryClient),
104285
104295
  refetchOnWindowFocus: false,
104286
104296
  refetchInterval: 300000,
104287
- enabled: !!cmcId,
104297
+ enabled: !!cgId,
104288
104298
  retry: 0,
104289
104299
  });
104290
104300
  }
104291
- const getHistoricalPrice = (cmcId, queryClient) => __awaiter$9(void 0, void 0, void 0, function* () {
104301
+ const getHistoricalPrice = (cgId, queryClient) => __awaiter$9(void 0, void 0, void 0, function* () {
104292
104302
  const { urls } = queryClient === null || queryClient === void 0 ? void 0 : queryClient.getQueryData([QUERY_KEYS.SDK_CONFIG]);
104293
104303
  const apiUrl = urls['apiV2'];
104294
- if (!cmcId)
104304
+ if (!cgId)
104295
104305
  return [];
104296
- const res = yield fetch(`${apiUrl}/stats/historical-prices?cmcId=${cmcId}`);
104306
+ const res = yield fetch(`${apiUrl}/stats/historical-prices?cgId=${cgId}`);
104297
104307
  const data = yield res.json();
104298
104308
  return data;
104299
104309
  });
@@ -104308,7 +104318,7 @@ const ProjectView = ({ bondAddress, bondChain }) => {
104308
104318
  return ((_b = (_a = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _a === void 0 ? void 0 : _a[bond.chainId]) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === (bondAddress === null || bondAddress === void 0 ? void 0 : bondAddress.toLowerCase()) &&
104309
104319
  bondChain === bond.chainId.toString();
104310
104320
  });
104311
- const { data: historicalPrices } = useHistoricalPrice(bondData === null || bondData === void 0 ? void 0 : bondData.cmcId);
104321
+ const { data: historicalPrices } = useHistoricalPrice(bondData === null || bondData === void 0 ? void 0 : bondData.cgId);
104312
104322
  useEffect(() => {
104313
104323
  var _a;
104314
104324
  if (((_a = bonds === null || bonds === void 0 ? void 0 : bonds.length) !== null && _a !== void 0 ? _a : 0) > 0 && !bondData) {
@@ -1,4 +1,4 @@
1
1
  import { QueryClient, UseQueryResult } from '@tanstack/react-query';
2
2
  import { HistoricalPrices } from '../../views/ProjectView/ProjectView';
3
- export default function useHistoricalPrice(cmcId?: number): UseQueryResult<HistoricalPrices[]>;
4
- export declare const getHistoricalPrice: (cmcId?: number, queryClient?: QueryClient) => Promise<HistoricalPrices[]>;
3
+ export default function useHistoricalPrice(cgId?: string): UseQueryResult<HistoricalPrices[]>;
4
+ export declare const getHistoricalPrice: (cgId?: string, queryClient?: QueryClient) => Promise<HistoricalPrices[]>;
@@ -8,7 +8,6 @@ export interface UserBill {
8
8
  address: string;
9
9
  id: string;
10
10
  asset?: string;
11
- vesting: string;
12
11
  vestingTerm?: string;
13
12
  payout: string;
14
13
  totalPayout?: string;
@@ -23,6 +23,7 @@ interface BondRowProps {
23
23
  shortDescription?: string;
24
24
  soldoutBondsCount?: number;
25
25
  isOpen?: boolean;
26
+ cgId?: 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": "4.5.6",
6
+ "version": "4.5.7-test.0",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -31,12 +31,12 @@
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@rainbow-me/rainbowkit": "^2.1.7",
34
- "@tanstack/react-query": "5.x",
35
34
  "@solana/kit": "2.3.0",
36
35
  "@solana/spl-token": "^0.4.14",
37
36
  "@solana/wallet-adapter-react": "^0.15.39",
38
37
  "@solana/wallet-adapter-react-ui": "^0.9.39",
39
38
  "@solana/web3.js": "^1.98.4",
39
+ "@tanstack/react-query": "5.x",
40
40
  "axios": "^1.8.2",
41
41
  "react": ">=17 <19",
42
42
  "react-dom": ">=17 <19",
@@ -74,13 +74,13 @@
74
74
  "typescript": "^5.0.0",
75
75
  "typescript-eslint": "^8.34.0",
76
76
  "vite": "^7.2.6",
77
- "yalc": "^1.0.0-pre.53",
78
- "wagmi": "2.19.5"
77
+ "wagmi": "2.19.5",
78
+ "yalc": "^1.0.0-pre.53"
79
79
  },
80
80
  "dependencies": {
81
- "@jup-ag/api": "6.0.45",
82
- "@ape.swap/apeswap-lists": "4.5.2",
81
+ "@ape.swap/apeswap-lists": "^4.5.3",
83
82
  "@emotion/react": "11.14.0",
83
+ "@jup-ag/api": "6.0.45",
84
84
  "bignumber.js": "^9.1.2",
85
85
  "buffer": "^6.0.3",
86
86
  "chart.js": "4.5.0",
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { SvgProps } from './types';
3
- declare const Bubble: React.FC<SvgProps>;
4
- export default Bubble;