@ape.swap/bonds-sdk 1.0.631 → 1.0.633

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.
@@ -43,7 +43,7 @@ var Bonds = function (_a) {
43
43
  }, []);
44
44
  useEffect(function () {
45
45
  axios.get('https://realtime-api.ape.bond/bonds').then(function (response) {
46
- var bonds = response.data.bonds.filter(function (bond) { return !isSoldOut(bond); });
46
+ var bonds = response.data.bonds;
47
47
  setBondData(bonds);
48
48
  });
49
49
  }, []);
@@ -156,6 +156,12 @@ var Bonds = function (_a) {
156
156
  if (!(chainFilterOption === null || chainFilterOption === void 0 ? void 0 : chainFilterOption.includes('All Chains'))) {
157
157
  billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter(function (bill) { return chainFilterOption === null || chainFilterOption === void 0 ? void 0 : chainFilterOption.includes(bill.chainId.toString()); });
158
158
  }
159
+ if (filterOption !== 'SOLD OUT') {
160
+ billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter(function (bond) { return !isSoldOut(bond); });
161
+ }
162
+ else {
163
+ billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter(function (bond) { return isSoldOut(bond); });
164
+ }
159
165
  // if (filterOption === 'FAVORITES') {
160
166
  // billsToReturn = billsToReturn?.filter((bill) => favTokens.includes(bill.payoutTokenName.toLowerCase()))
161
167
  // }
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.631",
6
+ "version": "1.0.633",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",