@ape.swap/bonds-sdk 1.0.291 → 1.0.292
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.
|
@@ -58,10 +58,8 @@ import { defaultTheme } from '../../theme';
|
|
|
58
58
|
import '../../scss/YourBonds.scss';
|
|
59
59
|
import { BigNumber } from 'bignumber.js';
|
|
60
60
|
import { BillVersion, ChainId } from '../../enum/apeswaplists';
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import { formatDollar, formatValue } from '../../utils/formatNumbers';
|
|
64
|
-
import { Svg, Text, Button } from '../uikit-sdk';
|
|
61
|
+
import { formatValue } from '../../utils/formatNumbers';
|
|
62
|
+
import { Text, Button } from '../uikit-sdk';
|
|
65
63
|
import { BLOCK_EXPLORER, MAINNET_CHAINS } from '../../config/constants/chains';
|
|
66
64
|
import TokenInfoAndName from '../TokenInfoAndName';
|
|
67
65
|
import { ACF_TO_ABOND } from '../../config/constants/addresses';
|
|
@@ -356,17 +354,14 @@ var YourBonds = function (_a) {
|
|
|
356
354
|
width: '100%',
|
|
357
355
|
} }, { children: "Claim All" })) }))] }))] })), userOwnedBillsData.flat().map(function (data) {
|
|
358
356
|
return data.userOwnedBills.map(function (bill) {
|
|
359
|
-
var _a, _b, _c
|
|
360
|
-
return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return rowClick(bill.bond); } }, { children: [_jsxs(Flex, __assign({ className: "column column-tokens" }, { children: [_jsx(Flex, __assign({ className: "column column-tokeninfoname" }, { children: _jsx(TokenInfoAndName, { bond: bill.bond }) })), _jsx(Flex, { className: "column column-tokenicons" })] })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column column-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
},
|
|
367
|
-
num: remainingTokensUsd(bill.bond).toNumber(),
|
|
368
|
-
isPrice: true,
|
|
369
|
-
}), ")") }) })), _jsx(Flex, __assign({ className: "column column-hotbond" }, { children: _jsx(Flex, __assign({ className: "column column-icon" }, { children: hotBonds.includes(bill.bond.billAddress.toLowerCase()) && ((_d = bill.bond.discount) !== null && _d !== void 0 ? _d : 0) > 0 && (_jsx(Svg, { icon: "hot", width: "20px" })) })) }))] }))] }), bill.bond.billAddress));
|
|
357
|
+
var _a, _b, _c;
|
|
358
|
+
return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return rowClick(bill.bond); } }, { children: [_jsxs(Flex, __assign({ className: "column column-tokens" }, { children: [_jsx(Flex, __assign({ className: "column column-tokeninfoname" }, { children: _jsx(TokenInfoAndName, { bond: bill.bond }) })), _jsx(Flex, { className: "column column-tokenicons" })] })), _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), ")")] })), _jsx(Flex, __assign({ className: "column column-pending" }, { children: "".concat(((((_c = (_b = bill.bond) === null || _b === void 0 ? void 0 : _b.discount) !== null && _c !== void 0 ? _c : 0) * 365) / vestingTime(bill.bond.vestingTerm).days).toFixed(2), "%") })), _jsx(Flex, __assign({ className: "column column-term" }, { children: vestingTime(bill.bond.vestingTerm).days ? "".concat(vestingTime(bill.bond.vestingTerm).days, " D") : '-' })), _jsx(Flex, __assign({ className: "column column-claimall" }, { children: _jsx(Button, __assign({ disabled: !account, sx: {
|
|
359
|
+
height: ['36px', '36px', '36px', '26px'],
|
|
360
|
+
lineHeight: '12px',
|
|
361
|
+
fontSize: '14px',
|
|
362
|
+
fontWeight: 600,
|
|
363
|
+
width: '100%',
|
|
364
|
+
} }, { children: "Claim" })) }))] }))] }), bill.bond.billAddress));
|
|
370
365
|
});
|
|
371
366
|
})] }))] })));
|
|
372
367
|
};
|