@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 ProgressBarWrapper from '../ProgressBar/ProgressBarWrapper';
62
- import ProgressBar from '../ProgressBar/ProgressBar';
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, _d;
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-discount" }, { 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-arr" }, { 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-tokensremaining" }, { children: _jsx(ProgressBarWrapper, { title: '', value: _jsx(ProgressBar, { value: remainingPercentage(bill.bond) }), style: {
361
- width: '127px',
362
- height: '25px',
363
- flexDirection: 'column',
364
- justifyContent: 'center',
365
- display: ['none', 'none', 'none', 'flex'],
366
- }, showTooltip: true, toolTip: "".concat(remainingTokensFormat(bill.bond), " ").concat(bill.bond.payoutTokenName, " (").concat(formatDollar({
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
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "1.0.291",
6
+ "version": "1.0.292",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",