@ape.swap/bonds-sdk 1.0.77 → 1.0.78
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/components/Bonds/Bonds.js +9 -9
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
|
@@ -57,7 +57,6 @@ import getTimePeriods from '../../utils/getTimePeriods';
|
|
|
57
57
|
import { defaultTheme } from '../../theme';
|
|
58
58
|
import Svg from '../uikit/Svg';
|
|
59
59
|
import '../../scss/bonds.scss';
|
|
60
|
-
import BondModal from '../BondModal/BondModal';
|
|
61
60
|
var Bonds = function (_a) {
|
|
62
61
|
var connectionString = _a.connectionString;
|
|
63
62
|
var _b = useWeb3React(), account = _b.account, isActive = _b.isActive;
|
|
@@ -138,15 +137,16 @@ var Bonds = function (_a) {
|
|
|
138
137
|
var url = "".concat(window.location.origin, "/bondsingle/").concat(billAddress);
|
|
139
138
|
window.location.href = url;
|
|
140
139
|
};
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
140
|
+
// Modal
|
|
141
|
+
// const [isModalOpen, setIsModalOpen] = useState(false);
|
|
142
|
+
// const [selectedBond, setSelectedBond] = useState<BondsDataResponse | null>(null);
|
|
143
|
+
// const rowClickModal = (bond: BondsDataResponse) => {
|
|
144
|
+
// setSelectedBond(bond);
|
|
145
|
+
// setIsModalOpen(true);
|
|
146
|
+
// };
|
|
147
|
+
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) {
|
|
148
148
|
var _a, _b, _c, _d;
|
|
149
|
-
return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return
|
|
149
|
+
return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return handleRowClick(bond.billAddress); } }, { children: [_jsx(Flex, __assign({ className: "column column-token", sx: styles.columnToken }, { children: 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", sx: styles.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, __assign({ className: "column column-term", sx: styles.columnTerm }, { children: vestingTime(bond.vestingTerm).days ? "".concat(vestingTime(bond.vestingTerm).days, " D") : '-' })), _jsx(Flex, __assign({ className: "column column-tokensremaining", sx: styles.columnTokensRemaining }, { children: bond.tokensRemaining.split('.')[0] })), _jsx(Flex, __assign({ className: "column column-hotbond" }, { children: _jsx(Flex, __assign({ 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" })) })) }))] })));
|
|
150
150
|
})] }))] })));
|
|
151
151
|
};
|
|
152
152
|
export default Bonds;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED