@ape.swap/bonds-sdk 1.0.308 → 1.0.309
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.
|
@@ -338,7 +338,14 @@ var YourBonds = function (_a) {
|
|
|
338
338
|
fontWeight: 600,
|
|
339
339
|
width: '100%',
|
|
340
340
|
} }, { children: "Claim All" })) }))] }))] })), userOwnedBillsData.flat().map(function (data) {
|
|
341
|
-
|
|
341
|
+
var sortedBills = data.userOwnedBills.sort(function (a, b) {
|
|
342
|
+
var claimableDifference = claimable(b) - claimable(a);
|
|
343
|
+
if (claimableDifference !== 0) {
|
|
344
|
+
return claimableDifference;
|
|
345
|
+
}
|
|
346
|
+
return totalPending(b) - totalPending(a);
|
|
347
|
+
});
|
|
348
|
+
return sortedBills.map(function (bill) {
|
|
342
349
|
var _a, _b;
|
|
343
350
|
return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return rowClick(bill.bond); } }, { children: [_jsx(Flex, __assign({ className: "column column-tokens" }, { children: _jsx(Flex, __assign({ className: "column column-tokeninfoname" }, { children: _jsx(TokenInfoAndName, { bill: bill.bond, vestEnds: "Ends in ".concat(getPendingVesting(bill.lastBlockTimestamp, bill.vesting)) }) })) })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column column-claimable" }, { children: [formatNumberSI(parseFloat(claimable(bill).toFixed(3)), 0), "($".concat((claimable(bill) * ((_a = parseFloat(earnTokenPrice(bill.bond))) !== null && _a !== void 0 ? _a : 0)).toFixed(2), ")")] })), _jsxs(Flex, __assign({ className: "column column-pending" }, { children: [formatNumberSI(parseFloat(totalPending(bill).toFixed(0)), 0), "($".concat((totalPending(bill) * ((_b = parseFloat(earnTokenPrice(bill.bond))) !== null && _b !== void 0 ? _b : 0)).toFixed(2), ")")] })), _jsx(Flex, __assign({ className: "column column-term" }, { children: "".concat(vestingTimeRemaining(bill).days, "d, ").concat(vestingTimeRemaining(bill).hours, "h, ").concat(vestingTimeRemaining(bill).minutes, "m") })), _jsx(Flex, __assign({ className: "column column-claimall" }, { children: _jsx(Flex, __assign({ className: "column-claimall button" }, { children: _jsx(Button, __assign({ disabled: !account, sx: {
|
|
344
351
|
height: ['36px', '36px', '36px', '26px'],
|