@ape.swap/bonds-sdk 1.0.62 → 1.0.64
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/BondSingle/BondSingle.d.ts +5 -0
- package/dist/components/BondSingle/BondSingle.js +8 -0
- package/dist/components/{bonds → Bonds}/Bonds.d.ts +1 -0
- package/dist/components/{bonds → Bonds}/Bonds.js +6 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/scss/bonds.scss +28 -0
- package/package.json +8 -3
- /package/dist/components/{bonds → Bonds}/styles.d.ts +0 -0
- /package/dist/components/{bonds → Bonds}/styles.js +0 -0
- /package/dist/components/{bonds → Bonds}/type.d.ts +0 -0
- /package/dist/components/{bonds → Bonds}/type.js +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
2
|
+
import '../../scss/bonds.scss';
|
|
3
|
+
import { useParams } from 'react-router-dom';
|
|
4
|
+
var BondSingle = function (_a) {
|
|
5
|
+
var billAddress = useParams().billAddress;
|
|
6
|
+
return (_jsxs("div", { children: ["Bond Clicked", _jsx("p", { children: billAddress })] }));
|
|
7
|
+
};
|
|
8
|
+
export default BondSingle;
|
|
@@ -56,6 +56,7 @@ import styles, { getColumnDiscountStyle } from './styles';
|
|
|
56
56
|
import getTimePeriods from '../../utils/getTimePeriods';
|
|
57
57
|
import { defaultTheme } from '../../theme';
|
|
58
58
|
import Svg from '../uikit/Svg';
|
|
59
|
+
import '../../scss/bonds.scss';
|
|
59
60
|
var Bonds = function (_a) {
|
|
60
61
|
var connectionString = _a.connectionString;
|
|
61
62
|
var _b = useWeb3React(), account = _b.account, isActive = _b.isActive;
|
|
@@ -132,9 +133,13 @@ var Bonds = function (_a) {
|
|
|
132
133
|
return b.discount - a.discount;
|
|
133
134
|
}
|
|
134
135
|
});
|
|
136
|
+
var handleRowClick = function (billAddress) {
|
|
137
|
+
var url = "".concat(window.location.origin, "/bondsingle/").concat(billAddress);
|
|
138
|
+
window.open(url, '_blank');
|
|
139
|
+
};
|
|
135
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", sx: styles.tableContainer }, { children: [_jsxs(Flex, __assign({ className: "container header-container", sx: styles.headerContainer }, { 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) {
|
|
136
141
|
var _a, _b, _c, _d;
|
|
137
|
-
return (_jsxs(Flex, __assign({ className: "container bondrow-container",
|
|
142
|
+
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", sx: styles.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" })) })) }))] })));
|
|
138
143
|
})] }))] })));
|
|
139
144
|
};
|
|
140
145
|
export default Bonds;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Bonds from './components/
|
|
1
|
+
import Bonds from './components/Bonds/Bonds';
|
|
2
2
|
export { Bonds };
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
.container.table-container {
|
|
3
|
+
width: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
padding: 50px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.container.header-container {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: space-around;
|
|
12
|
+
padding: 5px;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
color: #78787D;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.container.bondrow-container {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
width: 100%;
|
|
21
|
+
justify-content: space-around;
|
|
22
|
+
background-color:#151320;
|
|
23
|
+
margin-bottom: 10px;
|
|
24
|
+
padding: 20px;
|
|
25
|
+
border-radius: 10px;
|
|
26
|
+
border: 1px solid #4B4B53;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
}
|
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": "1.0.
|
|
6
|
+
"version": "1.0.64",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"module": "dist/index.es.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
"dist"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
-
"build": "tsc",
|
|
15
14
|
"prepublishOnly": "npm run build",
|
|
16
|
-
"start": "react-scripts start"
|
|
15
|
+
"start": "react-scripts start",
|
|
16
|
+
"clean": "rimraf dist/",
|
|
17
|
+
"copy": "copyfiles -u 1 src/**/*.scss dist/",
|
|
18
|
+
"build": "npm run clean && tsc && npm run copy"
|
|
17
19
|
},
|
|
18
20
|
"peerDependencies": {
|
|
19
21
|
"axios": "^1.7.2",
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
"@web3-react/url": "^8.2.0",
|
|
41
43
|
"@web3-react/walletconnect-v2": "^8.3.3",
|
|
42
44
|
"axios": "^1.7.2",
|
|
45
|
+
"copyfiles": "^2.4.1",
|
|
43
46
|
"ethers": "5.7.2",
|
|
44
47
|
"sass": "^1.77.7",
|
|
45
48
|
"theme-ui": "^0.16.2",
|
|
@@ -51,7 +54,9 @@
|
|
|
51
54
|
"lottie-react": "^2.4.0",
|
|
52
55
|
"next": "^14.2.5",
|
|
53
56
|
"numbro": "^2.5.0",
|
|
57
|
+
"react-router-dom": "^6.24.1",
|
|
54
58
|
"react-scripts": "^5.0.1",
|
|
59
|
+
"rimraf": "^6.0.1",
|
|
55
60
|
"sass": "^1.77.7",
|
|
56
61
|
"theme-ui": "^0.16.2"
|
|
57
62
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|