@ape.swap/bonds-sdk 1.0.67 → 1.0.69
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.
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
13
13
|
/** @jsxImportSource theme-ui */
|
|
14
14
|
import { useEffect, useState } from 'react';
|
|
15
15
|
import { Flex, ThemeUIProvider } from "theme-ui";
|
|
@@ -21,8 +21,6 @@ import '../../scss/bondsingle.scss';
|
|
|
21
21
|
import { useParams } from 'react-router-dom';
|
|
22
22
|
import getTimePeriods from '../../utils/getTimePeriods';
|
|
23
23
|
var BondSingle = function (_a) {
|
|
24
|
-
// make function to fetch data for bondaddress
|
|
25
|
-
// make same api call then filter on billaddress
|
|
26
24
|
// make pages for modal and single bond page
|
|
27
25
|
// make button to buy bond
|
|
28
26
|
var billAddress = useParams().billAddress;
|
|
@@ -39,9 +37,9 @@ var BondSingle = function (_a) {
|
|
|
39
37
|
setBondData(bond);
|
|
40
38
|
});
|
|
41
39
|
}, []);
|
|
42
|
-
return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [_jsxs("div", { children: ["Bond
|
|
40
|
+
return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [_jsxs("div", { children: ["Bond Single Page", _jsx("p", { children: billAddress })] }), isActive && account && (_jsx("p", { children: account })), _jsxs(Flex, __assign({ className: "container table-container" }, { children: [_jsxs(Flex, __assign({ className: "container header-container" }, { children: [_jsx(Flex, __assign({ className: "column column-header" }, { children: "Token" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Discount" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "ARR" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Terms" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Tokens Remaining" }))] })), bondData.map(function (bond) {
|
|
43
41
|
var _a, _b, _c;
|
|
44
|
-
return (_jsxs(
|
|
42
|
+
return (_jsxs(Flex, __assign({ className: "container bondrow-container" }, { children: [_jsxs(Flex, __assign({ className: "column column-token" }, { children: [_jsx("button", { children: "Buy Bond" }), bond.showcaseTokenName] })), _jsx(Flex, __assign({ 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, __assign({ className: "column column-arr" }, { 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, __assign({ className: "column column-term" }, { children: vestingTime(bond.vestingTerm).days ? "".concat(vestingTime(bond.vestingTerm).days, " D") : '-' })), _jsx(Flex, __assign({ className: "column column-tokensremaining" }, { children: bond.tokensRemaining.split('.')[0] }))] })));
|
|
45
43
|
})] }))] })));
|
|
46
44
|
};
|
|
47
45
|
export default BondSingle;
|
|
@@ -135,7 +135,7 @@ var Bonds = function (_a) {
|
|
|
135
135
|
});
|
|
136
136
|
var handleRowClick = function (billAddress) {
|
|
137
137
|
var url = "".concat(window.location.origin, "/bondsingle/").concat(billAddress);
|
|
138
|
-
window.
|
|
138
|
+
window.location.href = url;
|
|
139
139
|
};
|
|
140
140
|
return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && (_jsx("p", { children: account })), isActive && account && (_jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" }))), _jsxs(Flex, __assign({ className: "container table-container" }, { children: [_jsxs(Flex, __assign({ className: "container header-container" }, { children: [_jsx(Flex, __assign({ className: "column column-header" }, { children: "Tokens" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Discount" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "ARR" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Terms" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Tokens Remaining" })), _jsx(Flex, { className: "column column-header" })] })), sortedBonds.map(function (bond) {
|
|
141
141
|
var _a, _b, _c, _d;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|