@ape.swap/bonds-sdk 1.0.394 → 1.0.395
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.
|
@@ -159,6 +159,9 @@ var YourBonds = function (_a) {
|
|
|
159
159
|
return data.userOwnedBills.map(function (bill) { return bill; });
|
|
160
160
|
});
|
|
161
161
|
setMappedUserBills(mappedBills);
|
|
162
|
+
console.log('MAPPEDBILLS');
|
|
163
|
+
console.log(mappedBills);
|
|
164
|
+
console.log('MAPPEDBILLS');
|
|
162
165
|
}, [account]);
|
|
163
166
|
var _j = useState(null), sortConfig = _j[0], setSortConfig = _j[1];
|
|
164
167
|
var _k = useState(mappedUserBills), sortedBonds = _k[0], setSortedBonds = _k[1];
|
|
@@ -178,10 +181,13 @@ var YourBonds = function (_a) {
|
|
|
178
181
|
}
|
|
179
182
|
return 0;
|
|
180
183
|
});
|
|
184
|
+
console.log('SORTEDBILLS');
|
|
185
|
+
console.log(sortedBills);
|
|
186
|
+
console.log('SORTEDBILLS');
|
|
181
187
|
setSortedBonds(sortedBills);
|
|
182
188
|
return;
|
|
183
189
|
}
|
|
184
|
-
var sorted = __spreadArray([],
|
|
190
|
+
var sorted = __spreadArray([], mappedUserBills, true).sort(function (a, b) {
|
|
185
191
|
var aValue, bValue;
|
|
186
192
|
if (sortConfig.key === 'claimable') {
|
|
187
193
|
aValue = parseFloat(claimable(a).toFixed(3));
|
|
@@ -208,7 +214,7 @@ var YourBonds = function (_a) {
|
|
|
208
214
|
return 0;
|
|
209
215
|
});
|
|
210
216
|
setSortedBonds(sorted);
|
|
211
|
-
}, [sortConfig,
|
|
217
|
+
}, [sortConfig, mappedUserBills]);
|
|
212
218
|
var rowClick = function (bill) {
|
|
213
219
|
setSelectedBill(bill);
|
|
214
220
|
setIsModalOpen(true);
|