@ape.swap/bonds-sdk 1.0.396 → 1.0.398
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.
|
@@ -145,7 +145,7 @@ var YourBonds = function (_a) {
|
|
|
145
145
|
case 2:
|
|
146
146
|
results = _a.sent();
|
|
147
147
|
setUserOwnedBillsData(results);
|
|
148
|
-
mappedBills =
|
|
148
|
+
mappedBills = results.flat().flatMap(function (results) { return results.userOwnedBills; });
|
|
149
149
|
setMappedUserBills(mappedBills);
|
|
150
150
|
console.log('MAPPEDBILLS');
|
|
151
151
|
console.log(mappedBills);
|
|
@@ -160,7 +160,7 @@ var YourBonds = function (_a) {
|
|
|
160
160
|
});
|
|
161
161
|
}); };
|
|
162
162
|
fetchData();
|
|
163
|
-
}, [account]);
|
|
163
|
+
}, [account, bondData]);
|
|
164
164
|
var _j = useState(null), sortConfig = _j[0], setSortConfig = _j[1];
|
|
165
165
|
var _k = useState(mappedUserBills), sortedBonds = _k[0], setSortedBonds = _k[1];
|
|
166
166
|
var handleSort = function (key) {
|
|
@@ -172,7 +172,7 @@ var YourBonds = function (_a) {
|
|
|
172
172
|
};
|
|
173
173
|
useEffect(function () {
|
|
174
174
|
if (sortConfig === null) {
|
|
175
|
-
var sortedBills = mappedUserBills.sort(function (a, b) {
|
|
175
|
+
var sortedBills = __spreadArray([], mappedUserBills, true).sort(function (a, b) {
|
|
176
176
|
var claimableDifference = parseFloat(claimable(b).toFixed(3)) - parseFloat(claimable(a).toFixed(3));
|
|
177
177
|
if (claimableDifference !== 0) {
|
|
178
178
|
return claimableDifference;
|