@ape.swap/bonds-sdk 1.0.149 → 1.0.151
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.
|
@@ -112,12 +112,10 @@ var Bonds = function (_a) {
|
|
|
112
112
|
axios.get('https://realtime-api.ape.bond/bonds').then(function (response) {
|
|
113
113
|
var bonds = response.data.bonds;
|
|
114
114
|
setBondData(bonds);
|
|
115
|
+
var bondsToRender = bondData.filter(function (bond) { return !isSoldOut(bond); });
|
|
116
|
+
setBondData(bondsToRender);
|
|
115
117
|
});
|
|
116
118
|
}, []);
|
|
117
|
-
useEffect(function () {
|
|
118
|
-
var bondsToRender = bondData.filter(function (bond) { return !isSoldOut(bond); });
|
|
119
|
-
setBondData(bondsToRender);
|
|
120
|
-
}, []);
|
|
121
119
|
useEffect(function () {
|
|
122
120
|
axios.get('https://apeswap-strapi.herokuapp.com/hot-bonds').then(function (response) {
|
|
123
121
|
var hotBondAddresses = response.data.map(function (bond) {
|
|
@@ -137,12 +135,6 @@ var Bonds = function (_a) {
|
|
|
137
135
|
return true;
|
|
138
136
|
return ((_b = new BigNumber(bond.tokensRemaining)) === null || _b === void 0 ? void 0 : _b.lte(thresholdToHide)) || bond.discount === 100;
|
|
139
137
|
}, []);
|
|
140
|
-
var bondsToRender = [];
|
|
141
|
-
bondData.forEach(function (bond) {
|
|
142
|
-
if (!isSoldOut(bond)) {
|
|
143
|
-
bondsToRender.push(bond);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
138
|
var sortedBonds = bondData.sort(function (a, b) {
|
|
147
139
|
var _a, _b;
|
|
148
140
|
var aIsHot = hotBonds.includes(a.billAddress.toLowerCase()) && ((_a = a.discount) !== null && _a !== void 0 ? _a : 0) > 0;
|
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.151",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"module": "dist/index.es.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"theme-ui": "^0.16.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@ape.swap/apeswap-lists": "^2.0.9",
|
|
29
28
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
30
29
|
"@babel/plugin-transform-private-property-in-object": "^7.24.7",
|
|
31
30
|
"@types/lodash": "^4.17.6",
|