@ape.swap/bonds-sdk 1.0.778 → 1.0.779
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 +2 -13
- package/dist/components/BondRows/BondRow.d.ts +0 -1
- package/dist/components/BondRows/BondRow.js +2 -13
- package/dist/components/BondRows/BondRowHeader.js +1 -12
- package/dist/components/BondRows/BondRowsByChain.d.ts +2 -3
- package/dist/components/BondRows/BondRowsByChain.js +2 -13
- package/dist/components/BondRows/BondRowsWithTitle.d.ts +1 -2
- package/dist/components/BondRows/BondRowsWithTitle.js +2 -13
- package/dist/components/BondRows/ChainTitle.d.ts +1 -1
- package/dist/components/BondRows/ChainTitle.js +2 -13
- package/dist/components/MenuSelect/MenuSelect.d.ts +5 -1
- package/dist/components/MenuSelect/MenuSelect.js +1 -1
- package/dist/components/MenuSelect/RecommendationSelector.js +5 -16
- package/dist/components/NetworkFilter/index.js +6 -17
- package/dist/components/ProgressBar/ProgressBar.js +2 -13
- package/dist/components/ProgressBar/ProgressBarWrapper.js +1 -12
- package/dist/components/TokenInfoAndName/index.d.ts +1 -1
- package/dist/components/TokenInfoAndName/index.js +6 -17
- package/dist/components/Tooltip/ButtonsRow.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -12
- package/dist/components/uikit-sdk/Button/IconButton.js +1 -1
- package/dist/components/uikit-sdk/Checkbox/index.d.ts +0 -1
- package/dist/components/uikit-sdk/Checkbox/index.js +2 -2
- package/dist/components/uikit-sdk/Flex/index.d.ts +3 -1
- package/dist/components/uikit-sdk/Input/Input.d.ts +7 -2
- package/dist/components/uikit-sdk/Input/Input.js +5 -5
- package/dist/components/uikit-sdk/Input/NumericInput.d.ts +4 -5
- package/dist/components/uikit-sdk/Input/StyledInput.js +1 -12
- package/dist/components/uikit-sdk/Modal/ModalFooter.d.ts +4 -0
- package/dist/components/uikit-sdk/Modal/ModalFooter.js +21 -0
- package/dist/components/uikit-sdk/Modal/ModalHeader.d.ts +4 -0
- package/dist/components/uikit-sdk/Modal/ModalHeader.js +31 -0
- package/dist/components/uikit-sdk/Modal/index.d.ts +4 -0
- package/dist/components/uikit-sdk/Modal/index.js +46 -0
- package/dist/components/uikit-sdk/Modal/styles.d.ts +3 -0
- package/dist/components/uikit-sdk/Modal/styles.js +62 -0
- package/dist/components/uikit-sdk/Modal/types.d.ts +17 -0
- package/dist/components/uikit-sdk/Modal/types.js +1 -0
- package/dist/components/uikit-sdk/Select/Select.js +4 -4
- package/dist/components/uikit-sdk/Select/SelectItem.d.ts +0 -1
- package/dist/components/uikit-sdk/Select/SelectItem.js +1 -1
- package/dist/components/uikit-sdk/Svg/Icons/AbondFullLogo.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/AbondSmallLogo.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/AccountMonkey.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/AllChains.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/ApebondLogo.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/ApeswapSmallLogo.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Arrow.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Audit.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/BananaIcon.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/BillsM1.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/BillsM2.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/BillsM3.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Bridge.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Bubble.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Calculator.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Calendar.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Cancelled.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Card.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Caret.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Chain.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Chart.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Chat.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Close.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Cog.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/Icons/Cog.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Collapse.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Copy.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Discord.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/DiscordNew.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Docs.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/DocsV2.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Ellipse.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Error.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Expand.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Explorer.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/External.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Farm.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Fav.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/FilledURL.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Fire.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Frame.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/FullLogo.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Gnana.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/GreenShield.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/Icons/GreenShield.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Hamburger.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/HamburgerClosed.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Home.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Hot.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Info.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/InfoSolid.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Insight.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Instagram.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Island.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/LanguageIcon.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/LineChart.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/LiquidityIcon.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Logout.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Medium.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/MenuSettings.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Message.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Migrate.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Moon.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/More.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/NFA.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/NavCaret.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/PlaceholderMonkey.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/Icons/PlaceholderMonkey.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Play.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Pool.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Positions.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/ProfileDark.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/ProfileLight.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Question.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/QuestionCircle.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/QuestionFill.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Quiz.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Receipt.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Reddit.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Rocket.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/ScrollTop.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Search.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Send.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Settings.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Share.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Sort.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Success.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/SuccessOutline.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/SwapArrows.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/SwitchArrows.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/Icons/SwitchArrows.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Tag.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Telegram.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/TelegramNew.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/TextLogo.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/TickShield.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Trade.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Trash.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Twitter.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/URL.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Vaults.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Verified.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Wallet.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Warning.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Watch.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/Website.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/WebsiteNew.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/WhitepaperNew.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/XNew.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/YellowQuestionMark.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/ZapArrow.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/ZapIcon.js +1 -12
- package/dist/components/uikit-sdk/Svg/Icons/polygonNew.js +1 -12
- package/dist/components/uikit-sdk/Svg/index.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/tokens/ABOND.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/ARBITRUM.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/AVAX.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/BANANA.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/BASE.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/BNB.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/BSC.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/CELO.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/CRONOS.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/ETH.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/FANTOM.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/GNANA.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/GNOSIS.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/INEVM.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/IOTA.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/LIGHTLINK.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/LINEA.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/OKX.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/OPTIMISM.js +2 -13
- package/dist/components/uikit-sdk/Svg/tokens/POLYGON.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/POLYGONZK.js +1 -12
- package/dist/components/uikit-sdk/Svg/tokens/TLOS.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/BinanceChain.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/BinanceChain.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/Bitkeep.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/Bitkeep.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/Brave.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/Brave.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/Coinbase.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/Coinbase.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/MadWallet.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/MathWallet.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/MathWallet.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/Metamask.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/Metamask.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/Nabox.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/Nabox.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/OKX.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/OKX.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/OntoWallet.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/OntoWallet.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/SafePalWallet.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/SafePalWallet.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/SocialLogin.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/SocialLogin.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/TokenPocket.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/TokenPocket.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/TorusWallet.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/TorusWallet.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/TrustWallet.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/TrustWallet.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/Unstoppable.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/WalletConnect.d.ts +0 -1
- package/dist/components/uikit-sdk/Svg/walletIcons/WalletConnect.js +1 -12
- package/dist/components/uikit-sdk/Svg/walletIcons/WalletImage.js +1 -12
- package/dist/components/uikit-sdk/Tag/ListTag.js +1 -1
- package/dist/components/uikit-sdk/Tag/styles.d.ts +2 -3
- 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 +2 -13
- package/dist/components/uikit-sdk/TooltipBubble/index.js +1 -1
- package/dist/components/uikit-sdk/index.d.ts +1 -0
- package/dist/components/uikit-sdk/index.js +1 -0
- package/dist/config/abi/types/factories/Banana__factory.js +2 -1
- package/dist/config/abi/types/factories/BondNft__factory.js +2 -1
- package/dist/config/abi/types/factories/Bond__factory.js +2 -1
- package/dist/config/abi/types/factories/EnsPublicResolver__factory.js +2 -1
- package/dist/config/abi/types/factories/EnsRegistrar__factory.js +2 -1
- package/dist/config/abi/types/factories/Erc20__factory.js +2 -1
- package/dist/config/abi/types/factories/Erc20_bytes32__factory.js +2 -1
- package/dist/config/abi/types/factories/JungleChef__factory.js +2 -1
- package/dist/config/abi/types/factories/LaunchBonds__factory.js +2 -1
- package/dist/config/abi/types/factories/LensContract__factory.js +2 -1
- package/dist/config/abi/types/factories/LockVeAbond__factory.js +2 -1
- package/dist/config/abi/types/factories/MigrationBond__factory.js +2 -1
- package/dist/config/abi/types/factories/MigrationFveAbond__factory.js +2 -1
- package/dist/config/abi/types/factories/MiniComplexRewarder__factory.js +2 -1
- package/dist/config/abi/types/factories/Multicallv2__factory.js +2 -1
- package/dist/config/abi/types/factories/Multicallv3__factory.js +2 -1
- package/dist/config/abi/types/factories/NonFungibleApes__factory.js +2 -1
- package/dist/config/abi/types/factories/NonFungibleBananas__factory.js +2 -1
- package/dist/config/abi/types/factories/PriceGetterLinea__factory.js +2 -1
- package/dist/config/abi/types/factories/PriceGetterV2__factory.js +2 -1
- package/dist/config/abi/types/factories/PriceGetter__factory.js +2 -1
- package/dist/config/abi/types/factories/SousChef__factory.js +2 -1
- package/dist/config/abi/types/factories/Treasury__factory.js +2 -1
- package/dist/config/abi/types/factories/Weth__factory.js +2 -1
- package/dist/config/abi/types/factories/Zap__factory.js +2 -1
- package/dist/config/constants/addresses.js +4 -4
- package/dist/config/constants/api.d.ts +4 -4
- package/dist/config/constants/api.js +4 -4
- package/dist/config/constants/lists.d.ts +3 -3
- package/dist/contexts/Localization/Provider.js +3 -3
- package/dist/contexts/Localization/helpers.js +2 -2
- package/dist/contexts/ModalContext.js +3 -14
- package/dist/contexts/RefreshContext.js +3 -14
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/providers/index.d.ts +8 -0
- package/dist/providers/index.js +12 -0
- package/dist/scss/BondModal.scss +1 -1
- package/dist/theme/colors.js +2 -2
- package/dist/utils/index.js +2 -2
- package/dist/utils/multicall.js +2 -2
- package/dist/{components/Modals → views}/BondModal/BondModal.d.ts +2 -2
- package/dist/{components/Modals → views}/BondModal/BondModal.js +37 -36
- package/dist/{components/Modals → views}/BondModal/helper.d.ts +1 -1
- package/dist/{components/Modals → views}/BondModal/helper.js +1 -1
- package/dist/views/BondModal/index.d.ts +4 -0
- package/dist/views/BondModal/index.js +18 -0
- package/dist/{pages → views}/Bonds/Bonds.js +2 -13
- package/dist/{pages → views}/YourBonds/YourBonds.js +11 -22
- package/dist/{pages → views}/YourBonds/fetchBillsUser.js +7 -9
- package/dist/{pages → views}/YourBonds/getBillNftData.js +2 -2
- package/dist/{components/Modals → views}/YourBondsModal/YourBondsModal.d.ts +2 -2
- package/dist/views/YourBondsModal/YourBondsModal.js +173 -0
- package/dist/{components/Modals → views}/YourBondsModal/styles.js +1 -1
- package/package.json +1 -1
- package/dist/components/Modals/YourBondsModal/YourBondsModal.js +0 -184
- /package/dist/{pages → views}/Bonds/Bonds.d.ts +0 -0
- /package/dist/{pages → views}/YourBonds/YourBonds.d.ts +0 -0
- /package/dist/{pages → views}/YourBonds/fetchBillsUser.d.ts +0 -0
- /package/dist/{pages → views}/YourBonds/getBillNftData.d.ts +0 -0
- /package/dist/{components/Modals → views}/YourBondsModal/styles.d.ts +0 -0
|
@@ -1,184 +0,0 @@
|
|
|
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
|
-
};
|
|
12
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
-
function step(op) {
|
|
26
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
-
switch (op[0]) {
|
|
31
|
-
case 0: case 1: t = op; break;
|
|
32
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
-
default:
|
|
36
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
-
if (t[2]) _.ops.pop();
|
|
41
|
-
_.trys.pop(); continue;
|
|
42
|
-
}
|
|
43
|
-
op = body.call(thisArg, _);
|
|
44
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "theme-ui/jsx-runtime";
|
|
49
|
-
/** @jsxImportSource theme-ui */
|
|
50
|
-
import React, { useEffect, useState } from 'react';
|
|
51
|
-
import { Flex, Spinner } from 'theme-ui';
|
|
52
|
-
import { BigNumber } from 'bignumber.js';
|
|
53
|
-
import { AnimatePresence, motion } from 'framer-motion';
|
|
54
|
-
import { NETWORK_ICONS, NETWORK_LABEL } from '../../../config/constants/chains';
|
|
55
|
-
import { getBalanceNumber } from '../../../utils/getBalanceNumber';
|
|
56
|
-
import { getFirstNonZeroDigits } from '../../../utils/roundNumber';
|
|
57
|
-
import TokenImage from '../../uikit-sdk/TokenImage';
|
|
58
|
-
import { Button, ListTag, Skeleton, Svg, Text, TooltipBubble } from '../../uikit-sdk';
|
|
59
|
-
import { UserBillTooltipText } from '../../../enum/tooltips';
|
|
60
|
-
import { getPendingVesting } from '../../../hooks/usePendingVesting';
|
|
61
|
-
import { formatNumberSI } from '../../../utils/formatNumber';
|
|
62
|
-
import { StyledHeadingText, TraitsContentContainer } from './styles';
|
|
63
|
-
import '../../../scss/YourBondsModal.scss';
|
|
64
|
-
import { useChainId, useSwitchChain, useWaitForTransactionReceipt, useWriteContract } from 'wagmi';
|
|
65
|
-
import BOND_ABI from '../../../config/abi/bond.json';
|
|
66
|
-
var YourBondsModal = function (_a) {
|
|
67
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
68
|
-
var isOpen = _a.isOpen, onClose = _a.onClose, userBill = _a.userBill;
|
|
69
|
-
if (!isOpen)
|
|
70
|
-
return null;
|
|
71
|
-
var chainId = useChainId();
|
|
72
|
-
var _r = useSwitchChain(), chains = _r.chains, switchChain = _r.switchChain;
|
|
73
|
-
var _s = useWriteContract(), hash = _s.data, isPending = _s.isPending, writeContract = _s.writeContract, writeContractAsync = _s.writeContractAsync;
|
|
74
|
-
var _t = useWaitForTransactionReceipt({
|
|
75
|
-
confirmations: 4,
|
|
76
|
-
chainId: userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId,
|
|
77
|
-
hash: hash,
|
|
78
|
-
}), isConfirming = _t.isLoading, isConfirmed = _t.isSuccess;
|
|
79
|
-
var _u = useState(null), claimTx = _u[0], setClaimTx = _u[1];
|
|
80
|
-
var _v = useState(null), toastMessage = _v[0], setToastMessage = _v[1];
|
|
81
|
-
var handleClaim = function (billId, billAddress) { return __awaiter(void 0, void 0, void 0, function () {
|
|
82
|
-
var address, tx, error_1;
|
|
83
|
-
return __generator(this, function (_a) {
|
|
84
|
-
switch (_a.label) {
|
|
85
|
-
case 0:
|
|
86
|
-
address = billAddress;
|
|
87
|
-
_a.label = 1;
|
|
88
|
-
case 1:
|
|
89
|
-
_a.trys.push([1, 3, , 4]);
|
|
90
|
-
return [4 /*yield*/, writeContractAsync({
|
|
91
|
-
address: address,
|
|
92
|
-
abi: BOND_ABI,
|
|
93
|
-
functionName: 'redeem',
|
|
94
|
-
args: [billId],
|
|
95
|
-
})];
|
|
96
|
-
case 2:
|
|
97
|
-
tx = _a.sent();
|
|
98
|
-
if (tx) {
|
|
99
|
-
setClaimTx(tx);
|
|
100
|
-
}
|
|
101
|
-
return [3 /*break*/, 4];
|
|
102
|
-
case 3:
|
|
103
|
-
error_1 = _a.sent();
|
|
104
|
-
console.error('Approval failed:', error_1);
|
|
105
|
-
return [3 /*break*/, 4];
|
|
106
|
-
case 4: return [2 /*return*/];
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}); };
|
|
110
|
-
// Confirmation message
|
|
111
|
-
useEffect(function () {
|
|
112
|
-
if (isConfirmed) {
|
|
113
|
-
setToastMessage("Transaction Complete.");
|
|
114
|
-
setTimeout(function () { return setToastMessage(null); }, 10000);
|
|
115
|
-
}
|
|
116
|
-
}, [claimTx, isConfirmed]);
|
|
117
|
-
// Functions to calculate display values for modal
|
|
118
|
-
var totalPending = function (userBill) {
|
|
119
|
-
var _a, _b, _c, _d;
|
|
120
|
-
return getBalanceNumber(new BigNumber((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_d = (_c = (_b = userBill.bond.earnToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[chainId]) !== null && _d !== void 0 ? _d : 18);
|
|
121
|
-
};
|
|
122
|
-
var claimable = function (userBill) {
|
|
123
|
-
var _a, _b, _c;
|
|
124
|
-
return getBalanceNumber(new BigNumber(userBill.pendingRewards), (_c = (_b = (_a = userBill.bond.earnToken) === null || _a === void 0 ? void 0 : _a.decimals) === null || _b === void 0 ? void 0 : _b[chainId]) !== null && _c !== void 0 ? _c : 18);
|
|
125
|
-
};
|
|
126
|
-
var earnTokenPrice = function (bond) {
|
|
127
|
-
var _a;
|
|
128
|
-
return getFirstNonZeroDigits(parseFloat((_a = bond === null || bond === void 0 ? void 0 : bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0'));
|
|
129
|
-
};
|
|
130
|
-
var BILL_ATTRIBUTES = ['The Legend', 'The Location', 'The Moment', 'The Trend', 'The Innovation'];
|
|
131
|
-
var _w = useState(false), isOpenTraits = _w[0], setIsOpenTraits = _w[1];
|
|
132
|
-
var attributes = (_c = (_b = userBill.nftData) === null || _b === void 0 ? void 0 : _b.data.attributes) === null || _c === void 0 ? void 0 : _c.filter(function (attrib) { return BILL_ATTRIBUTES.includes(attrib.trait_type); });
|
|
133
|
-
var _x = useState(false), isImageLoaded = _x[0], setIsImageLoaded = _x[1];
|
|
134
|
-
var _y = useState(null), imageSrc = _y[0], setImageSrc = _y[1];
|
|
135
|
-
useEffect(function () {
|
|
136
|
-
var loadImage = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
137
|
-
var image_1, error_2;
|
|
138
|
-
var _a;
|
|
139
|
-
return __generator(this, function (_b) {
|
|
140
|
-
switch (_b.label) {
|
|
141
|
-
case 0:
|
|
142
|
-
_b.trys.push([0, 2, , 3]);
|
|
143
|
-
image_1 = new Image();
|
|
144
|
-
image_1.src = (_a = userBill.nftData) === null || _a === void 0 ? void 0 : _a.data.image;
|
|
145
|
-
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
|
146
|
-
image_1.onload = resolve;
|
|
147
|
-
image_1.onerror = reject;
|
|
148
|
-
})];
|
|
149
|
-
case 1:
|
|
150
|
-
_b.sent();
|
|
151
|
-
setImageSrc(image_1.src);
|
|
152
|
-
setIsImageLoaded(true);
|
|
153
|
-
return [3 /*break*/, 3];
|
|
154
|
-
case 2:
|
|
155
|
-
error_2 = _b.sent();
|
|
156
|
-
console.error('Error loading image:', error_2);
|
|
157
|
-
setIsImageLoaded(false);
|
|
158
|
-
return [3 /*break*/, 3];
|
|
159
|
-
case 3: return [2 /*return*/];
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
}); };
|
|
163
|
-
loadImage();
|
|
164
|
-
}, [userBill]);
|
|
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)); })
|
|
171
|
-
: BILL_ATTRIBUTES.map(function (attrib) {
|
|
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) {
|
|
175
|
-
event.stopPropagation();
|
|
176
|
-
switchChain({ chainId: userBill.bond.chainId });
|
|
177
|
-
} }, { children: ["Switch to ", NETWORK_LABEL[userBill.bond.chainId]] }))
|
|
178
|
-
:
|
|
179
|
-
_jsx(Button, __assign({ className: "claim-button", disabled: claimable(userBill) === 0 || isPending, onClick: function (event) {
|
|
180
|
-
event.stopPropagation();
|
|
181
|
-
handleClaim(userBill.id, 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) }));
|
|
183
|
-
};
|
|
184
|
-
export default YourBondsModal;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|