@ape.swap/bonds-sdk 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -18843,9 +18843,12 @@ var Svg = function (_a) {
18843
18843
  }
18844
18844
  };
18845
18845
 
18846
- var Bonds = function () {
18847
- var _a = React$1.useState([]), bondData = _a[0], setBondData = _a[1];
18848
- var _b = React$1.useState([]), hotBonds = _b[0], setHotBonds = _b[1];
18846
+ var Bonds = function (_a) {
18847
+ var connectionString = _a.connectionString;
18848
+ // Use connectionType as needed within your Bonds component
18849
+ console.log(connectionString); // Example usage
18850
+ var _b = React$1.useState([]), bondData = _b[0], setBondData = _b[1];
18851
+ var _c = React$1.useState([]), hotBonds = _c[0], setHotBonds = _c[1];
18849
18852
  var vestingTime = function (vestingTerm) {
18850
18853
  return getTimePeriods(vestingTerm !== null && vestingTerm !== void 0 ? vestingTerm : 0, true);
18851
18854
  };
@@ -18877,7 +18880,7 @@ var Bonds = function () {
18877
18880
  return a.discount - b.discount;
18878
18881
  }
18879
18882
  });
18880
- return (jsx(ThemeProvider, { theme: defaultTheme, children: jsxs(Flex, { className: "container table-container", sx: styles$1.tableContainer, children: [jsxs(Flex, { className: "container header-container", sx: styles$1.headerContainer, children: [jsx(Flex, { className: "column column-header", children: "Tokens" }), jsxs(Flex, { className: "column column-header", children: ["Discount", jsx(Flex, { classname: "tooltip tooltip-icon", children: jsx(TooltipBubble, { placement: 'bottomLeft', body: jsx(Flex, { children: ("This is the percentage discount relative to the token's current market price.") }), width: '165px', children: jsx(Flex, { className: "icon icon-tooltip", children: jsx(Svg, { icon: "bubble" }) }) }) })] }), jsxs(Flex, { className: "column column-header", children: ["ARR", jsx(Flex, { classname: "tooltip tooltip-icon", children: jsx(TooltipBubble, { placement: 'bottomLeft', body: jsx(Flex, { children: ("This is the Annualized Rate of Return you would receive considering the current discount, adjusted for APR.") }), width: '165px', children: jsx(Flex, { className: "icon icon-tooltip", children: jsx(Svg, { icon: "bubble" }) }) }) })] }), jsxs(Flex, { className: "column column-header", children: ["Terms", jsx(Flex, { classname: "tooltip tooltip-icon", children: jsx(TooltipBubble, { placement: 'bottomLeft', body: jsx(Flex, { children: ("This is the amount of days it will take for all tokens in the Bond to fully vest.") }), width: '165px', children: jsx(Flex, { className: "icon icon-tooltip", children: jsx(Svg, { icon: "bubble" }) }) }) })] }), jsxs(Flex, { className: "column column-header", children: ["Tokens Remaining", jsx(Flex, { classname: "tooltip tooltip-icon", children: jsx(TooltipBubble, { placement: 'bottomLeft', body: jsx(Flex, { children: ("This is the amount of remaining tokens for sale in this Bond.") }), width: '165px', children: jsx(Flex, { className: "icon icon-tooltip", children: jsx(Svg, { icon: "bubble" }) }) }) })] }), jsx(Flex, { className: "column column-header" })] }), sortedBonds.map(function (bond) {
18883
+ return (jsx(ThemeProvider, { theme: defaultTheme, children: jsxs(Flex, { className: "container table-container", sx: styles$1.tableContainer, children: [jsx("h1", { children: connectionString !== null && connectionString !== void 0 ? connectionString : "TEST" }), jsxs(Flex, { className: "container header-container", sx: styles$1.headerContainer, children: [jsx(Flex, { className: "column column-header", children: "Tokens" }), jsxs(Flex, { className: "column column-header", children: ["Discount", jsx(Flex, { classname: "tooltip tooltip-icon", children: jsx(TooltipBubble, { placement: 'bottomLeft', body: jsx(Flex, { children: ("This is the percentage discount relative to the token's current market price.") }), width: '165px', children: jsx(Flex, { className: "icon icon-tooltip", children: jsx(Svg, { icon: "bubble" }) }) }) })] }), jsxs(Flex, { className: "column column-header", children: ["ARR", jsx(Flex, { classname: "tooltip tooltip-icon", children: jsx(TooltipBubble, { placement: 'bottomLeft', body: jsx(Flex, { children: ("This is the Annualized Rate of Return you would receive considering the current discount, adjusted for APR.") }), width: '165px', children: jsx(Flex, { className: "icon icon-tooltip", children: jsx(Svg, { icon: "bubble" }) }) }) })] }), jsxs(Flex, { className: "column column-header", children: ["Terms", jsx(Flex, { classname: "tooltip tooltip-icon", children: jsx(TooltipBubble, { placement: 'bottomLeft', body: jsx(Flex, { children: ("This is the amount of days it will take for all tokens in the Bond to fully vest.") }), width: '165px', children: jsx(Flex, { className: "icon icon-tooltip", children: jsx(Svg, { icon: "bubble" }) }) }) })] }), jsxs(Flex, { className: "column column-header", children: ["Tokens Remaining", jsx(Flex, { classname: "tooltip tooltip-icon", children: jsx(TooltipBubble, { placement: 'bottomLeft', body: jsx(Flex, { children: ("This is the amount of remaining tokens for sale in this Bond.") }), width: '165px', children: jsx(Flex, { className: "icon icon-tooltip", children: jsx(Svg, { icon: "bubble" }) }) }) })] }), jsx(Flex, { className: "column column-header" })] }), sortedBonds.map(function (bond) {
18881
18884
  var _a, _b, _c, _d;
18882
18885
  return (jsxs(Flex, { className: "container bondrow-container", sx: styles$1.bondrowContainer, children: [jsx(Flex, { className: "column column-token", sx: styles$1.columnToken, children: bond.showcaseTokenName }), jsx(Flex, { className: "column column-discount", sx: getColumnDiscountStyle((_a = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _a !== void 0 ? _a : 0), children: "".concat((_b = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _b === void 0 ? void 0 : _b.toFixed(2), "%") }), jsx(Flex, { className: "column column-arr", sx: styles$1.columnArr, children: "".concat("".concat(((((_c = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _c !== void 0 ? _c : 0) * 365) / vestingTime(bond.vestingTerm).days).toFixed(2), "%")) }), jsx(Flex, { className: "column column-term", sx: styles$1.columnTerm, children: vestingTime(bond.vestingTerm).days ? "".concat(vestingTime(bond.vestingTerm).days, " D") : '-' }), jsx(Flex, { className: "column column-tokensremaining", sx: styles$1.columnTokensRemaining, children: bond.tokensRemaining.split('.')[0] }), jsx(Flex, { className: "column column-hotbond", sx: styles$1.hotBond, children: jsx(Flex, { className: "icon icon-tooltip", children: hotBonds.includes(bond.billAddress.toLowerCase()) && ((_d = bond.discount) !== null && _d !== void 0 ? _d : 0) > 0 && (jsx(Svg, { icon: "fire", width: "20px" })) }) })] }));
18883
18886
  })] }) }));