@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/esm/index.js
CHANGED
|
@@ -18823,9 +18823,12 @@ var Svg = function (_a) {
|
|
|
18823
18823
|
}
|
|
18824
18824
|
};
|
|
18825
18825
|
|
|
18826
|
-
var Bonds = function () {
|
|
18827
|
-
var
|
|
18828
|
-
|
|
18826
|
+
var Bonds = function (_a) {
|
|
18827
|
+
var connectionString = _a.connectionString;
|
|
18828
|
+
// Use connectionType as needed within your Bonds component
|
|
18829
|
+
console.log(connectionString); // Example usage
|
|
18830
|
+
var _b = useState([]), bondData = _b[0], setBondData = _b[1];
|
|
18831
|
+
var _c = useState([]), hotBonds = _c[0], setHotBonds = _c[1];
|
|
18829
18832
|
var vestingTime = function (vestingTerm) {
|
|
18830
18833
|
return getTimePeriods(vestingTerm !== null && vestingTerm !== void 0 ? vestingTerm : 0, true);
|
|
18831
18834
|
};
|
|
@@ -18857,7 +18860,7 @@ var Bonds = function () {
|
|
|
18857
18860
|
return a.discount - b.discount;
|
|
18858
18861
|
}
|
|
18859
18862
|
});
|
|
18860
|
-
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) {
|
|
18863
|
+
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) {
|
|
18861
18864
|
var _a, _b, _c, _d;
|
|
18862
18865
|
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" })) }) })] }));
|
|
18863
18866
|
})] }) }));
|