@ape.swap/bonds-sdk 3.0.105-test.0 → 3.0.105
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/main.js +9 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -73792,7 +73792,15 @@ const useTopTags = (initialBondList) => {
|
|
|
73792
73792
|
return tagCount;
|
|
73793
73793
|
};
|
|
73794
73794
|
const activeBonds = bonds === null || bonds === void 0 ? void 0 : bonds.filter((bond) => !bond.soldOut && (chains === null || chains === void 0 ? void 0 : chains.includes(bond.chainId)));
|
|
73795
|
-
const
|
|
73795
|
+
const filteredBonds = activeBonds === null || activeBonds === void 0 ? void 0 : activeBonds.filter((bond) => {
|
|
73796
|
+
var _a, _b;
|
|
73797
|
+
if (SDKConfig.bondPartner) {
|
|
73798
|
+
return ((_a = bond === null || bond === void 0 ? void 0 : bond.bondPartner) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.bondPartner) === null || _b === void 0 ? void 0 : _b.toLowerCase());
|
|
73799
|
+
}
|
|
73800
|
+
else
|
|
73801
|
+
return true;
|
|
73802
|
+
});
|
|
73803
|
+
const countedTags = countTagsInBonds(filteredBonds);
|
|
73796
73804
|
const sortedTagsArray = Object.entries(countedTags).sort((a, b) => b[1] - a[1]);
|
|
73797
73805
|
return sortedTagsArray.slice(0, 2).map((tagCountArray) => tagCountArray[0]);
|
|
73798
73806
|
};
|