@ape.swap/bonds-sdk 1.0.773 → 1.0.775
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.
- package/dist/components/BondMenu/BondMenu.js +13 -2
- package/dist/components/BondRows/BondRow.d.ts +1 -0
- package/dist/components/BondRows/BondRow.js +13 -2
- package/dist/components/BondRows/BondRowHeader.js +12 -1
- package/dist/components/BondRows/BondRowsByChain.d.ts +3 -2
- package/dist/components/BondRows/BondRowsByChain.js +13 -2
- package/dist/components/BondRows/BondRowsWithTitle.d.ts +2 -1
- package/dist/components/BondRows/BondRowsWithTitle.js +13 -2
- package/dist/components/BondRows/ChainTitle.d.ts +1 -1
- package/dist/components/BondRows/ChainTitle.js +13 -2
- package/dist/components/MenuSelect/MenuSelect.d.ts +1 -5
- package/dist/components/MenuSelect/MenuSelect.js +1 -1
- package/dist/components/MenuSelect/RecommendationSelector.js +16 -5
- package/dist/components/Modals/BondModal/BondModal.js +19 -8
- package/dist/components/Modals/YourBondsModal/YourBondsModal.js +23 -12
- package/dist/components/NetworkFilter/index.js +17 -6
- package/dist/components/ProgressBar/ProgressBar.js +13 -2
- package/dist/components/ProgressBar/ProgressBarWrapper.js +12 -1
- package/dist/components/TokenInfoAndName/index.d.ts +1 -1
- package/dist/components/TokenInfoAndName/index.js +17 -6
- package/dist/components/Tooltip/ButtonsRow.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +12 -1
- package/dist/components/uikit-sdk/Button/IconButton.js +1 -1
- package/dist/components/uikit-sdk/Checkbox/index.d.ts +1 -0
- package/dist/components/uikit-sdk/Checkbox/index.js +2 -2
- package/dist/components/uikit-sdk/Flex/index.d.ts +1 -3
- package/dist/components/uikit-sdk/Input/Input.d.ts +2 -7
- package/dist/components/uikit-sdk/Input/Input.js +5 -5
- package/dist/components/uikit-sdk/Input/NumericInput.d.ts +5 -4
- package/dist/components/uikit-sdk/Input/StyledInput.js +12 -1
- package/dist/components/uikit-sdk/Select/Select.js +4 -4
- package/dist/components/uikit-sdk/Select/SelectItem.d.ts +1 -0
- package/dist/components/uikit-sdk/Select/SelectItem.js +1 -1
- package/dist/components/uikit-sdk/Skeleton/styles.d.ts +2 -2
- package/dist/components/uikit-sdk/Svg/Icons/AbondFullLogo.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/AbondSmallLogo.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/AccountMonkey.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/AllChains.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/ApebondLogo.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/ApeswapSmallLogo.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Arrow.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Audit.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/BananaIcon.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/BillsM1.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/BillsM2.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/BillsM3.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Bridge.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Bubble.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Calculator.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Calendar.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Cancelled.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Card.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Caret.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Chain.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Chart.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Chat.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Close.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Cog.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/Icons/Cog.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Collapse.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Copy.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Discord.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/DiscordNew.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Docs.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/DocsV2.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Ellipse.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Error.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Expand.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Explorer.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/External.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Farm.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Fav.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/FilledURL.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Fire.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Frame.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/FullLogo.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Gnana.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/GreenShield.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/Icons/GreenShield.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Hamburger.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/HamburgerClosed.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Home.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Hot.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Info.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/InfoSolid.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Insight.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Instagram.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Island.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/LanguageIcon.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/LineChart.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/LiquidityIcon.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Logout.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Medium.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/MenuSettings.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Message.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Migrate.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Moon.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/More.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/NFA.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/NavCaret.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/PlaceholderMonkey.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/Icons/PlaceholderMonkey.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Play.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Pool.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Positions.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/ProfileDark.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/ProfileLight.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Question.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/QuestionCircle.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/QuestionFill.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Quiz.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Receipt.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Reddit.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Rocket.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/ScrollTop.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Search.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Send.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Settings.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Share.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Sort.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Success.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/SuccessOutline.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/SwapArrows.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/SwitchArrows.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/Icons/SwitchArrows.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Tag.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Telegram.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/TelegramNew.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/TextLogo.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/TickShield.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Trade.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Trash.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Twitter.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/URL.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Vaults.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Verified.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Wallet.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Warning.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Watch.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/Website.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/WebsiteNew.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/WhitepaperNew.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/XNew.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/YellowQuestionMark.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/ZapArrow.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/ZapIcon.js +12 -1
- package/dist/components/uikit-sdk/Svg/Icons/polygonNew.js +12 -1
- package/dist/components/uikit-sdk/Svg/index.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/tokens/ABOND.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/ARBITRUM.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/AVAX.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/BANANA.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/BASE.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/BNB.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/BSC.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/CELO.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/CRONOS.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/ETH.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/FANTOM.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/GNANA.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/GNOSIS.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/INEVM.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/IOTA.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/LIGHTLINK.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/LINEA.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/OKX.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/OPTIMISM.js +13 -2
- package/dist/components/uikit-sdk/Svg/tokens/POLYGON.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/POLYGONZK.js +12 -1
- package/dist/components/uikit-sdk/Svg/tokens/TLOS.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/BinanceChain.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/BinanceChain.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/Bitkeep.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/Bitkeep.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/Brave.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/Brave.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/Coinbase.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/Coinbase.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/MadWallet.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/MathWallet.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/MathWallet.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/Metamask.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/Metamask.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/Nabox.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/Nabox.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/OKX.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/OKX.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/OntoWallet.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/OntoWallet.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/SafePalWallet.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/SafePalWallet.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/SocialLogin.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/SocialLogin.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/TokenPocket.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/TokenPocket.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/TorusWallet.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/TorusWallet.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/TrustWallet.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/TrustWallet.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/Unstoppable.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/WalletConnect.d.ts +1 -0
- package/dist/components/uikit-sdk/Svg/walletIcons/WalletConnect.js +12 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/WalletImage.js +12 -1
- package/dist/components/uikit-sdk/Tag/ListTag.js +1 -1
- package/dist/components/uikit-sdk/Tag/styles.d.ts +3 -2
- package/dist/components/uikit-sdk/Text/index.js +1 -1
- package/dist/components/uikit-sdk/TokenImage/index.d.ts +1 -1
- package/dist/components/uikit-sdk/TokenImage/index.js +13 -2
- package/dist/components/uikit-sdk/TooltipBubble/index.js +1 -1
- package/dist/config/abi/types/factories/Banana__factory.js +1 -2
- package/dist/config/abi/types/factories/BondNft__factory.js +1 -2
- package/dist/config/abi/types/factories/Bond__factory.js +1 -2
- package/dist/config/abi/types/factories/EnsPublicResolver__factory.js +1 -2
- package/dist/config/abi/types/factories/EnsRegistrar__factory.js +1 -2
- package/dist/config/abi/types/factories/Erc20__factory.js +1 -2
- package/dist/config/abi/types/factories/Erc20_bytes32__factory.js +1 -2
- package/dist/config/abi/types/factories/JungleChef__factory.js +1 -2
- package/dist/config/abi/types/factories/LaunchBonds__factory.js +1 -2
- package/dist/config/abi/types/factories/LensContract__factory.js +1 -2
- package/dist/config/abi/types/factories/LockVeAbond__factory.js +1 -2
- package/dist/config/abi/types/factories/MigrationBond__factory.js +1 -2
- package/dist/config/abi/types/factories/MigrationFveAbond__factory.js +1 -2
- package/dist/config/abi/types/factories/MiniComplexRewarder__factory.js +1 -2
- package/dist/config/abi/types/factories/Multicallv2__factory.js +1 -2
- package/dist/config/abi/types/factories/Multicallv3__factory.js +1 -2
- package/dist/config/abi/types/factories/NonFungibleApes__factory.js +1 -2
- package/dist/config/abi/types/factories/NonFungibleBananas__factory.js +1 -2
- package/dist/config/abi/types/factories/PriceGetterLinea__factory.js +1 -2
- package/dist/config/abi/types/factories/PriceGetterV2__factory.js +1 -2
- package/dist/config/abi/types/factories/PriceGetter__factory.js +1 -2
- package/dist/config/abi/types/factories/SousChef__factory.js +1 -2
- package/dist/config/abi/types/factories/Treasury__factory.js +1 -2
- package/dist/config/abi/types/factories/Weth__factory.js +1 -2
- package/dist/config/abi/types/factories/Zap__factory.js +1 -2
- package/dist/config/constants/addresses.js +4 -4
- package/dist/config/constants/lists.d.ts +1 -1
- package/dist/config/constants/lists.js +2 -2
- package/dist/contexts/Localization/Provider.js +1 -1
- package/dist/contexts/ModalContext.js +14 -3
- package/dist/contexts/RefreshContext.js +12 -1
- package/dist/pages/Bonds/Bonds.js +13 -2
- package/dist/pages/YourBonds/YourBonds.js +20 -9
- package/dist/pages/YourBonds/fetchBillsUser.js +7 -5
- package/dist/theme/colors.js +2 -2
- package/package.json +15 -6
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
2
13
|
import { useCallback } from 'react';
|
|
3
14
|
import { Flex, IconButton } from '../uikit-sdk';
|
|
@@ -18,7 +29,7 @@ var BondMenu = function (_a) {
|
|
|
18
29
|
setChainFilterOption(['All Chains']);
|
|
19
30
|
setFilterOption(newOption);
|
|
20
31
|
}, [setChainFilterOption, setFilterOption]);
|
|
21
|
-
return (_jsxs(Flex, { className: "menu-container filters", children: [_jsx(Flex, { className: "filters desktop-rec", sx: { display: ['none', 'none', 'none', 'flex'], mr: '20px' }, children: _jsx(RecommendationSelector, { options: filterOptions, activeOption: filterOption, setActiveOption: handleFilterSelection }) }), _jsx(Flex, { className: "filtesr mobile-rec", sx: { display: ['flex', 'flex', 'flex', 'none'], width: '100%' }, children: _jsx(MenuSelect, { selectedOption: filterOption, setOption: setFilterOption, options: mappedFilters, sx: { background: 'white2' } }) }), _jsx(Flex, { className: "filters network", sx: { width: ['49%', '49%', '49%', 'unset'], minWidth: '120px' }, children: _jsx(NetworkFilter, { chainFilterOption: chainFilterOption, setChainFilterOption: setChainFilterOption }) }), _jsxs(Flex, { className: "filters clear-all", sx: {
|
|
32
|
+
return (_jsxs(Flex, __assign({ className: "menu-container filters" }, { children: [_jsx(Flex, __assign({ className: "filters desktop-rec", sx: { display: ['none', 'none', 'none', 'flex'], mr: '20px' } }, { children: _jsx(RecommendationSelector, { options: filterOptions, activeOption: filterOption, setActiveOption: handleFilterSelection }) })), _jsx(Flex, __assign({ className: "filtesr mobile-rec", sx: { display: ['flex', 'flex', 'flex', 'none'], width: '100%' } }, { children: _jsx(MenuSelect, { selectedOption: filterOption, setOption: setFilterOption, options: mappedFilters, sx: { background: 'white2' } }) })), _jsx(Flex, __assign({ className: "filters network", sx: { width: ['49%', '49%', '49%', 'unset'], minWidth: '120px' } }, { children: _jsx(NetworkFilter, { chainFilterOption: chainFilterOption, setChainFilterOption: setChainFilterOption }) })), _jsxs(Flex, __assign({ className: "filters clear-all", sx: {
|
|
22
33
|
display: ['none', 'none', 'none', 'flex'],
|
|
23
34
|
color: 'textDisabledButton',
|
|
24
35
|
fontSize: '14px',
|
|
@@ -35,6 +46,6 @@ var BondMenu = function (_a) {
|
|
|
35
46
|
setChainFilterOption(['All Chains']);
|
|
36
47
|
setFilterOption(asPath.includes('yourBonds') ? 'CLAIMABLE' : 'ALL');
|
|
37
48
|
onHandleQueryChange('');
|
|
38
|
-
}, children: ["Clear All", _jsx(Flex, { sx: { ml: '7px' }, children: _jsx(IconButton, { icon: "close", color: "textDisabledButton", variant: "transparent" }) })] })] }));
|
|
49
|
+
} }, { children: ["Clear All", _jsx(Flex, __assign({ sx: { ml: '7px' } }, { children: _jsx(IconButton, { icon: "close", color: "textDisabledButton", variant: "transparent" }) }))] }))] })));
|
|
39
50
|
};
|
|
40
51
|
export default BondMenu;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
2
13
|
import BigNumber from "bignumber.js";
|
|
3
14
|
import { ChainId } from "../../enum/apeswaplists";
|
|
@@ -67,7 +78,7 @@ var BondRow = function (_a) {
|
|
|
67
78
|
var vestingDays = vestingTime(bond.vestingTerm).days;
|
|
68
79
|
return parseFloat((((discount * 365) / vestingDays).toFixed(2)));
|
|
69
80
|
};
|
|
70
|
-
return (_jsxs(Flex, { className: "bonds-container bondrow-container", onClick: function () { return rowClick(bond); }, children: [_jsxs(Flex, { className: "column column-tokens", children: [_jsx(Flex, { className: "column column-tokeninfoname", children: _jsx(TokenInfoAndName, { bill: bond }) }), _jsx(Flex, { className: "column column-tokenicons", children: _jsx(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Tooltip, { tokenContract: (bond === null || bond === void 0 ? void 0 : bond.earnToken.address[bond.chainId]) || '', secondURL: getBillContractURL(bond), secondURLTitle: 'View Bond Contract', thirdURL: "https://dashboard.ape.bond/bond/".concat((_b = bond === null || bond === void 0 ? void 0 : bond.billAddress) === null || _b === void 0 ? void 0 : _b.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: (_c = bond.chainId) !== null && _c !== void 0 ? _c : ChainId.BSC }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)", children: _jsx(Svg, { icon: "more", width: "20px" }) }) })] }), _jsxs(Flex, { className: "column column-bondinfo", children: [_jsx(Flex, { className: "column column-discount ".concat(getDiscountColor(bond === null || bond === void 0 ? void 0 : bond.discount)), children: (bond === null || bond === void 0 ? void 0 : bond.discount) !== undefined ? "".concat(bond.discount.toFixed(2), "%") : '-' }), _jsx(Flex, { className: "column column-arr", children: calculateARR(bond) !== undefined ? "".concat(calculateARR(bond), "%") : '-' }), _jsx(Flex, { className: "column column-terms", children: vestingTime(bond.vestingTerm).days ? "".concat(vestingTime(bond.vestingTerm).days, " D") : '-' }), _jsx(Flex, { className: "column column-tokensremaining", children: _jsx(ProgressBarWrapper, { title: '', value: _jsx(ProgressBar, { value: remainingPercentage(bond) }), style: {
|
|
81
|
+
return (_jsxs(Flex, __assign({ className: "bonds-container bondrow-container", onClick: function () { return rowClick(bond); } }, { children: [_jsxs(Flex, __assign({ className: "column column-tokens" }, { children: [_jsx(Flex, __assign({ className: "column column-tokeninfoname" }, { children: _jsx(TokenInfoAndName, { bill: bond }) })), _jsx(Flex, __assign({ className: "column column-tokenicons" }, { children: _jsx(TooltipBubble, __assign({ className: "tooltip-bubble", body: _jsx(Tooltip, { tokenContract: (bond === null || bond === void 0 ? void 0 : bond.earnToken.address[bond.chainId]) || '', secondURL: getBillContractURL(bond), secondURLTitle: 'View Bond Contract', thirdURL: "https://dashboard.ape.bond/bond/".concat((_b = bond === null || bond === void 0 ? void 0 : bond.billAddress) === null || _b === void 0 ? void 0 : _b.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: (_c = bond.chainId) !== null && _c !== void 0 ? _c : ChainId.BSC }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)" }, { children: _jsx(Svg, { icon: "more", width: "20px" }) })) }))] })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsx(Flex, __assign({ className: "column column-discount ".concat(getDiscountColor(bond === null || bond === void 0 ? void 0 : bond.discount)) }, { children: (bond === null || bond === void 0 ? void 0 : bond.discount) !== undefined ? "".concat(bond.discount.toFixed(2), "%") : '-' })), _jsx(Flex, __assign({ className: "column column-arr" }, { children: calculateARR(bond) !== undefined ? "".concat(calculateARR(bond), "%") : '-' })), _jsx(Flex, __assign({ className: "column column-terms" }, { 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: {
|
|
71
82
|
width: '127px',
|
|
72
83
|
height: '25px',
|
|
73
84
|
flexDirection: 'column',
|
|
@@ -76,6 +87,6 @@ var BondRow = function (_a) {
|
|
|
76
87
|
}, showTooltip: true, toolTip: "".concat(remainingTokensFormat(bond), " ").concat(bond.earnToken.symbol, " (").concat(formatDollar({
|
|
77
88
|
num: remainingTokensUsd(bond).toNumber(),
|
|
78
89
|
isPrice: true,
|
|
79
|
-
}), ")") }) }), _jsx(Flex, { className: "column column-hotbond", children: _jsx(Flex, { className: "column column-icon", children: (hotBonds === null || hotBonds === void 0 ? void 0 : hotBonds.includes(bond.billAddress.toLowerCase())) && ((_d = bond.discount) !== null && _d !== void 0 ? _d : 0) > 0 && (_jsx(Svg, { icon: "hot", width: "20px" })) }) })] })] }, bond.billAddress));
|
|
90
|
+
}), ")") }) })), _jsx(Flex, __assign({ className: "column column-hotbond" }, { children: _jsx(Flex, __assign({ className: "column column-icon" }, { children: (hotBonds === null || hotBonds === void 0 ? void 0 : hotBonds.includes(bond.billAddress.toLowerCase())) && ((_d = bond.discount) !== null && _d !== void 0 ? _d : 0) > 0 && (_jsx(Svg, { icon: "hot", width: "20px" })) })) }))] }))] }), bond.billAddress));
|
|
80
91
|
};
|
|
81
92
|
export default BondRow;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
2
13
|
import { Flex } from 'theme-ui';
|
|
3
14
|
import { Input } from '../uikit-sdk/Input';
|
|
@@ -7,6 +18,6 @@ import '../../scss/BondRowHeader.scss';
|
|
|
7
18
|
import BondMenu from '../BondMenu/BondMenu';
|
|
8
19
|
var BondRowHeader = function (_a) {
|
|
9
20
|
var inputValue = _a.inputValue, setChainFilterOption = _a.setChainFilterOption, chainFilterOption = _a.chainFilterOption, filterOptions = _a.filterOptions, filterOption = _a.filterOption, setFilterOption = _a.setFilterOption, onInputChange = _a.onInputChange, onHandleQueryChange = _a.onHandleQueryChange, onSort = _a.onSort;
|
|
10
|
-
return (_jsxs(Flex, { className: "bondrow-header", children: [_jsx(Flex, { className: "bondrow-header filters", children: _jsx(BondMenu, { chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], setChainFilterOption: setChainFilterOption, filterOptions: filterOptions, filterOption: filterOption, setFilterOption: setFilterOption, onHandleQueryChange: onHandleQueryChange }) }), _jsxs(Flex, { className: "bondrow-header rows", children: [_jsxs(Flex, { className: "column column-tokens header", children: [_jsx(Flex, { className: "column column-search", sx: { width: '100%', maxWidth: ['200px', '200px', '200px', '340px'] }, children: _jsx(Input, { value: inputValue, onChange: onInputChange, variant: "search", sx: { fontWeight: 400, background: 'white2', height: '30px', fontSize: '14px', color: 'white' }, width: '100%', placeholder: 'Search...' }) }), _jsx(Flex, { className: "column column-tokenicons header" })] }), _jsxs(Flex, { className: "column column-bondinfo header", children: [_jsxs(Flex, { className: "column column-discount header", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(18%, -4%)", children: ["DISCOUNT", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('discount'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsxs(Flex, { className: "column column-arr header", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(8%, -5%)", children: ["ARR", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('arr'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsxs(Flex, { className: "column column-terms header", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomRight", transformTip: "translate(11%, -5%)", children: ["TERMS", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('terms'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsxs(Flex, { className: "column column-tokensremaining header", children: [_jsx(Flex, { className: "column tooltip", children: _jsxs(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomRight", transformTip: "translate(12%, -4%)", children: ["TOKENS REMAINING", _jsx(Flex, { className: "column header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px", color: "textDisabledButton" }) })] }) }), _jsx(Flex, { className: "column header-icon", onClick: function () { return onSort('tokensRemaining'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsx(Flex, { className: "column column-hotbond header" })] })] })] }));
|
|
21
|
+
return (_jsxs(Flex, __assign({ className: "bondrow-header" }, { children: [_jsx(Flex, __assign({ className: "bondrow-header filters" }, { children: _jsx(BondMenu, { chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], setChainFilterOption: setChainFilterOption, filterOptions: filterOptions, filterOption: filterOption, setFilterOption: setFilterOption, onHandleQueryChange: onHandleQueryChange }) })), _jsxs(Flex, __assign({ className: "bondrow-header rows" }, { children: [_jsxs(Flex, __assign({ className: "column column-tokens header" }, { children: [_jsx(Flex, __assign({ className: "column column-search", sx: { width: '100%', maxWidth: ['200px', '200px', '200px', '340px'] } }, { children: _jsx(Input, { value: inputValue, onChange: onInputChange, variant: "search", sx: { fontWeight: 400, background: 'white2', height: '30px', fontSize: '14px', color: 'white' }, width: '100%', placeholder: 'Search...' }) })), _jsx(Flex, { className: "column column-tokenicons header" })] })), _jsxs(Flex, __assign({ className: "column column-bondinfo header" }, { children: [_jsxs(Flex, __assign({ className: "column column-discount header" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ className: "tooltip-bubble", 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", color: "textDisabledButton" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return onSort('discount'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) }))] })), _jsxs(Flex, __assign({ className: "column column-arr header" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ className: "tooltip-bubble", 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", color: "textDisabledButton" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return onSort('arr'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) }))] })), _jsxs(Flex, __assign({ className: "column column-terms header" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ className: "tooltip-bubble", 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", color: "textDisabledButton" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return onSort('terms'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) }))] })), _jsxs(Flex, __assign({ className: "column column-tokensremaining header" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ className: "tooltip-bubble", 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", color: "textDisabledButton" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return onSort('tokensRemaining'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) }))] })), _jsx(Flex, { className: "column column-hotbond header" })] }))] }))] })));
|
|
11
22
|
};
|
|
12
23
|
export default BondRowHeader;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { BondsDataResponse } from '../../types/bonds';
|
|
2
3
|
import '../../scss/BondRowsByChain.scss';
|
|
3
4
|
declare const BondRowsByChain: ({ bonds, hotBonds, hideTitles, chains }: {
|
|
4
5
|
bonds: BondsDataResponse[];
|
|
5
|
-
hotBonds?: string[];
|
|
6
|
+
hotBonds?: string[] | undefined;
|
|
6
7
|
hideTitles: boolean;
|
|
7
|
-
chains?: number[];
|
|
8
|
+
chains?: number[] | undefined;
|
|
8
9
|
}) => import("react").JSX.Element;
|
|
9
10
|
export default BondRowsByChain;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "theme-ui/jsx-runtime";
|
|
2
13
|
import BondRowsWithTitle from './BondRowsWithTitle';
|
|
3
14
|
import { MAINNET_CHAINS } from '../../config/constants/chains';
|
|
@@ -5,9 +16,9 @@ import '../../scss/BondRowsByChain.scss';
|
|
|
5
16
|
import { Flex } from 'theme-ui';
|
|
6
17
|
var BondRowsByChain = function (_a) {
|
|
7
18
|
var bonds = _a.bonds, hotBonds = _a.hotBonds, hideTitles = _a.hideTitles, chains = _a.chains;
|
|
8
|
-
return (_jsx(Flex, { className: "bondrowsbychain", children: (MAINNET_CHAINS.map(function (chain, index) {
|
|
19
|
+
return (_jsx(Flex, __assign({ className: "bondrowsbychain" }, { children: (MAINNET_CHAINS.map(function (chain, index) {
|
|
9
20
|
return ((!chains || chains.length === 0 || chains.includes(chain)) &&
|
|
10
21
|
_jsx(BondRowsWithTitle, { chain: chain, bonds: bonds, hotBonds: hotBonds, hideTitles: hideTitles }, chain));
|
|
11
|
-
})) }));
|
|
22
|
+
})) })));
|
|
12
23
|
};
|
|
13
24
|
export default BondRowsByChain;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { BondsDataResponse } from "../../types/bonds";
|
|
2
3
|
import '../../scss/BondRowsWithTitle.scss';
|
|
3
4
|
declare const BondRowsWithTitle: ({ chain, bonds, hotBonds, hideTitles }: {
|
|
4
5
|
chain: number;
|
|
5
6
|
bonds: BondsDataResponse[];
|
|
6
|
-
hotBonds?: string[];
|
|
7
|
+
hotBonds?: string[] | undefined;
|
|
7
8
|
hideTitles: boolean;
|
|
8
9
|
}) => import("react").JSX.Element;
|
|
9
10
|
export default BondRowsWithTitle;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
2
13
|
import { AnimatePresence, motion } from "framer-motion";
|
|
3
14
|
import ChainTitle from "./ChainTitle";
|
|
@@ -10,11 +21,11 @@ var BondRowsWithTitle = function (_a) {
|
|
|
10
21
|
var billsFilteredByChain = bonds.filter(function (bill) { return bill.chainId === chain; });
|
|
11
22
|
var key = chain;
|
|
12
23
|
var _b = useState(true), isOpen = _b[0], setIsOpen = _b[1];
|
|
13
|
-
return (_jsx(Flex, { className: "bondrowswithtitle", children: _jsxs(AnimatePresence, { initial: false, children: [_jsx(Flex, { onClick: function () { return setIsOpen(!isOpen); }, children: _jsx(ChainTitle, { chain: chain, pt: '5px', hideTitles: billsFilteredByChain.length > 0 ? false : true, isOpen: isOpen }) }), billsFilteredByChain.length > 0 && isOpen && (_jsx(motion.div, { initial: { height: 0, overflow: 'hidden' }, animate: { height: 'fit-content', overflow: 'hidden', transitionEnd: { overflow: 'visible' } }, exit: { height: 0, overflow: 'hidden' }, sx: {
|
|
24
|
+
return (_jsx(Flex, __assign({ className: "bondrowswithtitle" }, { children: _jsxs(AnimatePresence, __assign({ initial: false }, { children: [_jsx(Flex, __assign({ onClick: function () { return setIsOpen(!isOpen); } }, { children: _jsx(ChainTitle, { chain: chain, pt: '5px', hideTitles: billsFilteredByChain.length > 0 ? false : true, isOpen: isOpen }) })), billsFilteredByChain.length > 0 && isOpen && (_jsx(motion.div, __assign({ initial: { height: 0, overflow: 'hidden' }, animate: { height: 'fit-content', overflow: 'hidden', transitionEnd: { overflow: 'visible' } }, exit: { height: 0, overflow: 'hidden' }, sx: {
|
|
14
25
|
position: 'relative',
|
|
15
26
|
overflow: 'hidden',
|
|
16
27
|
width: '100%',
|
|
17
28
|
marginTop: '0px',
|
|
18
|
-
}, children: billsFilteredByChain === null || billsFilteredByChain === void 0 ? void 0 : billsFilteredByChain.map(function (bill) { return (_jsx(BondRow, { bond: bill, hotBonds: hotBonds }, bill.billAddress)); }) }, key))] }) }, key));
|
|
29
|
+
} }, { children: billsFilteredByChain === null || billsFilteredByChain === void 0 ? void 0 : billsFilteredByChain.map(function (bill) { return (_jsx(BondRow, { bond: bill, hotBonds: hotBonds }, bill.billAddress)); }) }), key))] })) }), key));
|
|
19
30
|
};
|
|
20
31
|
export default BondRowsWithTitle;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
2
13
|
import { Flex, Svg } from '../uikit-sdk';
|
|
3
14
|
import { NETWORK_LABEL } from '../../config/constants/chains';
|
|
4
15
|
var ChainTitle = function (_a) {
|
|
5
16
|
var chain = _a.chain, pt = _a.pt, hideTitles = _a.hideTitles, isOpen = _a.isOpen;
|
|
6
|
-
return (_jsxs(Flex, { className: "chaintitle", sx: {
|
|
17
|
+
return (_jsxs(Flex, __assign({ className: "chaintitle", sx: {
|
|
7
18
|
pt: pt,
|
|
8
19
|
pb: '10px',
|
|
9
20
|
color: 'textDisabledButton',
|
|
@@ -13,6 +24,6 @@ var ChainTitle = function (_a) {
|
|
|
13
24
|
textTransform: 'uppercase',
|
|
14
25
|
display: hideTitles ? 'none' : 'flex',
|
|
15
26
|
width: '200px',
|
|
16
|
-
}, children: [NETWORK_LABEL[chain], " Bonds", _jsx(Flex, { sx: { ml: '7px' }, children: _jsx(Svg, { icon: "caret", direction: isOpen ? 'down' : 'up', width: 8, color: "textDisabledButton" }) })] }));
|
|
27
|
+
} }, { children: [NETWORK_LABEL[chain], " Bonds", _jsx(Flex, __assign({ sx: { ml: '7px' } }, { children: _jsx(Svg, { icon: "caret", direction: isOpen ? 'down' : 'up', width: 8, color: "textDisabledButton" }) }))] })));
|
|
17
28
|
};
|
|
18
29
|
export default ChainTitle;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Option } from './types';
|
|
3
|
-
declare const MenuSelect: ({ selectedOption, setOption, options, ...props }:
|
|
4
|
-
selectedOption: string;
|
|
5
|
-
setOption: (option: string) => void;
|
|
6
|
-
options: Option[] | undefined;
|
|
7
|
-
} | any) => React.JSX.Element;
|
|
3
|
+
declare const MenuSelect: ({ selectedOption, setOption, options, ...props }: any) => React.JSX.Element;
|
|
8
4
|
export default MenuSelect;
|
|
@@ -30,7 +30,7 @@ var MenuSelect = function (_a) {
|
|
|
30
30
|
width: '100%',
|
|
31
31
|
paddingRight: '4px',
|
|
32
32
|
} }, props, { children: options === null || options === void 0 ? void 0 : options.map(function (option) {
|
|
33
|
-
return (_jsx(SelectItem, { size: "xsm", value: option.value, children: _jsx(Text, { sx: { fontWeight: 400, pl: '10px' }, children: option.label }) }, option.label));
|
|
33
|
+
return (_jsx(SelectItem, __assign({ size: "xsm", value: option.value }, { children: _jsx(Text, __assign({ sx: { fontWeight: 400, pl: '10px' } }, { children: option.label })) }), option.label));
|
|
34
34
|
}) })));
|
|
35
35
|
};
|
|
36
36
|
export default MenuSelect;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "theme-ui/jsx-runtime";
|
|
2
13
|
import { Flex } from '../uikit-sdk';
|
|
3
14
|
var RecommendationSelector = function (_a) {
|
|
@@ -5,7 +16,7 @@ var RecommendationSelector = function (_a) {
|
|
|
5
16
|
var handleClick = function (option) {
|
|
6
17
|
setActiveOption(option);
|
|
7
18
|
};
|
|
8
|
-
return (_jsx(Flex, { sx: {
|
|
19
|
+
return (_jsx(Flex, __assign({ sx: {
|
|
9
20
|
alignItems: 'center',
|
|
10
21
|
color: 'grey',
|
|
11
22
|
fontSize: ['11px'],
|
|
@@ -13,9 +24,9 @@ var RecommendationSelector = function (_a) {
|
|
|
13
24
|
'& > div:last-child': {
|
|
14
25
|
marginRight: '0',
|
|
15
26
|
},
|
|
16
|
-
}, children: options.map(function (option) {
|
|
27
|
+
} }, { children: options.map(function (option) {
|
|
17
28
|
var isActive = option === activeOption;
|
|
18
|
-
return (_jsx(Flex, { sx: {
|
|
29
|
+
return (_jsx(Flex, __assign({ sx: {
|
|
19
30
|
background: isActive ? 'primaryShade' : 'white2',
|
|
20
31
|
color: isActive ? 'primaryButton' : 'textDisabledButton',
|
|
21
32
|
px: ['6px', '6px', '6px', '10px'],
|
|
@@ -26,7 +37,7 @@ var RecommendationSelector = function (_a) {
|
|
|
26
37
|
lineHeight: '11px',
|
|
27
38
|
alignItems: 'center',
|
|
28
39
|
height: '24px',
|
|
29
|
-
}, onClick: function () { return handleClick(option); }, children: option }, option));
|
|
30
|
-
}) }));
|
|
40
|
+
}, onClick: function () { return handleClick(option); } }, { children: option }), option));
|
|
41
|
+
}) })));
|
|
31
42
|
};
|
|
32
43
|
export default RecommendationSelector;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
13
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
14
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -232,9 +243,9 @@ var BondModal = function (_a) {
|
|
|
232
243
|
var singlePurchaseLimit = new BigNumber((_c = bond === null || bond === void 0 ? void 0 : bond.maxPayout) !== null && _c !== void 0 ? _c : 0).div(new BigNumber(10).pow((_d = bond === null || bond === void 0 ? void 0 : bond.earnToken.decimals[chainId]) !== null && _d !== void 0 ? _d : 18));
|
|
233
244
|
return !available ? 0 : (singlePurchaseLimit.lt(safeAvailable) ? singlePurchaseLimit : safeAvailable);
|
|
234
245
|
};
|
|
235
|
-
return (_jsx(ThemeUIProvider, { theme: defaultTheme, children: bondData.map(function (bond) {
|
|
246
|
+
return (_jsx(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: bondData.map(function (bond) {
|
|
236
247
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
237
|
-
return (_jsx(React.Fragment, { children: _jsx(Flex, { className: "modal-backdrop", onClick: onClose, children: _jsxs(Flex, { className: "modal-content", onClick: function (event) { return event.stopPropagation(); }, children: [toastMessage && (_jsx(Flex, { className: "toast", children: toastMessage })), _jsx(Flex, { className: "modal-header", children: _jsx(Flex, { className: "svg-close", onClick: onClose, children: _jsx(Svg, { icon: "close" }) }) }), _jsxs(Flex, { className: "modaltable-container", children: [_jsxs(Flex, { className: "modaltable-container title-container", children: [_jsx(Flex, { className: "title-container bondicon", children: _jsxs("div", { className: "icon-container", children: [_jsx(Svg, { width: 20, height: 20, icon: (_a = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bond.chainId]) !== null && _a !== void 0 ? _a : 'question' }), _jsx(TokenImage, { symbol: (_b = bond.showcaseTokenName) !== null && _b !== void 0 ? _b : bond.earnToken.symbol, size: 50 })] }) }), _jsx(Flex, { className: "title-container bondname", children: bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName }), _jsxs(Flex, { className: "title-container price-container", children: [_jsxs(Flex, { className: "price-container price", children: ["$", earnTokenPrice(bond)] }), _jsxs(Flex, { className: "price-container discounted", children: ["$", discountEarnTokenPrice(bond)] })] }), _jsx(Flex, { className: "title-container tokentags", children: _jsx(ListTag, { text: (_c = bond === null || bond === void 0 ? void 0 : bond.tags) === null || _c === void 0 ? void 0 : _c[0], variant: ((_d = bond === null || bond === void 0 ? void 0 : bond.tags) === null || _d === void 0 ? void 0 : _d[0]) === 'Cex Fund' ? 'cex_fund' : 'liquidity' }) })] }), _jsx(Flex, { className: "modaltable-container description-container", children: bond === null || bond === void 0 ? void 0 : bond.shortDescription }), _jsxs(Flex, { className: "modaltable-container blocks-container", children: [_jsxs(Flex, { className: "modal-block block-discount ".concat(getDiscountColor(bond === null || bond === void 0 ? void 0 : bond.discount)), children: [_jsxs(Flex, { className: "block-header", children: ["Discount", _jsx(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: _jsx(Flex, { className: "header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), _jsx(Flex, { className: "block-content", children: "".concat((_e = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _e === void 0 ? void 0 : _e.toFixed(2), "%") })] }), _jsxs(Flex, { className: "modal-block block-arr", children: [_jsxs(Flex, { className: "block-header", children: ["ARR", _jsx(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: _jsx(Flex, { className: "header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), _jsx(Flex, { className: "block-content", children: "".concat(((((_f = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _f !== void 0 ? _f : 0) * 365) / vestingTime((_g = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _g !== void 0 ? _g : 0).days).toFixed(2), "%") })] }), _jsxs(Flex, { className: "modal-block block-term", children: [_jsxs(Flex, { className: "block-header", children: ["Terms", _jsx(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: _jsx(Flex, { className: "header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), _jsx(Flex, { className: "block-content", children: vestingTime((_h = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _h !== void 0 ? _h : 0).days ? "".concat(vestingTime((_j = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _j !== void 0 ? _j : 0).days, " D") : '-' })] }), _jsxs(Flex, { className: "modal-block block-maxbuy", children: [_jsxs(Flex, { className: "block-header", children: ["Max Buy", _jsx(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.MaxBuy(bond.earnToken.symbol) }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: _jsx(Flex, { className: "header-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), _jsx(Flex, { className: "block-content", children: (_k = parseFloat(maxBuy(bond).toFixed(0))) === null || _k === void 0 ? void 0 : _k.toLocaleString('en-US') })] })] }), _jsxs(Flex, { className: "modaltable-container text-container", children: [_jsxs(Flex, { className: "text-container row", children: [_jsx(Flex, { className: "row-container spend", children: "You spend:" }), _jsxs(Flex, { className: "row-container spend-val", children: [youSpend(inputValue), " ", bond.lpToken.symbol, " = $ ", formatUSDNumber(youSpendUSD(bond, inputValue))] })] }), _jsxs(Flex, { className: "text-container row", children: [_jsxs(Flex, { className: "row-container premium", children: ["Premium:", _jsx(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.Premium }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: _jsx(Flex, { className: "row-container premium-icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), _jsxs(Flex, { className: "row-container premium-val ".concat(getPremiumColor(bond, inputValue)), children: ["$ ", premium(bond, inputValue)] })] }), _jsxs(Flex, { className: "text-container row", children: [_jsxs(Flex, { className: "row-container get", children: ["You get (over ", vestingTime((_l = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _l !== void 0 ? _l : 0).days, " days):"] }), _jsxs(Flex, { className: "row-container get-val", children: [youGet(bond, inputValue), " ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName, " = $ ", formatUSDNumber(youGetUSD(bond, inputValue))] })] })] }), _jsxs(Flex, { className: "modaltable-container buy-container", children: [_jsxs(Flex, { className: "input-container inputrow", children: [_jsx(Flex, { className: "input-container input", children: _jsx(Input, { placeholder: "0.0", value: inputValue, pattern: "^[0-9]*[.,]?[0-9]*$", onChange: handleInputChange, onInput: function (v) {
|
|
248
|
+
return (_jsx(React.Fragment, { children: _jsx(Flex, __assign({ className: "modal-backdrop", onClick: onClose }, { children: _jsxs(Flex, __assign({ className: "modal-content", onClick: function (event) { return event.stopPropagation(); } }, { children: [toastMessage && (_jsx(Flex, __assign({ className: "toast" }, { children: toastMessage }))), _jsx(Flex, __assign({ className: "modal-header" }, { children: _jsx(Flex, __assign({ className: "svg-close", onClick: onClose }, { children: _jsx(Svg, { icon: "close" }) })) })), _jsxs(Flex, __assign({ className: "modaltable-container" }, { children: [_jsxs(Flex, __assign({ className: "modaltable-container title-container" }, { children: [_jsx(Flex, __assign({ className: "title-container bondicon" }, { children: _jsxs("div", __assign({ className: "icon-container" }, { children: [_jsx(Svg, { width: 20, height: 20, icon: (_a = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bond.chainId]) !== null && _a !== void 0 ? _a : 'question' }), _jsx(TokenImage, { symbol: (_b = bond.showcaseTokenName) !== null && _b !== void 0 ? _b : bond.earnToken.symbol, size: 50 })] })) })), _jsx(Flex, __assign({ className: "title-container bondname" }, { children: bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName })), _jsxs(Flex, __assign({ className: "title-container price-container" }, { children: [_jsxs(Flex, __assign({ className: "price-container price" }, { children: ["$", earnTokenPrice(bond)] })), _jsxs(Flex, __assign({ className: "price-container discounted" }, { children: ["$", discountEarnTokenPrice(bond)] }))] })), _jsx(Flex, __assign({ className: "title-container tokentags" }, { children: _jsx(ListTag, { text: (_c = bond === null || bond === void 0 ? void 0 : bond.tags) === null || _c === void 0 ? void 0 : _c[0], variant: ((_d = bond === null || bond === void 0 ? void 0 : bond.tags) === null || _d === void 0 ? void 0 : _d[0]) === 'Cex Fund' ? 'cex_fund' : 'liquidity' }) }))] })), _jsx(Flex, __assign({ className: "modaltable-container description-container" }, { children: bond === null || bond === void 0 ? void 0 : bond.shortDescription })), _jsxs(Flex, __assign({ className: "modaltable-container blocks-container" }, { children: [_jsxs(Flex, __assign({ className: "modal-block block-discount ".concat(getDiscountColor(bond === null || bond === void 0 ? void 0 : bond.discount)) }, { children: [_jsxs(Flex, __assign({ className: "block-header" }, { children: ["Discount", _jsx(TooltipBubble, __assign({ className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)" }, { children: _jsx(Flex, __assign({ className: "header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) })) }))] })), _jsx(Flex, __assign({ className: "block-content" }, { children: "".concat((_e = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _e === void 0 ? void 0 : _e.toFixed(2), "%") }))] })), _jsxs(Flex, __assign({ className: "modal-block block-arr" }, { children: [_jsxs(Flex, __assign({ className: "block-header" }, { children: ["ARR", _jsx(TooltipBubble, __assign({ className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)" }, { children: _jsx(Flex, __assign({ className: "header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) })) }))] })), _jsx(Flex, __assign({ className: "block-content" }, { children: "".concat(((((_f = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _f !== void 0 ? _f : 0) * 365) / vestingTime((_g = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _g !== void 0 ? _g : 0).days).toFixed(2), "%") }))] })), _jsxs(Flex, __assign({ className: "modal-block block-term" }, { children: [_jsxs(Flex, __assign({ className: "block-header" }, { children: ["Terms", _jsx(TooltipBubble, __assign({ className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)" }, { children: _jsx(Flex, __assign({ className: "header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) })) }))] })), _jsx(Flex, __assign({ className: "block-content" }, { children: vestingTime((_h = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _h !== void 0 ? _h : 0).days ? "".concat(vestingTime((_j = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _j !== void 0 ? _j : 0).days, " D") : '-' }))] })), _jsxs(Flex, __assign({ className: "modal-block block-maxbuy" }, { children: [_jsxs(Flex, __assign({ className: "block-header" }, { children: ["Max Buy", _jsx(TooltipBubble, __assign({ className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.MaxBuy(bond.earnToken.symbol) }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)" }, { children: _jsx(Flex, __assign({ className: "header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) })) }))] })), _jsx(Flex, __assign({ className: "block-content" }, { children: (_k = parseFloat(maxBuy(bond).toFixed(0))) === null || _k === void 0 ? void 0 : _k.toLocaleString('en-US') }))] }))] })), _jsxs(Flex, __assign({ className: "modaltable-container text-container" }, { children: [_jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsx(Flex, __assign({ className: "row-container spend" }, { children: "You spend:" })), _jsxs(Flex, __assign({ className: "row-container spend-val" }, { children: [youSpend(inputValue), " ", bond.lpToken.symbol, " = $ ", formatUSDNumber(youSpendUSD(bond, inputValue))] }))] })), _jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsxs(Flex, __assign({ className: "row-container premium" }, { children: ["Premium:", _jsx(TooltipBubble, __assign({ className: "tooltip-bubble", body: _jsx(Flex, { children: TooltipText.Premium }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)" }, { children: _jsx(Flex, __assign({ className: "row-container premium-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) })) }))] })), _jsxs(Flex, __assign({ className: "row-container premium-val ".concat(getPremiumColor(bond, inputValue)) }, { children: ["$ ", premium(bond, inputValue)] }))] })), _jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsxs(Flex, __assign({ className: "row-container get" }, { children: ["You get (over ", vestingTime((_l = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _l !== void 0 ? _l : 0).days, " days):"] })), _jsxs(Flex, __assign({ className: "row-container get-val" }, { children: [youGet(bond, inputValue), " ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName, " = $ ", formatUSDNumber(youGetUSD(bond, inputValue))] }))] }))] })), _jsxs(Flex, __assign({ className: "modaltable-container buy-container" }, { children: [_jsxs(Flex, __assign({ className: "input-container inputrow" }, { children: [_jsx(Flex, __assign({ className: "input-container input" }, { children: _jsx(Input, { placeholder: "0.0", value: inputValue, pattern: "^[0-9]*[.,]?[0-9]*$", onChange: handleInputChange, onInput: function (v) {
|
|
238
249
|
if (v.currentTarget.value.includes(',')) {
|
|
239
250
|
v.currentTarget.value = v.currentTarget.value.replace(/,/g, '.');
|
|
240
251
|
}
|
|
@@ -248,18 +259,18 @@ var BondModal = function (_a) {
|
|
|
248
259
|
!!v.currentTarget.value && isNumber(v.currentTarget.value) && parseFloat(v.currentTarget.value) >= 0
|
|
249
260
|
? v.currentTarget.value
|
|
250
261
|
: v.currentTarget.value.slice(0, v.currentTarget.value.length - 1);
|
|
251
|
-
} }) }), _jsxs(Flex, { className: "input-container token", children: [_jsx(Flex, { className: "input-container bondicon", children: _jsxs("div", { className: "icon-container-small", children: [_jsx(Svg, { width: 12, height: 12, icon: (_m = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bond.chainId]) !== null && _m !== void 0 ? _m : 'question' }), _jsx(TokenImage, { symbol: (_o = bond.lpToken.symbol) !== null && _o !== void 0 ? _o : bond.earnToken.symbol, size: 30 })] }) }), _jsx(Flex, { className: "title-container tokenname-small", children: bond === null || bond === void 0 ? void 0 : bond.lpToken.symbol })] })] }), isActive && account && (_jsxs(Flex, { className: "input-container balancerow", children: [_jsxs(Flex, { className: "balancerow text", children: ["Balance: ", tokenBalance] }), _jsx(Flex, { className: "balancerow max", children: _jsx(Button, { className: "max-button", onClick: function () { setInputValue(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0'); }, children: "Max" }) })] }))] }), _jsxs(Flex, { className: "modaltable-container button-container", children: [_jsx(Flex, { className: "button-container get", children: _jsxs(Button, { className: "action-button", onClick: function () { window.open('https://ape.bond/swap', '_blank'); }, children: ["Get ", bond === null || bond === void 0 ? void 0 : bond.lpToken.symbol] }) }), _jsx(Flex, { className: "button-container buy", children: chainId !== bond.chainId
|
|
262
|
+
} }) })), _jsxs(Flex, __assign({ className: "input-container token" }, { children: [_jsx(Flex, __assign({ className: "input-container bondicon" }, { children: _jsxs("div", __assign({ className: "icon-container-small" }, { children: [_jsx(Svg, { width: 12, height: 12, icon: (_m = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bond.chainId]) !== null && _m !== void 0 ? _m : 'question' }), _jsx(TokenImage, { symbol: (_o = bond.lpToken.symbol) !== null && _o !== void 0 ? _o : bond.earnToken.symbol, size: 30 })] })) })), _jsx(Flex, __assign({ className: "title-container tokenname-small" }, { children: bond === null || bond === void 0 ? void 0 : bond.lpToken.symbol }))] }))] })), isActive && account && (_jsxs(Flex, __assign({ className: "input-container balancerow" }, { children: [_jsxs(Flex, __assign({ className: "balancerow text" }, { children: ["Balance: ", tokenBalance] })), _jsx(Flex, __assign({ className: "balancerow max" }, { children: _jsx(Button, __assign({ className: "max-button", onClick: function () { setInputValue(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0'); } }, { children: "Max" })) }))] })))] })), _jsxs(Flex, __assign({ className: "modaltable-container button-container" }, { children: [_jsx(Flex, __assign({ className: "button-container get" }, { children: _jsxs(Button, __assign({ className: "action-button", onClick: function () { window.open('https://ape.bond/swap', '_blank'); } }, { children: ["Get ", bond === null || bond === void 0 ? void 0 : bond.lpToken.symbol] })) })), _jsx(Flex, __assign({ className: "button-container buy" }, { children: chainId !== bond.chainId
|
|
252
263
|
?
|
|
253
|
-
_jsxs(Button, { className: "switch-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut), onClick: function (event) {
|
|
264
|
+
_jsxs(Button, __assign({ className: "switch-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut), onClick: function (event) {
|
|
254
265
|
event.stopPropagation();
|
|
255
266
|
// Add your claim logic here
|
|
256
267
|
switchChain({ chainId: bond.chainId });
|
|
257
|
-
}, children: ["Switch to ", NETWORK_LABEL[bond.chainId]] })
|
|
268
|
+
} }, { children: ["Switch to ", NETWORK_LABEL[bond.chainId]] }))
|
|
258
269
|
:
|
|
259
270
|
approveTx != null && isConfirmed ?
|
|
260
|
-
_jsx(Button, { className: "action-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut), onClick: handleBuy, children: isConfirming ? 'Confirming...' : "Buy ".concat(bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName) })
|
|
271
|
+
_jsx(Button, __assign({ className: "action-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut), onClick: handleBuy }, { children: isConfirming ? 'Confirming...' : "Buy ".concat(bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName) }))
|
|
261
272
|
:
|
|
262
|
-
_jsx(Button, { className: "action-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut), onClick: handleApprove, children: isConfirming ? 'Confirming...' : 'Approve' }) })] })] })] }) }) }, bond.billAddress));
|
|
263
|
-
}) }));
|
|
273
|
+
_jsx(Button, __assign({ className: "action-button", disabled: isPending || isConfirming || (bond === null || bond === void 0 ? void 0 : bond.soldOut), onClick: handleApprove }, { children: isConfirming ? 'Confirming...' : 'Approve' })) }))] }))] }))] })) })) }, bond.billAddress));
|
|
274
|
+
}) })));
|
|
264
275
|
};
|
|
265
276
|
export default BondModal;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
13
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
14
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -151,23 +162,23 @@ var YourBondsModal = function (_a) {
|
|
|
151
162
|
}); };
|
|
152
163
|
loadImage();
|
|
153
164
|
}, [userBill]);
|
|
154
|
-
return (_jsx(_Fragment, { children: _jsx(React.Fragment, { children: _jsx(Flex, { className: "yourbondsmodal-backdrop", onClick: onClose, children: !isImageLoaded ? (_jsxs(Flex, { className: "yourbondsmodal-spinner", children: [" ", _jsx(Spinner, { size: 100 }), " "] }))
|
|
155
|
-
: (_jsxs(Flex, { className: "yourbondsmodal-content", onClick: function (event) { return event.stopPropagation(); }, children: [toastMessage && (_jsx(Flex, { className: "toast", children: toastMessage })), _jsx(Flex, { className: "yourbondsmodal-header", children: _jsx(Flex, { className: "svg-close", onClick: onClose, children: _jsx(Svg, { icon: "close" }) }) }), _jsxs(Flex, { className: "yourbondsmodal table-container", children: [_jsx(Flex, { className: "yourbondsmodal bondimage", children: _jsx("img", { src: imageSrc, style: { display: isImageLoaded ? "block" : "none" } }) }), _jsxs(Flex, { className: "yourbondsmodal yourbondinfo", children: [_jsxs(Flex, { className: "yourbondinfo title-container", children: [_jsx(Flex, { className: "title-container bondicon", children: _jsxs("div", { className: "icon-container", children: [_jsx(Svg, { width: 18, height: 18, icon: (_d = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[userBill.bond.chainId]) !== null && _d !== void 0 ? _d : 'question' }), _jsx(TokenImage, { symbol: (_e = userBill.bond.showcaseTokenName) !== null && _e !== void 0 ? _e : userBill.bond.earnToken.symbol, size: 40 })] }) }), _jsx(Flex, { className: "title-container tokenname", children: _jsx(StyledHeadingText, { children: (_f = userBill.bond) === null || _f === void 0 ? void 0 : _f.showcaseTokenName }) }), _jsx(Flex, { className: "title-container tokentags", children: (_g = userBill.bond.tags) === null || _g === void 0 ? void 0 : _g.slice(0, 1).map(function (tag) {
|
|
156
|
-
return (_jsx(Flex, { sx: { marginRight: '10px' }, children: _jsx(ListTag, { variant: tag === 'Cex Fund' ? 'cex_fund' : 'liquidity', text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }, tag));
|
|
157
|
-
}) }), _jsxs(Text, { sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] }, children: ["#", userBill.id] })] }), _jsxs(Flex, { className: "yourbondinfo blocks-container", children: [_jsxs(Flex, { className: "attributes-container", children: [_jsxs(Flex, { className: "attributes-header", sx: { borderRadius: "".concat(isOpenTraits ? '6px 6px 0px 0px' : 'normal'),
|
|
158
|
-
display: ['none', 'none', 'none', 'flex'] }, onClick: function () { return setIsOpenTraits(!isOpenTraits); }, children: [_jsxs(Flex, { sx: { gap: '10px', alignItems: 'center' }, children: [_jsx(Svg, { icon: "tag", direction: "down" }), _jsx(Text, { sx: { fontSize: '12px', fontWeight: 400, color: 'text', opacity: '0.6' }, children: "Traits" })] }), _jsx(Svg, { icon: "caret", direction: isOpenTraits ? 'up' : 'down' })] }), _jsx(AnimatePresence, { children: isOpenTraits && (_jsx(motion.div, { initial: { height: 0 }, animate: { height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { height: 0 }, sx: { overflow: 'hidden', width: '100%' }, children: _jsx(Flex, { sx: { flexDirection: 'column', gap: '1px' }, children: attributes
|
|
159
|
-
? attributes.map(function (a) { return (_jsxs(TraitsContentContainer, { children: [_jsx(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.trait_type }), _jsx(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.value })] }, a.value)); })
|
|
165
|
+
return (_jsx(_Fragment, { children: _jsx(React.Fragment, { children: _jsx(Flex, __assign({ className: "yourbondsmodal-backdrop", onClick: onClose }, { children: !isImageLoaded ? (_jsxs(Flex, __assign({ className: "yourbondsmodal-spinner" }, { children: [" ", _jsx(Spinner, { size: 100 }), " "] })))
|
|
166
|
+
: (_jsxs(Flex, __assign({ className: "yourbondsmodal-content", onClick: function (event) { return event.stopPropagation(); } }, { children: [toastMessage && (_jsx(Flex, __assign({ className: "toast" }, { children: toastMessage }))), _jsx(Flex, __assign({ className: "yourbondsmodal-header" }, { children: _jsx(Flex, __assign({ className: "svg-close", onClick: onClose }, { children: _jsx(Svg, { icon: "close" }) })) })), _jsxs(Flex, __assign({ className: "yourbondsmodal table-container" }, { children: [_jsx(Flex, __assign({ className: "yourbondsmodal bondimage" }, { children: _jsx("img", { src: imageSrc, style: { display: isImageLoaded ? "block" : "none" } }) })), _jsxs(Flex, __assign({ className: "yourbondsmodal yourbondinfo" }, { children: [_jsxs(Flex, __assign({ className: "yourbondinfo title-container" }, { children: [_jsx(Flex, __assign({ className: "title-container bondicon" }, { children: _jsxs("div", __assign({ className: "icon-container" }, { children: [_jsx(Svg, { width: 18, height: 18, icon: (_d = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[userBill.bond.chainId]) !== null && _d !== void 0 ? _d : 'question' }), _jsx(TokenImage, { symbol: (_e = userBill.bond.showcaseTokenName) !== null && _e !== void 0 ? _e : userBill.bond.earnToken.symbol, size: 40 })] })) })), _jsx(Flex, __assign({ className: "title-container tokenname" }, { children: _jsx(StyledHeadingText, { children: (_f = userBill.bond) === null || _f === void 0 ? void 0 : _f.showcaseTokenName }) })), _jsx(Flex, __assign({ className: "title-container tokentags" }, { children: (_g = userBill.bond.tags) === null || _g === void 0 ? void 0 : _g.slice(0, 1).map(function (tag) {
|
|
167
|
+
return (_jsx(Flex, __assign({ sx: { marginRight: '10px' } }, { children: _jsx(ListTag, { variant: tag === 'Cex Fund' ? 'cex_fund' : 'liquidity', text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }), tag));
|
|
168
|
+
}) })), _jsxs(Text, __assign({ sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] } }, { children: ["#", userBill.id] }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo blocks-container" }, { children: [_jsxs(Flex, __assign({ className: "attributes-container" }, { children: [_jsxs(Flex, __assign({ className: "attributes-header", sx: { borderRadius: "".concat(isOpenTraits ? '6px 6px 0px 0px' : 'normal'),
|
|
169
|
+
display: ['none', 'none', 'none', 'flex'] }, onClick: function () { return setIsOpenTraits(!isOpenTraits); } }, { children: [_jsxs(Flex, __assign({ sx: { gap: '10px', alignItems: 'center' } }, { children: [_jsx(Svg, { icon: "tag", direction: "down" }), _jsx(Text, __assign({ sx: { fontSize: '12px', fontWeight: 400, color: 'text', opacity: '0.6' } }, { children: "Traits" }))] })), _jsx(Svg, { icon: "caret", direction: isOpenTraits ? 'up' : 'down' })] })), _jsx(AnimatePresence, { children: isOpenTraits && (_jsx(motion.div, __assign({ initial: { height: 0 }, animate: { height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { height: 0 }, sx: { overflow: 'hidden', width: '100%' } }, { children: _jsx(Flex, __assign({ sx: { flexDirection: 'column', gap: '1px' } }, { children: attributes
|
|
170
|
+
? attributes.map(function (a) { return (_jsxs(TraitsContentContainer, { children: [_jsx(Text, __assign({ sx: { fontSize: '10px', fontWeight: 500 } }, { children: a === null || a === void 0 ? void 0 : a.trait_type })), _jsx(Text, __assign({ sx: { fontSize: '10px', fontWeight: 500 } }, { children: a === null || a === void 0 ? void 0 : a.value }))] }, a.value)); })
|
|
160
171
|
: BILL_ATTRIBUTES.map(function (attrib) {
|
|
161
|
-
return (_jsxs(TraitsContentContainer, { children: [_jsx(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: attrib }), _jsx(Skeleton, { width: "150px" })] }, attrib));
|
|
162
|
-
}) }) })) })] }), _jsxs(Flex, { className: "yourbondinfo-block row-vested", children: [_jsxs(Flex, { className: "yourbondinfo-block header", children: [_jsx(Flex, { className: "yourbondinfo-block header-title", children: "Fully Vested" }), _jsx(Flex, { className: "yourbondinfo-block header-tooltip", children: _jsx(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: _jsx(Flex, { className: "block-header icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), _jsxs(Flex, { className: "yourbondinfo-block info", children: [_jsx(Flex, { className: "block-info icon" }), _jsx(Flex, { className: "block-info text", children: _jsx(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: getPendingVesting((_h = userBill.lastBlockTimestamp) !== null && _h !== void 0 ? _h : '', (_j = userBill.vesting) !== null && _j !== void 0 ? _j : '') }) })] })] }), _jsxs(Flex, { className: "yourbondinfo-block row-pending", children: [_jsxs(Flex, { className: "yourbondinfo-block header", children: [_jsx(Flex, { className: "yourbondinfo-block header-title", children: "Pending" }), _jsx(Flex, { className: "yourbondinfo-block header-tooltip", children: _jsx(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: _jsx(Flex, { className: "block-header icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), _jsxs(Flex, { className: "yourbondinfo-block info", children: [_jsx(Flex, { className: "block-info icon", children: _jsxs("div", { className: "icon-container-small", children: [_jsx(Svg, { width: 10, height: 10, icon: (_k = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[userBill.bond.chainId]) !== null && _k !== void 0 ? _k : 'question' }), _jsx(TokenImage, { symbol: (_l = userBill.bond.showcaseTokenName) !== null && _l !== void 0 ? _l : userBill.bond.earnToken.symbol, size: 25 })] }) }), _jsxs(Flex, { className: "block-info text", children: [_jsx(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(totalPending(userBill).toFixed(4)), 4) }), _jsx(Text, { sx: { fontSize: ['10px', '10px', '10px', '12px'], fontWeight: [500, 500, 500, 400], paddingLeft: '10px' }, children: "($".concat((totalPending(userBill) * ((_m = parseFloat(earnTokenPrice(userBill.bond))) !== null && _m !== void 0 ? _m : 0)).toFixed(2), ")") })] })] })] }), _jsxs(Flex, { className: "yourbondinfo-block row-claimable", children: [_jsxs(Flex, { className: "yourbondinfo-block header", children: [_jsx(Flex, { className: "yourbondinfo-block header-title", children: "Claimable" }), _jsx(Flex, { className: "yourbondinfo-block header-tooltip", children: _jsx(TooltipBubble, { className: "tooltip-bubble", body: _jsx(Flex, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: _jsx(Flex, { className: "block-header icon", children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), _jsxs(Flex, { className: "yourbondinfo-block info", children: [_jsx(Flex, { className: "block-info icon", children: _jsxs("div", { className: "icon-container-small", children: [_jsx(Svg, { width: 10, height: 10, icon: (_o = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[userBill.bond.chainId]) !== null && _o !== void 0 ? _o : 'question' }), _jsx(TokenImage, { symbol: (_p = userBill.bond.showcaseTokenName) !== null && _p !== void 0 ? _p : userBill.bond.earnToken.symbol, size: 25 })] }) }), _jsxs(Flex, { className: "block-info text", children: [_jsx(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(claimable(userBill).toFixed(4)), 4) }), _jsx(Text, { sx: { fontSize: ['10px', '10px', '10px', '12px'], fontWeight: [500, 500, 500, 400], paddingLeft: '10px' }, children: "($".concat((claimable(userBill) * ((_q = parseFloat(earnTokenPrice(userBill.bond))) !== null && _q !== void 0 ? _q : 0)).toFixed(2), ")") })] })] })] })] }), _jsxs(Flex, { className: "yourbondinfo button-container", children: [_jsx(Flex, { className: "button-container claim", children: chainId !== (userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId) ?
|
|
163
|
-
_jsxs(Button, { className: "switch-button", disabled: claimable(userBill) === 0 || isPending, onClick: function (event) {
|
|
172
|
+
return (_jsxs(TraitsContentContainer, { children: [_jsx(Text, __assign({ sx: { fontSize: '10px', fontWeight: 500 } }, { children: attrib })), _jsx(Skeleton, { width: "150px" })] }, attrib));
|
|
173
|
+
}) })) }))) })] })), _jsxs(Flex, __assign({ className: "yourbondinfo-block row-vested" }, { children: [_jsxs(Flex, __assign({ className: "yourbondinfo-block header" }, { children: [_jsx(Flex, __assign({ className: "yourbondinfo-block header-title" }, { children: "Fully Vested" })), _jsx(Flex, __assign({ className: "yourbondinfo-block header-tooltip" }, { children: _jsx(TooltipBubble, __assign({ className: "tooltip-bubble", body: _jsx(Flex, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)" }, { children: _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) })) })) }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo-block info" }, { children: [_jsx(Flex, { className: "block-info icon" }), _jsx(Flex, __assign({ className: "block-info text" }, { children: _jsx(Text, __assign({ sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 } }, { children: getPendingVesting((_h = userBill.lastBlockTimestamp) !== null && _h !== void 0 ? _h : '', (_j = userBill.vesting) !== null && _j !== void 0 ? _j : '') })) }))] }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo-block row-pending" }, { children: [_jsxs(Flex, __assign({ className: "yourbondinfo-block header" }, { children: [_jsx(Flex, __assign({ className: "yourbondinfo-block header-title" }, { children: "Pending" })), _jsx(Flex, __assign({ className: "yourbondinfo-block header-tooltip" }, { children: _jsx(TooltipBubble, __assign({ className: "tooltip-bubble", body: _jsx(Flex, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)" }, { children: _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) })) })) }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo-block info" }, { children: [_jsx(Flex, __assign({ className: "block-info icon" }, { children: _jsxs("div", __assign({ className: "icon-container-small" }, { children: [_jsx(Svg, { width: 10, height: 10, icon: (_k = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[userBill.bond.chainId]) !== null && _k !== void 0 ? _k : 'question' }), _jsx(TokenImage, { symbol: (_l = userBill.bond.showcaseTokenName) !== null && _l !== void 0 ? _l : userBill.bond.earnToken.symbol, size: 25 })] })) })), _jsxs(Flex, __assign({ className: "block-info text" }, { children: [_jsx(Text, __assign({ sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 } }, { children: formatNumberSI(parseFloat(totalPending(userBill).toFixed(4)), 4) })), _jsx(Text, __assign({ sx: { fontSize: ['10px', '10px', '10px', '12px'], fontWeight: [500, 500, 500, 400], paddingLeft: '10px' } }, { children: "($".concat((totalPending(userBill) * ((_m = parseFloat(earnTokenPrice(userBill.bond))) !== null && _m !== void 0 ? _m : 0)).toFixed(2), ")") }))] }))] }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo-block row-claimable" }, { children: [_jsxs(Flex, __assign({ className: "yourbondinfo-block header" }, { children: [_jsx(Flex, __assign({ className: "yourbondinfo-block header-title" }, { children: "Claimable" })), _jsx(Flex, __assign({ className: "yourbondinfo-block header-tooltip" }, { children: _jsx(TooltipBubble, __assign({ className: "tooltip-bubble", body: _jsx(Flex, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)" }, { children: _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) })) })) }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo-block info" }, { children: [_jsx(Flex, __assign({ className: "block-info icon" }, { children: _jsxs("div", __assign({ className: "icon-container-small" }, { children: [_jsx(Svg, { width: 10, height: 10, icon: (_o = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[userBill.bond.chainId]) !== null && _o !== void 0 ? _o : 'question' }), _jsx(TokenImage, { symbol: (_p = userBill.bond.showcaseTokenName) !== null && _p !== void 0 ? _p : userBill.bond.earnToken.symbol, size: 25 })] })) })), _jsxs(Flex, __assign({ className: "block-info text" }, { children: [_jsx(Text, __assign({ sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 } }, { children: formatNumberSI(parseFloat(claimable(userBill).toFixed(4)), 4) })), _jsx(Text, __assign({ sx: { fontSize: ['10px', '10px', '10px', '12px'], fontWeight: [500, 500, 500, 400], paddingLeft: '10px' } }, { children: "($".concat((claimable(userBill) * ((_q = parseFloat(earnTokenPrice(userBill.bond))) !== null && _q !== void 0 ? _q : 0)).toFixed(2), ")") }))] }))] }))] }))] })), _jsxs(Flex, __assign({ className: "yourbondinfo button-container" }, { children: [_jsx(Flex, __assign({ className: "button-container claim" }, { children: chainId !== (userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId) ?
|
|
174
|
+
_jsxs(Button, __assign({ className: "switch-button", disabled: claimable(userBill) === 0 || isPending, onClick: function (event) {
|
|
164
175
|
event.stopPropagation();
|
|
165
176
|
switchChain({ chainId: userBill.bond.chainId });
|
|
166
|
-
}, children: ["Switch to ", NETWORK_LABEL[userBill.bond.chainId]] })
|
|
177
|
+
} }, { children: ["Switch to ", NETWORK_LABEL[userBill.bond.chainId]] }))
|
|
167
178
|
:
|
|
168
|
-
_jsx(Button, { className: "claim-button", disabled: claimable(userBill) === 0 || isPending, onClick: function (event) {
|
|
179
|
+
_jsx(Button, __assign({ className: "claim-button", disabled: claimable(userBill) === 0 || isPending, onClick: function (event) {
|
|
169
180
|
event.stopPropagation();
|
|
170
181
|
handleClaim(userBill.id, userBill.address);
|
|
171
|
-
}, children: "Claim" }) }), _jsx(Flex, { className: "button-container transfer", children: _jsx(Button, { className: "transfer-button", variant: "secondary", disabled: true, onClick: function () { window.open('https://ape.bond/swap', '_blank'); }, children: "TRANSFER" }) })] })] })] })] })) }) }, userBill.address) }));
|
|
182
|
+
} }, { children: "Claim" })) })), _jsx(Flex, __assign({ className: "button-container transfer" }, { children: _jsx(Button, __assign({ className: "transfer-button", variant: "secondary", disabled: true, onClick: function () { window.open('https://ape.bond/swap', '_blank'); } }, { children: "TRANSFER" })) }))] }))] }))] }))] }))) })) }, userBill.address) }));
|
|
172
183
|
};
|
|
173
184
|
export default YourBondsModal;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
13
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
14
|
if (ar || !(i in from)) {
|
|
@@ -34,7 +45,7 @@ var NetworkFilter = function (_a) {
|
|
|
34
45
|
}
|
|
35
46
|
setChainFilterOption(newChainFilterOption);
|
|
36
47
|
};
|
|
37
|
-
return (_jsxs(Flex, { sx: { width: '100%', position: 'relative' }, children: [_jsxs(Flex, { sx: {
|
|
48
|
+
return (_jsxs(Flex, __assign({ sx: { width: '100%', position: 'relative' } }, { children: [_jsxs(Flex, __assign({ sx: {
|
|
38
49
|
background: 'white2',
|
|
39
50
|
p: '6px',
|
|
40
51
|
borderRadius: 'normal',
|
|
@@ -42,7 +53,7 @@ var NetworkFilter = function (_a) {
|
|
|
42
53
|
alignItems: 'center',
|
|
43
54
|
width: '100%',
|
|
44
55
|
justifyContent: 'space-between',
|
|
45
|
-
}, onClick: function () { return setIsOpen(!isOpen); }, children: [_jsx(Text, { sx: { lineHeight: '22px', fontSize: '14px', fontWeight: 400, px: '10px' }, children: chainFilterOption.includes('All Chains') ? 'All Chains' : "Chains (".concat(chainFilterOption.length, ")") }), _jsx(Flex, { sx: { ml: '5px' }, children: _jsx(Svg, { icon: "caret", direction: isOpen ? 'up' : 'down' }) })] }), isOpen && (_jsx(Flex, { sx: {
|
|
56
|
+
}, onClick: function () { return setIsOpen(!isOpen); } }, { children: [_jsx(Text, __assign({ sx: { lineHeight: '22px', fontSize: '14px', fontWeight: 400, px: '10px' } }, { children: chainFilterOption.includes('All Chains') ? 'All Chains' : "Chains (".concat(chainFilterOption.length, ")") })), _jsx(Flex, __assign({ sx: { ml: '5px' } }, { children: _jsx(Svg, { icon: "caret", direction: isOpen ? 'up' : 'down' }) }))] })), isOpen && (_jsx(Flex, __assign({ sx: {
|
|
46
57
|
flexDirection: ['column', 'column', 'column'],
|
|
47
58
|
position: 'absolute',
|
|
48
59
|
top: '45px',
|
|
@@ -53,14 +64,14 @@ var NetworkFilter = function (_a) {
|
|
|
53
64
|
borderRadius: 'normal',
|
|
54
65
|
background: 'white2',
|
|
55
66
|
zIndex: 555,
|
|
56
|
-
}, children: __spreadArray(['All Chains'], MAINNET_CHAINS, true).map(function (chainId) {
|
|
57
|
-
return (_jsx(Flex, { sx: {
|
|
67
|
+
} }, { children: __spreadArray(['All Chains'], MAINNET_CHAINS, true).map(function (chainId) {
|
|
68
|
+
return (_jsx(Flex, __assign({ sx: {
|
|
58
69
|
borderRadius: 'normal',
|
|
59
70
|
p: '5px 15px',
|
|
60
71
|
minHeight: '40px',
|
|
61
72
|
cursor: 'pointer',
|
|
62
73
|
'&:hover': { bg: 'white3' },
|
|
63
|
-
}, onClick: function () { return handleCheckbox(chainId.toString()); }, children: _jsxs(Flex, { sx: { width: '100%', alignItems: 'center', fontSize: '14px' }, children: [_jsx(Checkbox, { checked: chainFilterOption.includes(chainId.toString()), onChange: function () { return null; } }), chainId === 'All Chains' ? (_jsxs(_Fragment, { children: [_jsx(Flex, { sx: { mx: '8px' }, children: _jsx(Svg, { icon: "AllChains", width: "22px" }) }), _jsx(Text, { sx: { lineHeight: '22px', fontWeight: 400 }, children: "All Chains" })] })) : (_jsxs(_Fragment, { children: [_jsx(Flex, { sx: { mx: '8px', borderRadius: '50px', overflow: 'hidden' }, children: _jsx(Svg, { icon: NETWORK_ICONS[chainId], width: "22px" }) }), _jsx(Text, { sx: { lineHeight: '22px', fontWeight: 400 }, children: NETWORK_LABEL[chainId] })] }))] }) }, chainId));
|
|
64
|
-
}) }))] }));
|
|
74
|
+
}, onClick: function () { return handleCheckbox(chainId.toString()); } }, { children: _jsxs(Flex, __assign({ sx: { width: '100%', alignItems: 'center', fontSize: '14px' } }, { children: [_jsx(Checkbox, { checked: chainFilterOption.includes(chainId.toString()), onChange: function () { return null; } }), chainId === 'All Chains' ? (_jsxs(_Fragment, { children: [_jsx(Flex, __assign({ sx: { mx: '8px' } }, { children: _jsx(Svg, { icon: "AllChains", width: "22px" }) })), _jsx(Text, __assign({ sx: { lineHeight: '22px', fontWeight: 400 } }, { children: "All Chains" }))] })) : (_jsxs(_Fragment, { children: [_jsx(Flex, __assign({ sx: { mx: '8px', borderRadius: '50px', overflow: 'hidden' } }, { children: _jsx(Svg, { icon: NETWORK_ICONS[chainId], width: "22px" }) })), _jsx(Text, __assign({ sx: { lineHeight: '22px', fontWeight: 400 } }, { children: NETWORK_LABEL[chainId] }))] }))] })) }), chainId));
|
|
75
|
+
}) })))] })));
|
|
65
76
|
};
|
|
66
77
|
export default NetworkFilter;
|