@ape.swap/bonds-sdk 1.0.211 → 1.0.213

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.
@@ -188,7 +188,7 @@ var Bonds = function (_a) {
188
188
  };
189
189
  return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && _jsx("p", { children: account }), isActive && account && _jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" })), _jsxs(Flex, __assign({ className: "container table-container" }, { children: [_jsxs(Flex, __assign({ className: "container header-container" }, { children: [_jsx(Flex, __assign({ className: "column column-token" }, { children: "Tokens" })), _jsx(Flex, __assign({ className: "column column-discount" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(18%, -4%)" }, { children: ["Discount", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column column-arr" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(8%, -5%)" }, { children: ["ARR", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column column-term" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomRight", transformTip: "translate(11%, -5%)" }, { children: ["Terms", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column column-tokensremaining" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomRight", transformTip: "translate(12%, -4%)" }, { children: ["Tokens Remaining", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, { className: "column column-hotbond" })] })), sortedBonds.map(function (bond) {
190
190
  var _a, _b, _c, _d, _e;
191
- return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return rowClick(bond); } }, { children: [_jsxs(Flex, __assign({ className: "column column-token" }, { children: [bond.showcaseTokenName, _jsx(Tooltip, { tokenContract: (bond === null || bond === void 0 ? void 0 : bond.payoutToken) || '', secondURL: getBillContractURL(bond), secondURLTitle: 'View Bond Contract', thirdURL: "https://dashboard.ape.bond/bond/".concat((_a = bond === null || bond === void 0 ? void 0 : bond.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()), thirdURLTitle: 'View Insights', twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: (_b = bond.chainId) !== null && _b !== void 0 ? _b : ChainId.BSC })] })), _jsx(Flex, __assign({ className: "column column-discount ".concat(getDiscountColor(bond === null || bond === void 0 ? void 0 : bond.discount)) }, { children: "".concat((_c = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _c === void 0 ? void 0 : _c.toFixed(2), "%") })), _jsx(Flex, __assign({ className: "column column-arr" }, { children: "".concat(((((_d = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _d !== void 0 ? _d : 0) * 365) / vestingTime(bond.vestingTerm).days).toFixed(2), "%") })), _jsx(Flex, __assign({ className: "column column-term" }, { children: vestingTime(bond.vestingTerm).days ? "".concat(vestingTime(bond.vestingTerm).days, " D") : '-' })), _jsx(Flex, __assign({ className: "column column-tokensremaining" }, { children: _jsx(ProgressBarWrapper, { title: '', value: _jsx(ProgressBar, { value: remainingPercentage(bond) }), style: {
191
+ return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return rowClick(bond); } }, { children: [_jsxs(Flex, __assign({ className: "column column-token" }, { children: [bond.showcaseTokenName, _jsx(Flex, __assign({ className: "column-token info" }, { children: _jsx(TooltipBubble, __assign({ body: _jsx(Tooltip, { tokenContract: (bond === null || bond === void 0 ? void 0 : bond.payoutToken) || '', secondURL: getBillContractURL(bond), secondURLTitle: 'View Bond Contract', thirdURL: "https://dashboard.ape.bond/bond/".concat((_a = bond === null || bond === void 0 ? void 0 : bond.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()), thirdURLTitle: 'View Insights', twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: (_b = bond.chainId) !== null && _b !== void 0 ? _b : ChainId.BSC }), width: "230px", placement: "bottomLeft", transformTip: "translate(8%, -5%)" }, { children: _jsx(Svg, { icon: "infoSolid", width: "12px" }) })) }))] })), _jsx(Flex, __assign({ className: "column column-discount ".concat(getDiscountColor(bond === null || bond === void 0 ? void 0 : bond.discount)) }, { children: "".concat((_c = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _c === void 0 ? void 0 : _c.toFixed(2), "%") })), _jsx(Flex, __assign({ className: "column column-arr" }, { children: "".concat(((((_d = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _d !== void 0 ? _d : 0) * 365) / vestingTime(bond.vestingTerm).days).toFixed(2), "%") })), _jsx(Flex, __assign({ className: "column column-term" }, { children: vestingTime(bond.vestingTerm).days ? "".concat(vestingTime(bond.vestingTerm).days, " D") : '-' })), _jsx(Flex, __assign({ className: "column column-tokensremaining" }, { children: _jsx(ProgressBarWrapper, { title: '', value: _jsx(ProgressBar, { value: remainingPercentage(bond) }), style: {
192
192
  width: '127px',
193
193
  height: '25px',
194
194
  flexDirection: 'column',
@@ -11,16 +11,14 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
13
13
  import { styles } from './styles';
14
- import { useTranslation } from '../../contexts/Localization';
15
14
  import { useWeb3React } from '@web3-react/core';
16
15
  import { Flex, Svg, Text } from '../uikit-sdk';
17
16
  import { ChainId } from '../../enum/chains';
18
17
  import { Link } from 'theme-ui';
19
18
  var ButtonsRow = function (_a) {
20
19
  var projectLink = _a.projectLink, twitter = _a.twitter, bubble = _a.bubble, audit = _a.audit;
21
- var t = useTranslation().t;
22
20
  var chainId = useWeb3React().chainId;
23
21
  var bubbleURL = "https://app.bubblemaps.io/bsc/token/".concat(bubble);
24
- return (_jsxs(Flex, __assign({ sx: { justifyContent: 'center' } }, { children: [_jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: projectLink, target: "_blank" }, { children: _jsx(Svg, { icon: "URL", width: 18 }) })), _jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: twitter, target: "_blank" }, { children: _jsx(Svg, { icon: "twitter", width: 18, color: "text" }) })), chainId === ChainId.BSC && bubble && (_jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: bubbleURL, target: "_blank" }, { children: _jsx(Svg, { icon: "bubble", width: 18, color: "text" }) }))), audit && (_jsxs(Flex, __assign({ sx: __assign(__assign({}, styles.iconButton), { margin: '0 0 5px 0', '& svg': { marginRight: '5px' } }), as: Link, href: audit, target: "_blank" }, { children: [_jsx(Svg, { icon: "audit", width: 18, color: "text" }), _jsx(Text, __assign({ sx: { paddingRight: '5px' } }, { children: t('Audit') }))] })))] })));
22
+ return (_jsxs(Flex, __assign({ sx: { justifyContent: 'center' } }, { children: [_jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: projectLink, target: "_blank" }, { children: _jsx(Svg, { icon: "URL", width: 18 }) })), _jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: twitter, target: "_blank" }, { children: _jsx(Svg, { icon: "twitter", width: 18, color: "text" }) })), chainId === ChainId.BSC && bubble && (_jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: bubbleURL, target: "_blank" }, { children: _jsx(Svg, { icon: "bubble", width: 18, color: "text" }) }))), audit && (_jsxs(Flex, __assign({ sx: __assign(__assign({}, styles.iconButton), { margin: '0 0 5px 0', '& svg': { marginRight: '5px' } }), as: Link, href: audit, target: "_blank" }, { children: [_jsx(Svg, { icon: "audit", width: 18, color: "text" }), _jsx(Text, __assign({ sx: { paddingRight: '5px' } }, { children: 'Audit' }))] })))] })));
25
23
  };
26
24
  export default ButtonsRow;
@@ -10,7 +10,6 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
13
- import { useTranslation } from '../../contexts/Localization';
14
13
  import { styles } from './styles';
15
14
  import { BLOCK_EXPLORER } from '../../config/constants/chains';
16
15
  import ButtonsRow from './ButtonsRow';
@@ -18,9 +17,8 @@ import { Flex, Text, Svg } from '../uikit-sdk';
18
17
  import { Link } from 'theme-ui';
19
18
  var Tooltip = function (_a) {
20
19
  var valueTitle = _a.valueTitle, valueContent = _a.valueContent, value2Title = _a.value2Title, value2Content = _a.value2Content, tokenContract = _a.tokenContract, secondURL = _a.secondURL, secondURLTitle = _a.secondURLTitle, projectLink = _a.projectLink, twitter = _a.twitter, audit = _a.audit, thirdURL = _a.thirdURL, thirdURLTitle = _a.thirdURLTitle, chain = _a.chain;
21
- var t = useTranslation().t;
22
20
  var explorerLink = BLOCK_EXPLORER[chain];
23
21
  var tokenLink = "".concat(explorerLink, "/address/").concat(tokenContract);
24
- return (_jsxs(Flex, __assign({ sx: { flexDirection: 'column', flexWrap: 'wrap' } }, { children: [projectLink && twitter && (_jsx(ButtonsRow, { twitter: twitter, projectLink: projectLink, bubble: tokenContract, audit: audit })), valueTitle && (_jsxs(Flex, __assign({ sx: styles.infoRow }, { children: [_jsxs(Text, __assign({ sx: styles.titleText }, { children: [valueTitle, ": "] })), _jsx(Text, __assign({ sx: styles.contentText }, { children: valueContent }))] }))), value2Title && (_jsxs(Flex, __assign({ sx: styles.infoRow }, { children: [_jsxs(Text, __assign({ sx: styles.titleText }, { children: [value2Title, ": "] })), _jsx(Text, __assign({ sx: styles.contentText }, { children: value2Content }))] }))), _jsx(Flex, __assign({ sx: { justifyContent: 'center' } }, { children: _jsxs(Flex, __assign({ sx: { width: '144px', flexDirection: 'column' } }, { children: [_jsx(Flex, __assign({ sx: styles.linkRow }, { children: _jsxs(Link, __assign({ href: tokenLink, sx: styles.link, target: "_blank" }, { children: [t('View Token Contract'), _jsx(Flex, __assign({ sx: { ml: '5px' } }, { children: _jsx(Svg, { icon: "external", color: "text", width: 10 }) }))] })) })), secondURL && (_jsx(Flex, __assign({ sx: styles.linkRow }, { children: _jsxs(Link, __assign({ href: secondURL, sx: styles.link, target: "_blank" }, { children: [secondURLTitle, _jsx(Flex, __assign({ sx: { ml: '5px' } }, { children: _jsx(Svg, { icon: "external", color: "text", width: 10 }) }))] })) }))), thirdURL && (_jsx(Flex, __assign({ sx: styles.linkRow }, { children: _jsx(Link, __assign({ href: thirdURL, sx: styles.link, target: "_blank" }, { children: thirdURLTitle })) })))] })) }))] })));
22
+ return (_jsxs(Flex, __assign({ sx: { flexDirection: 'column', flexWrap: 'wrap' } }, { children: [projectLink && twitter && (_jsx(ButtonsRow, { twitter: twitter, projectLink: projectLink, bubble: tokenContract, audit: audit })), valueTitle && (_jsxs(Flex, __assign({ sx: styles.infoRow }, { children: [_jsxs(Text, __assign({ sx: styles.titleText }, { children: [valueTitle, ": "] })), _jsx(Text, __assign({ sx: styles.contentText }, { children: valueContent }))] }))), value2Title && (_jsxs(Flex, __assign({ sx: styles.infoRow }, { children: [_jsxs(Text, __assign({ sx: styles.titleText }, { children: [value2Title, ": "] })), _jsx(Text, __assign({ sx: styles.contentText }, { children: value2Content }))] }))), _jsx(Flex, __assign({ sx: { justifyContent: 'center' } }, { children: _jsxs(Flex, __assign({ sx: { width: '144px', flexDirection: 'column' } }, { children: [_jsx(Flex, __assign({ sx: styles.linkRow }, { children: _jsxs(Link, __assign({ href: tokenLink, sx: styles.link, target: "_blank" }, { children: ['View Token Contract', _jsx(Flex, __assign({ sx: { ml: '5px' } }, { children: _jsx(Svg, { icon: "external", color: "text", width: 10 }) }))] })) })), secondURL && (_jsx(Flex, __assign({ sx: styles.linkRow }, { children: _jsxs(Link, __assign({ href: secondURL, sx: styles.link, target: "_blank" }, { children: [secondURLTitle, _jsx(Flex, __assign({ sx: { ml: '5px' } }, { children: _jsx(Svg, { icon: "external", color: "text", width: 10 }) }))] })) }))), thirdURL && (_jsx(Flex, __assign({ sx: styles.linkRow }, { children: _jsx(Link, __assign({ href: thirdURL, sx: styles.link, target: "_blank" }, { children: thirdURLTitle })) })))] })) }))] })));
25
23
  };
26
24
  export default Tooltip;
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.211",
6
+ "version": "1.0.213",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",