@ape.swap/bonds-sdk 1.0.780 → 1.1.0-seedify
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/BondRows/BondRow.d.ts +3 -2
- package/dist/components/BondRows/BondRowHeader.d.ts +2 -3
- package/dist/components/BondRows/BondRowsByChain.d.ts +3 -3
- package/dist/components/BondRows/BondRowsWithTitle.d.ts +3 -3
- package/dist/components/DisconnectedPlaceholder/index.d.ts +3 -0
- package/dist/components/SlippageModal/index.d.ts +3 -0
- package/dist/components/TokenInfoAndName/index.d.ts +2 -2
- package/dist/components/TokenSelectorPanel/index.d.ts +1 -2
- package/dist/components/uikit-sdk/Modal/index.d.ts +1 -1
- package/dist/components/uikit-sdk/Toggle/index.d.ts +8 -0
- package/dist/components/uikit-sdk/Toggle/styles.d.ts +3 -0
- package/dist/components/uikit-sdk/TokenImage/index.d.ts +1 -1
- package/dist/components/uikit-sdk/index.d.ts +1 -0
- package/dist/config/abi/types/Banana.d.ts +103 -126
- package/dist/config/abi/types/Bond.d.ts +176 -221
- package/dist/config/abi/types/BondNft.d.ts +160 -207
- package/dist/config/abi/types/EnsPublicResolver.d.ts +129 -205
- package/dist/config/abi/types/EnsRegistrar.d.ts +62 -82
- package/dist/config/abi/types/Erc20.d.ts +40 -52
- package/dist/config/abi/types/Erc20_bytes32.d.ts +11 -11
- package/dist/config/abi/types/JungleChef.d.ts +64 -79
- package/dist/config/abi/types/LaunchBonds.d.ts +299 -355
- package/dist/config/abi/types/LensContract.d.ts +58 -77
- package/dist/config/abi/types/LockVeAbond.d.ts +328 -434
- package/dist/config/abi/types/MigrationBond.d.ts +268 -330
- package/dist/config/abi/types/MigrationFveAbond.d.ts +83 -89
- package/dist/config/abi/types/MiniComplexRewarder.d.ts +99 -145
- package/dist/config/abi/types/Multicallv2.d.ts +35 -46
- package/dist/config/abi/types/Multicallv3.d.ts +14 -14
- package/dist/config/abi/types/NonFungibleApes.d.ts +130 -170
- package/dist/config/abi/types/NonFungibleBananas.d.ts +135 -172
- package/dist/config/abi/types/PriceGetter.d.ts +218 -255
- package/dist/config/abi/types/PriceGetterLinea.d.ts +254 -287
- package/dist/config/abi/types/PriceGetterV2.d.ts +239 -276
- package/dist/config/abi/types/SousChef.d.ts +140 -177
- package/dist/config/abi/types/Treasury.d.ts +66 -69
- package/dist/config/abi/types/Weth.d.ts +53 -68
- package/dist/config/abi/types/Zap.d.ts +97 -141
- package/dist/config/abi/types/common.d.ts +3 -3
- package/dist/config/abi/types/factories/Banana__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/BondNft__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/Bond__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/EnsPublicResolver__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/EnsRegistrar__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/Erc20__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/Erc20_bytes32__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/JungleChef__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/LaunchBonds__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/LensContract__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/LockVeAbond__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/MigrationBond__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/MigrationFveAbond__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/MiniComplexRewarder__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/Multicallv2__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/Multicallv3__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/NonFungibleApes__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/NonFungibleBananas__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/PriceGetterLinea__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/PriceGetterV2__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/PriceGetter__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/SousChef__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/Treasury__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/Weth__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/Zap__factory.d.ts +3 -3
- package/dist/config/abi/types/factories/index.d.ts +25 -25
- package/dist/config/abi/types/index.d.ts +51 -51
- package/dist/config/constants/addresses.d.ts +0 -8
- package/dist/config/constants/queryKeys.d.ts +7 -2
- package/dist/config/constants/tokens.d.ts +2 -2
- package/dist/hooks/useTokenFromZapList.d.ts +1 -1
- package/dist/hooks/useTopThreeTags.d.ts +2 -2
- package/dist/main.d.ts +7 -0
- package/dist/main.js +73492 -0
- package/dist/scss/BondMenu.scss +2 -2
- package/dist/scss/BondModal.scss +74 -73
- package/dist/scss/BondRow.scss +5 -5
- package/dist/scss/BondRowHeader.scss +7 -7
- package/dist/scss/Bonds.scss +2 -1
- package/dist/scss/YourBonds.scss +19 -14
- package/dist/scss/YourBondsModal.scss +3 -3
- package/dist/scss/index.scss +12 -0
- package/dist/state/allowance/useAllowance.d.ts +8 -4
- package/dist/state/bonds/useBondNFTData.d.ts +5 -0
- package/dist/state/bonds/useBondsData.d.ts +4 -0
- package/dist/state/bonds/useBondsList.d.ts +4 -0
- package/dist/state/bonds/useHotBonds.d.ts +3 -0
- package/dist/state/bonds/useUserBonds.d.ts +5 -0
- package/dist/state/price/useCurrencyPrice.d.ts +1 -17
- package/dist/state/slippage/useSlippage.d.ts +1 -0
- package/dist/state/tokenPrices/useTokenPrices.d.ts +29 -0
- package/dist/state/zap/getChainParam.d.ts +1 -1
- package/dist/state/zap/useSoulZapBondQuote.d.ts +2 -2
- package/dist/types/bonds.d.ts +4 -41
- package/dist/types/yourbonds.d.ts +54 -69
- package/dist/utils/displayHelpers.d.ts +13 -0
- package/dist/utils/getNativeTicker.d.ts +3 -3
- package/dist/utils/index.d.ts +1 -1
- package/dist/views/BondModal/BondModal.d.ts +4 -7
- package/dist/views/BondModal/helper.d.ts +6 -6
- package/dist/views/BondModal/index.d.ts +2 -2
- package/dist/views/Bonds/Bonds.d.ts +6 -9
- package/dist/views/Bonds/components/CheckURL/index.d.ts +4 -0
- package/dist/views/Bonds/index.d.ts +2 -2
- package/dist/views/Bonds/utils.d.ts +14 -0
- package/dist/views/FullBondsView/FullBondsView.d.ts +7 -0
- package/dist/views/FullBondsView/index.d.ts +3 -0
- package/dist/views/YourBonds/YourBonds.d.ts +1 -11
- package/dist/views/YourBonds/components/UserBondRow/index.d.ts +6 -0
- package/dist/views/YourBonds/fetchBillsUser.d.ts +4 -5
- package/dist/views/YourBonds/index.d.ts +3 -0
- package/dist/views/YourBondsModal/YourBondsModal.d.ts +4 -5
- package/package.json +19 -24
- package/dist/components/AccordionText/index.js +0 -17
- package/dist/components/BondMenu/BondMenu.js +0 -40
- package/dist/components/BondMenu/useChainFilterOption.js +0 -30
- package/dist/components/BondRows/BondRow.js +0 -81
- package/dist/components/BondRows/BondRowHeader.js +0 -12
- package/dist/components/BondRows/BondRowsByChain.js +0 -13
- package/dist/components/BondRows/BondRowsWithTitle.js +0 -20
- package/dist/components/BondRows/ChainTitle.js +0 -18
- package/dist/components/MenuSelect/MenuSelect.js +0 -36
- package/dist/components/MenuSelect/RecommendationSelector.js +0 -32
- package/dist/components/MenuSelect/types.js +0 -1
- package/dist/components/NetworkFilter/index.js +0 -66
- package/dist/components/ProgressBar/ProgressBar.js +0 -10
- package/dist/components/ProgressBar/ProgressBarWrapper.js +0 -9
- package/dist/components/ProgressBar/styles.js +0 -82
- package/dist/components/TokenInfoAndName/index.js +0 -34
- package/dist/components/TokenSelectorModal/TokenRow.js +0 -18
- package/dist/components/TokenSelectorModal/index.js +0 -56
- package/dist/components/TokenSelectorPanel/index.js +0 -36
- package/dist/components/Tooltip/ButtonsRow.js +0 -21
- package/dist/components/Tooltip/Tooltip.js +0 -13
- package/dist/components/Tooltip/styles.js +0 -44
- package/dist/components/uikit-sdk/Button/Button.js +0 -91
- package/dist/components/uikit-sdk/Button/IconButton.js +0 -33
- package/dist/components/uikit-sdk/Button/index.js +0 -2
- package/dist/components/uikit-sdk/Button/styles.js +0 -30
- package/dist/components/uikit-sdk/Button/types.js +0 -37
- package/dist/components/uikit-sdk/Checkbox/index.js +0 -46
- package/dist/components/uikit-sdk/Checkbox/types.js +0 -5
- package/dist/components/uikit-sdk/Flex/index.js +0 -29
- package/dist/components/uikit-sdk/Input/Input.js +0 -72
- package/dist/components/uikit-sdk/Input/NumericInput.js +0 -35
- package/dist/components/uikit-sdk/Input/StyledInput.js +0 -26
- package/dist/components/uikit-sdk/Input/index.js +0 -3
- package/dist/components/uikit-sdk/Modal/ModalFooter.js +0 -21
- package/dist/components/uikit-sdk/Modal/ModalHeader.js +0 -31
- package/dist/components/uikit-sdk/Modal/index.js +0 -46
- package/dist/components/uikit-sdk/Modal/styles.js +0 -62
- package/dist/components/uikit-sdk/Modal/types.js +0 -1
- package/dist/components/uikit-sdk/Select/Select.js +0 -61
- package/dist/components/uikit-sdk/Select/SelectItem.js +0 -40
- package/dist/components/uikit-sdk/Select/index.js +0 -2
- package/dist/components/uikit-sdk/Select/styles.js +0 -50
- package/dist/components/uikit-sdk/Select/types.js +0 -37
- package/dist/components/uikit-sdk/Skeleton/index.js +0 -31
- package/dist/components/uikit-sdk/Skeleton/styles.js +0 -40
- package/dist/components/uikit-sdk/Skeleton/types.js +0 -10
- package/dist/components/uikit-sdk/Svg/Icons/AbondFullLogo.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/AbondSmallLogo.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/AccountMonkey.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/AllChains.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/ApebondLogo.js +0 -17
- package/dist/components/uikit-sdk/Svg/Icons/ApeswapSmallLogo.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/Arrow.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Audit.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/BananaIcon.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/BillsM1.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/BillsM2.js +0 -17
- package/dist/components/uikit-sdk/Svg/Icons/BillsM3.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Bridge.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Bubble.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Calculator.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Calendar.js +0 -5
- package/dist/components/uikit-sdk/Svg/Icons/Cancelled.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Card.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Caret.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Chain.js +0 -9
- package/dist/components/uikit-sdk/Svg/Icons/Chart.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Chat.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Close.js +0 -9
- package/dist/components/uikit-sdk/Svg/Icons/Cog.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Collapse.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Copy.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Discord.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/DiscordNew.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Docs.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/DocsV2.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Ellipse.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Error.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Expand.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Explorer.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/External.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Farm.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Fav.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/FilledURL.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Fire.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/Frame.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/FullLogo.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/Gnana.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/GreenShield.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/Hamburger.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/HamburgerClosed.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Home.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Hot.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/Info.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/InfoSolid.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Insight.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Instagram.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Island.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Language.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/LanguageIcon.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/LineChart.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/LiquidityIcon.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Logout.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Medium.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/MenuSettings.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Message.js +0 -9
- package/dist/components/uikit-sdk/Svg/Icons/Migrate.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Moon.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/More.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/NFA.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/NavCaret.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/PlaceholderMonkey.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Play.js +0 -5
- package/dist/components/uikit-sdk/Svg/Icons/Pool.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Positions.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/ProfileDark.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/ProfileIcon.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/ProfileLight.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/Question.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/QuestionCircle.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/QuestionFill.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Quiz.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Receipt.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Reddit.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Rocket.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/ScrollTop.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Search.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Send.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Settings.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Share.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Sort.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Success.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/SuccessOutline.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/SwapArrows.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/SwitchArrows.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Tag.js +0 -5
- package/dist/components/uikit-sdk/Svg/Icons/Telegram.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/TelegramNew.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/TextLogo.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/TickShield.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Trade.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Trash.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Twitter.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/URL.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Vaults.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Verified.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/Wallet.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Warning.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Watch.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/Website.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/WebsiteNew.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/WhitepaperNew.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/XNew.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/YellowQuestionMark.js +0 -6
- package/dist/components/uikit-sdk/Svg/Icons/ZapArrow.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/ZapIcon.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/index.js +0 -112
- package/dist/components/uikit-sdk/Svg/Icons/polygonNew.js +0 -16
- package/dist/components/uikit-sdk/Svg/Icons/types.js +0 -1
- package/dist/components/uikit-sdk/Svg/index.js +0 -347
- package/dist/components/uikit-sdk/Svg/styles.js +0 -16
- package/dist/components/uikit-sdk/Svg/tokens/ABOND.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/ARBITRUM.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/AVAX.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/BANANA.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/BASE.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/BNB.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/BSC.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/CELO.js +0 -5
- package/dist/components/uikit-sdk/Svg/tokens/CRONOS.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/ETH.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/FANTOM.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/GNANA.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/GNOSIS.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/INEVM.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/IOTA.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/LIGHTLINK.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/LINEA.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/OKX.js +0 -5
- package/dist/components/uikit-sdk/Svg/tokens/OPTIMISM.js +0 -8
- package/dist/components/uikit-sdk/Svg/tokens/POLYGON.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/POLYGONZK.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/TLOS.js +0 -6
- package/dist/components/uikit-sdk/Svg/tokens/index.js +0 -22
- package/dist/components/uikit-sdk/Svg/types.js +0 -165
- package/dist/components/uikit-sdk/Svg/walletIcons/BinanceChain.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/Bitkeep.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/Brave.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/Coinbase.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/MadWallet.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/MathWallet.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/Metamask.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/Nabox.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/OKX.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/OntoWallet.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/SafePalWallet.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/SocialLogin.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/TokenPocket.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/TorusWallet.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/TrustWallet.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/Unstoppable.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/WalletConnect.js +0 -6
- package/dist/components/uikit-sdk/Svg/walletIcons/WalletImage.js +0 -5
- package/dist/components/uikit-sdk/Svg/walletIcons/index.js +0 -18
- package/dist/components/uikit-sdk/Tag/ListTag.js +0 -20
- package/dist/components/uikit-sdk/Tag/Tag.js +0 -42
- package/dist/components/uikit-sdk/Tag/index.js +0 -2
- package/dist/components/uikit-sdk/Tag/styles.js +0 -44
- package/dist/components/uikit-sdk/Tag/types.js +0 -34
- package/dist/components/uikit-sdk/Text/index.js +0 -35
- package/dist/components/uikit-sdk/Text/types.js +0 -13
- package/dist/components/uikit-sdk/TokenImage/index.js +0 -41
- package/dist/components/uikit-sdk/TooltipBubble/index.js +0 -66
- package/dist/components/uikit-sdk/TooltipBubble/styles.js +0 -60
- package/dist/components/uikit-sdk/TooltipBubble/types.js +0 -8
- package/dist/components/uikit-sdk/index.js +0 -12
- package/dist/config/abi/bond.json +0 -450
- package/dist/config/abi/erc20.json +0 -117
- package/dist/config/abi/multicallv2.json +0 -143
- package/dist/config/abi/price-getter-linea.json +0 -1448
- package/dist/config/abi/price-getter.json +0 -1309
- package/dist/config/abi/types/Banana.js +0 -1
- package/dist/config/abi/types/Bond.js +0 -1
- package/dist/config/abi/types/BondNft.js +0 -1
- package/dist/config/abi/types/EnsPublicResolver.js +0 -1
- package/dist/config/abi/types/EnsRegistrar.js +0 -1
- package/dist/config/abi/types/Erc20.js +0 -1
- package/dist/config/abi/types/Erc20_bytes32.js +0 -1
- package/dist/config/abi/types/JungleChef.js +0 -1
- package/dist/config/abi/types/LaunchBonds.js +0 -1
- package/dist/config/abi/types/LensContract.js +0 -1
- package/dist/config/abi/types/LockVeAbond.js +0 -1
- package/dist/config/abi/types/MigrationBond.js +0 -1
- package/dist/config/abi/types/MigrationFveAbond.js +0 -1
- package/dist/config/abi/types/MiniComplexRewarder.js +0 -1
- package/dist/config/abi/types/Multicallv2.js +0 -1
- package/dist/config/abi/types/Multicallv3.js +0 -1
- package/dist/config/abi/types/NonFungibleApes.js +0 -1
- package/dist/config/abi/types/NonFungibleBananas.js +0 -1
- package/dist/config/abi/types/PriceGetter.js +0 -1
- package/dist/config/abi/types/PriceGetterLinea.js +0 -1
- package/dist/config/abi/types/PriceGetterV2.js +0 -1
- package/dist/config/abi/types/SousChef.js +0 -1
- package/dist/config/abi/types/Treasury.js +0 -1
- package/dist/config/abi/types/Weth.js +0 -1
- package/dist/config/abi/types/Zap.js +0 -1
- package/dist/config/abi/types/common.js +0 -1
- package/dist/config/abi/types/factories/Banana__factory.js +0 -628
- package/dist/config/abi/types/factories/BondNft__factory.js +0 -951
- package/dist/config/abi/types/factories/Bond__factory.js +0 -1042
- package/dist/config/abi/types/factories/EnsPublicResolver__factory.js +0 -833
- package/dist/config/abi/types/factories/EnsRegistrar__factory.js +0 -439
- package/dist/config/abi/types/factories/Erc20__factory.js +0 -239
- package/dist/config/abi/types/factories/Erc20_bytes32__factory.js +0 -47
- package/dist/config/abi/types/factories/JungleChef__factory.js +0 -326
- package/dist/config/abi/types/factories/LaunchBonds__factory.js +0 -2031
- package/dist/config/abi/types/factories/LensContract__factory.js +0 -338
- package/dist/config/abi/types/factories/LockVeAbond__factory.js +0 -2215
- package/dist/config/abi/types/factories/MigrationBond__factory.js +0 -1656
- package/dist/config/abi/types/factories/MigrationFveAbond__factory.js +0 -346
- package/dist/config/abi/types/factories/MiniComplexRewarder__factory.js +0 -586
- package/dist/config/abi/types/factories/Multicallv2__factory.js +0 -160
- package/dist/config/abi/types/factories/Multicallv3__factory.js +0 -109
- package/dist/config/abi/types/factories/NonFungibleApes__factory.js +0 -810
- package/dist/config/abi/types/factories/NonFungibleBananas__factory.js +0 -756
- package/dist/config/abi/types/factories/PriceGetterLinea__factory.js +0 -1465
- package/dist/config/abi/types/factories/PriceGetterV2__factory.js +0 -1364
- package/dist/config/abi/types/factories/PriceGetter__factory.js +0 -1326
- package/dist/config/abi/types/factories/SousChef__factory.js +0 -666
- package/dist/config/abi/types/factories/Treasury__factory.js +0 -309
- package/dist/config/abi/types/factories/Weth__factory.js +0 -296
- package/dist/config/abi/types/factories/Zap__factory.js +0 -889
- package/dist/config/abi/types/factories/index.js +0 -28
- package/dist/config/abi/types/index.js +0 -26
- package/dist/config/constants/addresses.js +0 -116
- package/dist/config/constants/api.js +0 -6
- package/dist/config/constants/chains.js +0 -436
- package/dist/config/constants/lifiRouting.js +0 -6
- package/dist/config/constants/lists.js +0 -21
- package/dist/config/constants/meta.js +0 -92
- package/dist/config/constants/misc.js +0 -4
- package/dist/config/constants/networks.js +0 -44
- package/dist/config/constants/products.js +0 -58
- package/dist/config/constants/queryKeys.js +0 -47
- package/dist/config/constants/tokens.js +0 -64
- package/dist/config/constants/tutorials.js +0 -80
- package/dist/config/constants/zapInputTokens.js +0 -356
- package/dist/config/localization/languages.js +0 -83
- package/dist/config/localization/translations.json +0 -918
- package/dist/contexts/Localization/Provider.js +0 -134
- package/dist/contexts/Localization/helpers.js +0 -63
- package/dist/contexts/Localization/index.js +0 -2
- package/dist/contexts/Localization/types.js +0 -1
- package/dist/contexts/Localization/useTranslation.js +0 -10
- package/dist/contexts/ModalContext.js +0 -67
- package/dist/contexts/RefreshContext.js +0 -78
- package/dist/enum/apeswaplists.d.ts +0 -418
- package/dist/enum/apeswaplists.js +0 -152
- package/dist/enum/tooltips.js +0 -13
- package/dist/hooks/useCookie.js +0 -29
- package/dist/hooks/useIsAbond.js +0 -10
- package/dist/hooks/useModal.js +0 -39
- package/dist/hooks/usePendingVesting.js +0 -13
- package/dist/hooks/useRefresh.js +0 -7
- package/dist/hooks/useTimer.js +0 -13
- package/dist/hooks/useTokenFromZapList.js +0 -10
- package/dist/hooks/useTopThreeTags.js +0 -25
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -6
- package/dist/providers/index.js +0 -18
- package/dist/state/allowance/useAllowance.js +0 -148
- package/dist/state/balance/useCurrencyBalance.js +0 -80
- package/dist/state/price/useCurrencyPrice.js +0 -397
- package/dist/state/zap/getChainParam.js +0 -34
- package/dist/state/zap/useSoulZapBondQuote.js +0 -177
- package/dist/state/zap/useSoulZapTokenQuote.js +0 -167
- package/dist/theme/base.js +0 -123
- package/dist/theme/colors.js +0 -93
- package/dist/theme/components.js +0 -338
- package/dist/theme/display.js +0 -2
- package/dist/theme/index.js +0 -15
- package/dist/theme/types.js +0 -1
- package/dist/types/bonds.js +0 -1
- package/dist/types/yourbonds.js +0 -1
- package/dist/utils/convertToTokenValue.js +0 -24
- package/dist/utils/formatNumber.js +0 -34
- package/dist/utils/formatNumbers.js +0 -148
- package/dist/utils/getBalanceNumber.js +0 -18
- package/dist/utils/getNativeTicker.js +0 -8
- package/dist/utils/getTimePeriods.js +0 -44
- package/dist/utils/index.js +0 -127
- package/dist/utils/localStorageHelpers.js +0 -47
- package/dist/utils/multicall.js +0 -90
- package/dist/utils/numbers.js +0 -111
- package/dist/utils/roundNumber.js +0 -14
- package/dist/utils/track.js +0 -17
- package/dist/views/BondModal/BondModal.js +0 -300
- package/dist/views/BondModal/helper.js +0 -54
- package/dist/views/BondModal/index.js +0 -18
- package/dist/views/Bonds/Bonds.js +0 -174
- package/dist/views/Bonds/index.js +0 -18
- package/dist/views/YourBonds/YourBonds.js +0 -276
- package/dist/views/YourBonds/fetchBillsUser.js +0 -235
- package/dist/views/YourBonds/getBillNftData.js +0 -109
- package/dist/views/YourBondsModal/YourBondsModal.js +0 -173
- package/dist/views/YourBondsModal/styles.js +0 -12
- package/dist/views/ZapModal/index.js +0 -150
- package/dist/views/ZapModal/styles.js +0 -35
- /package/dist/{enum → config/constants}/tooltips.d.ts +0 -0
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BondsData } from './bonds';
|
|
2
|
+
import { ChainId } from '@ape.swap/apeswap-lists';
|
|
3
3
|
export interface UserOwnedBillsData {
|
|
4
4
|
index: number;
|
|
5
5
|
userOwnedBills: UserBill[];
|
|
6
6
|
}
|
|
7
|
-
export interface ownedBillsWithNftData {
|
|
8
|
-
index: number;
|
|
9
|
-
userOwnedBillsNfts: any[];
|
|
10
|
-
}
|
|
11
7
|
export interface UserBill {
|
|
12
8
|
address: string;
|
|
13
9
|
id: string;
|
|
@@ -18,76 +14,65 @@ export interface UserBill {
|
|
|
18
14
|
lastBlockTimestamp: string;
|
|
19
15
|
pendingRewards: string;
|
|
20
16
|
billNftAddress: string;
|
|
21
|
-
|
|
22
|
-
bond: BondsDataResponse;
|
|
17
|
+
bond: BondsData;
|
|
23
18
|
}
|
|
24
19
|
export interface UserBillNftData {
|
|
25
20
|
id: number;
|
|
21
|
+
tokenId: number;
|
|
22
|
+
attributes: {
|
|
23
|
+
trait_type: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}[];
|
|
26
|
+
chainId: ChainId;
|
|
27
|
+
contractAddress: string;
|
|
28
|
+
description: string;
|
|
29
|
+
image: string;
|
|
30
|
+
name: string;
|
|
26
31
|
data: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
name: string;
|
|
51
|
-
symbol: string;
|
|
52
|
-
decimals: {
|
|
53
|
-
[chainId: number]: number;
|
|
54
|
-
};
|
|
32
|
+
billContract: string;
|
|
33
|
+
billNftAddress: string;
|
|
34
|
+
billNftId: number;
|
|
35
|
+
blockNumber: number;
|
|
36
|
+
bondArtCollection: string;
|
|
37
|
+
bondPartner: string;
|
|
38
|
+
bondVersion: string;
|
|
39
|
+
chainId: ChainId;
|
|
40
|
+
createTransactionHash: string;
|
|
41
|
+
createdAddressOwner: string;
|
|
42
|
+
createdAt: number;
|
|
43
|
+
deposit: number;
|
|
44
|
+
dollarValue: number;
|
|
45
|
+
expires: number;
|
|
46
|
+
pairName: string;
|
|
47
|
+
payout: number;
|
|
48
|
+
payoutToken: string;
|
|
49
|
+
payoutTokenData: {
|
|
50
|
+
address: string;
|
|
51
|
+
name: string;
|
|
52
|
+
symbol: string;
|
|
53
|
+
decimals: {
|
|
54
|
+
[chainId: number]: number;
|
|
55
55
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
};
|
|
57
|
+
payoutTokenPrice: string;
|
|
58
|
+
principalToken: string;
|
|
59
|
+
token0: {
|
|
60
|
+
address: string;
|
|
61
|
+
symbol: string;
|
|
62
|
+
name: string;
|
|
63
|
+
decimals: {
|
|
64
|
+
[chainId: number]: number;
|
|
63
65
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
};
|
|
67
|
+
token1: {
|
|
68
|
+
address: string;
|
|
69
|
+
symbol: string;
|
|
70
|
+
name: string;
|
|
71
|
+
decimals: {
|
|
72
|
+
[chainId: number]: number;
|
|
71
73
|
};
|
|
72
|
-
dollarValue: number;
|
|
73
|
-
chainId: ChainId;
|
|
74
|
-
blockNumber: number;
|
|
75
|
-
bondArtCollection: string;
|
|
76
|
-
bondPartner: string;
|
|
77
|
-
bondVersion: string;
|
|
78
|
-
createdAddressOwner: string;
|
|
79
|
-
createdAt: number;
|
|
80
|
-
payoutTokenPrice: string;
|
|
81
74
|
};
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
type: string;
|
|
76
|
+
vestingPeriodSeconds: number;
|
|
84
77
|
};
|
|
85
78
|
}
|
|
86
|
-
export interface UserBillNft {
|
|
87
|
-
image: string;
|
|
88
|
-
tokenId: string;
|
|
89
|
-
attributes: {
|
|
90
|
-
trait_type: string;
|
|
91
|
-
value: string;
|
|
92
|
-
}[];
|
|
93
|
-
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UserBill } from '../types/yourbonds';
|
|
2
|
+
import { BondsData } from '../types/bonds';
|
|
3
|
+
export declare const claimable: (userBill: UserBill) => number;
|
|
4
|
+
export declare const earnTokenPrice: (bond: BondsData) => string;
|
|
5
|
+
export declare const totalPending: (userBill: UserBill) => number;
|
|
6
|
+
export declare const vestingTimeRemaining: (userBill: UserBill) => {
|
|
7
|
+
years: number;
|
|
8
|
+
months: number;
|
|
9
|
+
days: number;
|
|
10
|
+
hours: number;
|
|
11
|
+
minutes: number;
|
|
12
|
+
seconds: number;
|
|
13
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ChainId } from
|
|
2
|
-
declare const getNativeTicker: (chain?: ChainId) => string | undefined;
|
|
3
|
-
export
|
|
1
|
+
import { ChainId, Token } from '@ape.swap/apeswap-lists';
|
|
2
|
+
export declare const getNativeTicker: (chain?: ChainId) => string | undefined;
|
|
3
|
+
export declare const getTokenSymbol: (token: Token) => string;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -13,4 +13,4 @@ export declare function getEtherscanLink(data: string | number, type: 'transacti
|
|
|
13
13
|
* @param tokenImage
|
|
14
14
|
* @returns {boolean} true if the token has been added, false otherwise
|
|
15
15
|
*/
|
|
16
|
-
export declare const registerToken: (tokenAddress: string, tokenSymbol: string | undefined, tokenDecimals: number, tokenImage: string | undefined) => Promise<
|
|
16
|
+
export declare const registerToken: (tokenAddress: string, tokenSymbol: string | undefined, tokenDecimals: number, tokenImage: string | undefined) => Promise<void | null>;
|
|
@@ -2,16 +2,13 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import '../../scss/BondModal.scss';
|
|
4
4
|
export interface BondModalProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
bondAddress: string | null;
|
|
10
|
-
accountChainId: number;
|
|
5
|
+
onDismiss?: () => void;
|
|
6
|
+
bondAddress?: string;
|
|
7
|
+
bondChain?: number;
|
|
8
|
+
variant?: 'standard' | 'alt';
|
|
11
9
|
accordionTitle?: string;
|
|
12
10
|
accordionBody?: string;
|
|
13
11
|
accordionVisible?: boolean;
|
|
14
|
-
style?: string;
|
|
15
12
|
}
|
|
16
13
|
declare const BondModal: React.FC<BondModalProps>;
|
|
17
14
|
export default BondModal;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BondsData } from '../../types/bonds';
|
|
2
2
|
declare function formatNumber(input: string): string;
|
|
3
3
|
declare function formatUSDNumber(input: string): string;
|
|
4
4
|
declare const youSpend: (inputValue: string) => string;
|
|
5
|
-
declare const youSpendUSD: (bond:
|
|
6
|
-
declare const youGet: (bond:
|
|
7
|
-
declare const youGetUSD: (bond:
|
|
8
|
-
declare const premium: (bond:
|
|
9
|
-
declare const getPremiumColor: (bond:
|
|
5
|
+
declare const youSpendUSD: (bond: BondsData, inputValue: string) => string;
|
|
6
|
+
declare const youGet: (bond: BondsData, inputValue: string) => number;
|
|
7
|
+
declare const youGetUSD: (bond: BondsData, inputValue: string) => string;
|
|
8
|
+
declare const premium: (bond: BondsData, inputValue: string) => string;
|
|
9
|
+
declare const getPremiumColor: (bond: BondsData, inputValue: string) => string;
|
|
10
10
|
export { formatNumber, formatUSDNumber, youSpend, youSpendUSD, youGet, youGetUSD, premium, getPremiumColor };
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
/** @jsxImportSource theme-ui */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import '../../scss/Bonds.scss';
|
|
4
|
-
declare global {
|
|
5
|
-
interface Window {
|
|
6
|
-
ethereum?: any;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
4
|
export interface BondsProps {
|
|
10
|
-
account: string;
|
|
11
|
-
accountChainId: number;
|
|
12
|
-
isActive: boolean;
|
|
13
|
-
bondAddress: string | null;
|
|
14
5
|
chains?: number[];
|
|
15
6
|
}
|
|
7
|
+
type SortableKeys = 'discount' | 'arr' | 'terms' | 'tokensRemaining';
|
|
8
|
+
type SortDirection = 'asc' | 'desc';
|
|
9
|
+
export interface SortOptions {
|
|
10
|
+
key: SortableKeys;
|
|
11
|
+
direction: SortDirection;
|
|
12
|
+
}
|
|
16
13
|
declare const Bonds: React.FC<BondsProps>;
|
|
17
14
|
export default Bonds;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BondsData } from '../../types/bonds';
|
|
2
|
+
import { SortOptions } from './Bonds';
|
|
3
|
+
export declare const isBondSoldOut: (bill: BondsData) => boolean;
|
|
4
|
+
export declare const sortBonds: (sortConfig?: SortOptions, bonds?: BondsData[]) => BondsData[];
|
|
5
|
+
export declare const calculateARR: (bond: BondsData) => number;
|
|
6
|
+
export declare const vestingTime: (vestingTerm: number) => {
|
|
7
|
+
years: number;
|
|
8
|
+
months: number;
|
|
9
|
+
days: number;
|
|
10
|
+
hours: number;
|
|
11
|
+
minutes: number;
|
|
12
|
+
seconds: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const remainingPercentage: (bond: BondsData) => number;
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
/** @jsxImportSource theme-ui */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import '../../scss/YourBonds.scss';
|
|
4
|
-
declare
|
|
5
|
-
interface Window {
|
|
6
|
-
ethereum?: any;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
interface YourBondsProps {
|
|
10
|
-
account: string;
|
|
11
|
-
accountChainId: number;
|
|
12
|
-
isActive: boolean;
|
|
13
|
-
}
|
|
14
|
-
declare const YourBonds: React.FC<YourBondsProps>;
|
|
4
|
+
declare const YourBonds: () => React.JSX.Element;
|
|
15
5
|
export default YourBonds;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ChainId } from '../../enum/apeswaplists';
|
|
2
1
|
import { UserBill, UserOwnedBillsData } from '../../types/yourbonds';
|
|
3
|
-
import {
|
|
2
|
+
import { BillsConfig, ChainId } from '@ape.swap/apeswap-lists';
|
|
4
3
|
/**
|
|
5
4
|
* Fetches user-owned bill NFT data for a given set of owned bills data, chain ID, and bills.
|
|
6
5
|
* @param ownedBillsData An array of objects containing the ID, bill NFT address, and contract address of the owned bills.
|
|
@@ -12,6 +11,6 @@ export declare const fetchUserOwnedBillNftData: (ownedBillsData: {
|
|
|
12
11
|
id: string;
|
|
13
12
|
billNftAddress: string;
|
|
14
13
|
contractAddress: string;
|
|
15
|
-
}[], chainId: ChainId, bills:
|
|
16
|
-
export declare const fetchUserOwnedBillsDataAsync: (chainId: ChainId, account: string, bondData:
|
|
17
|
-
export declare const fetchUserOwnedBills: (chainId: ChainId, account: string, bonds:
|
|
14
|
+
}[], chainId: ChainId, bills: BillsConfig[]) => Promise<any[]>;
|
|
15
|
+
export declare const fetchUserOwnedBillsDataAsync: (chainId: ChainId, account: string, bondData: BillsConfig[]) => Promise<UserOwnedBillsData[]>;
|
|
16
|
+
export declare const fetchUserOwnedBills: (chainId: ChainId, account: string, bonds: BillsConfig[]) => Promise<UserBill[]>;
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { UserBill } from '../../types/yourbonds';
|
|
4
4
|
import '../../scss/YourBondsModal.scss';
|
|
5
|
-
declare const YourBondsModal: ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) => React.JSX.Element | null;
|
|
5
|
+
declare const YourBondsModal: ({ onDismiss, userBill }: {
|
|
6
|
+
onDismiss?: () => void;
|
|
7
|
+
userBill?: UserBill;
|
|
8
|
+
}) => React.JSX.Element;
|
|
10
9
|
export default YourBondsModal;
|
package/package.json
CHANGED
|
@@ -3,34 +3,41 @@
|
|
|
3
3
|
"description": "Ape Bond SDK",
|
|
4
4
|
"author": "Ape Bond",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "1.0
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"types": "dist/
|
|
6
|
+
"version": "1.1.0-seedify",
|
|
7
|
+
"module": "dist/main.js",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"types": "dist/main.d.ts",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
14
|
"prepublishOnly": "npm run build",
|
|
15
|
-
"build": "npm run clean &&
|
|
15
|
+
"build": "npm run clean && rollup -c && npm run copy",
|
|
16
16
|
"dev": "vite",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"format:write": "prettier --write \"**/*.{js,jsx,ts,tsx,json}\" --config .prettierrc",
|
|
18
|
+
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json}\" --config .prettierrc",
|
|
19
|
+
"lint": "eslint && tsc --noEmit",
|
|
19
20
|
"clean": "rimraf dist/",
|
|
20
21
|
"copy": "copyfiles -u 1 src/**/*.scss dist/"
|
|
21
22
|
},
|
|
22
23
|
"peerDependencies": {
|
|
24
|
+
"@tanstack/react-query": "^5.51.5",
|
|
23
25
|
"axios": "^1.7.2",
|
|
24
26
|
"ethers": "5.7.2",
|
|
25
27
|
"react": "^18.3.1",
|
|
26
28
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
27
|
-
"
|
|
29
|
+
"wagmi": "^2.12.5"
|
|
28
30
|
},
|
|
29
31
|
"devDependencies": {
|
|
30
32
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
31
33
|
"@babel/plugin-transform-private-property-in-object": "^7.24.7",
|
|
32
34
|
"@eslint/js": "^9.10.0",
|
|
33
35
|
"@rainbow-me/rainbowkit": "^2.1.6",
|
|
36
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
37
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
38
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
39
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
40
|
+
"@tanstack/react-query-devtools": "^5.51.24",
|
|
34
41
|
"@types/lodash": "^4.17.6",
|
|
35
42
|
"@types/react": "^18.3.3",
|
|
36
43
|
"@types/react-dom": "^18.3.0",
|
|
@@ -53,38 +60,26 @@
|
|
|
53
60
|
"globals": "^15.9.0",
|
|
54
61
|
"prettier": "^3.3.3",
|
|
55
62
|
"rimraf": "5.0.10",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
63
|
+
"rollup": "^4.14.0",
|
|
64
|
+
"rollup-plugin-scss": "^4.0.0",
|
|
58
65
|
"typescript": "^5.0.0",
|
|
59
66
|
"typescript-eslint": "^8.5.0",
|
|
60
67
|
"vite": "^5.4.4",
|
|
61
|
-
"yalc": "^1.0.0-pre.53"
|
|
62
|
-
"@tanstack/react-query-devtools": "^5.51.24"
|
|
68
|
+
"yalc": "^1.0.0-pre.53"
|
|
63
69
|
},
|
|
64
70
|
"dependencies": {
|
|
65
71
|
"@ape.swap/apeswap-lists": "3.69.2-test.0",
|
|
66
72
|
"@ape.swap/sdk-core": "^1.0.2",
|
|
67
73
|
"@emotion/react": "^11.11.4",
|
|
68
74
|
"@emotion/styled": "^11.11.5",
|
|
69
|
-
"@reduxjs/toolkit": "^2.2.6",
|
|
70
|
-
"@tanstack/react-query": "^5.51.5",
|
|
71
|
-
"@types/node": "^20.14.10",
|
|
72
|
-
"@uniswap/token-lists": "^1.0.0-beta.34",
|
|
73
|
-
"axios-retry": "^4.4.2",
|
|
74
75
|
"bignumber.js": "^9.1.2",
|
|
75
76
|
"framer-motion": "^11.3.2",
|
|
76
77
|
"lodash": "^4.17.21",
|
|
77
|
-
"lottie-react": "^2.4.0",
|
|
78
78
|
"moment": "^2.30.1",
|
|
79
|
-
"next": "^14.2.5",
|
|
80
79
|
"numbro": "^2.5.0",
|
|
81
|
-
"react-redux": "^9.1.2",
|
|
82
|
-
"react-router-dom": "^6.24.1",
|
|
83
|
-
"react-svg": "^16.1.34",
|
|
84
80
|
"sass": "^1.77.7",
|
|
85
81
|
"swiper": "^11.1.4",
|
|
86
|
-
"theme-ui": "
|
|
87
|
-
"wagmi": "2.12.5"
|
|
82
|
+
"theme-ui": "0.16.2"
|
|
88
83
|
},
|
|
89
84
|
"browserslist": {
|
|
90
85
|
"production": [
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "theme-ui/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { AnimatePresence, motion } from 'framer-motion';
|
|
4
|
-
import { Flex, Svg } from '../uikit-sdk';
|
|
5
|
-
import '../../scss/AccordionText.scss';
|
|
6
|
-
var AccordionText = function (_a) {
|
|
7
|
-
var title = _a.title, body = _a.body, _b = _a.isVisible, isVisible = _b === void 0 ? false : _b;
|
|
8
|
-
var _c = useState(false), isDropdownExpanded = _c[0], setIsDropdownExpanded = _c[1];
|
|
9
|
-
var toggleDropdown = function () {
|
|
10
|
-
setIsDropdownExpanded(!isDropdownExpanded);
|
|
11
|
-
};
|
|
12
|
-
if (!isVisible) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
return (_jsxs(_Fragment, { children: [_jsxs(Flex, { className: "accordion-header", onClick: toggleDropdown, children: [_jsx(Flex, { className: "accordion-title", children: title }), _jsx(Flex, { className: "accordion-icon", children: _jsx(Svg, { icon: "caret", direction: isDropdownExpanded ? 'down' : 'up' }) })] }), _jsx(AnimatePresence, { children: isDropdownExpanded && (_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, { className: "accordion-body", children: body }) })) })] }));
|
|
16
|
-
};
|
|
17
|
-
export default AccordionText;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
2
|
-
import { useCallback } from 'react';
|
|
3
|
-
import { Flex, IconButton } from '../uikit-sdk';
|
|
4
|
-
import RecommendationSelector from '../MenuSelect/RecommendationSelector';
|
|
5
|
-
import MenuSelect from '../MenuSelect/MenuSelect';
|
|
6
|
-
import '../../scss/BondMenu.scss';
|
|
7
|
-
import NetworkFilter from '../NetworkFilter';
|
|
8
|
-
var BondMenu = function (_a) {
|
|
9
|
-
var setChainFilterOption = _a.setChainFilterOption, chainFilterOption = _a.chainFilterOption, filterOptions = _a.filterOptions, filterOption = _a.filterOption, setFilterOption = _a.setFilterOption, onHandleQueryChange = _a.onHandleQueryChange;
|
|
10
|
-
var mappedFilters = filterOptions.map(function (filter) {
|
|
11
|
-
return {
|
|
12
|
-
label: filter.charAt(0).toUpperCase() + filter.slice(1).toLowerCase(),
|
|
13
|
-
value: filter,
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
var asPath = window.location.pathname + window.location.search;
|
|
17
|
-
var handleFilterSelection = useCallback(function (newOption) {
|
|
18
|
-
setChainFilterOption(['All Chains']);
|
|
19
|
-
setFilterOption(newOption);
|
|
20
|
-
}, [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: {
|
|
22
|
-
display: ['none', 'none', 'none', 'flex'],
|
|
23
|
-
color: 'textDisabledButton',
|
|
24
|
-
fontSize: '14px',
|
|
25
|
-
background: 'white2',
|
|
26
|
-
borderRadius: 'normal',
|
|
27
|
-
p: '8px 16px',
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
justifyContent: 'center',
|
|
30
|
-
fontWeight: 500,
|
|
31
|
-
ml: '15px',
|
|
32
|
-
lineHeight: '13px',
|
|
33
|
-
cursor: 'pointer',
|
|
34
|
-
}, onClick: function () {
|
|
35
|
-
setChainFilterOption(['All Chains']);
|
|
36
|
-
setFilterOption(asPath.includes('yourBonds') ? 'CLAIMABLE' : 'ALL');
|
|
37
|
-
onHandleQueryChange('');
|
|
38
|
-
}, children: ["Clear All", _jsx(Flex, { sx: { ml: '7px' }, children: _jsx(IconButton, { icon: "close", color: "textDisabledButton", variant: "transparent" }) })] })] }));
|
|
39
|
-
};
|
|
40
|
-
export default BondMenu;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { QUERY_KEYS } from '../../config/constants/queryKeys';
|
|
3
|
-
import useCookie from '../../hooks/useCookie';
|
|
4
|
-
import { useCallback } from 'react';
|
|
5
|
-
export default function useChainFilterOption() {
|
|
6
|
-
var _a;
|
|
7
|
-
var _b = useCookie(QUERY_KEYS.CHAIN_FILTER_OPTION, ['All Chains']), cookie = _b.cookie, updateCookie = _b.updateCookie;
|
|
8
|
-
var data = useQuery({
|
|
9
|
-
queryKey: ["".concat(QUERY_KEYS.CHAIN_FILTER_OPTION)],
|
|
10
|
-
queryFn: function () { return cookie; },
|
|
11
|
-
initialData: cookie,
|
|
12
|
-
}).data;
|
|
13
|
-
var urlParams = typeof window !== 'undefined' ? new URLSearchParams(window.location.search) : null;
|
|
14
|
-
var urlChain = (_a = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('chain')) !== null && _a !== void 0 ? _a : '';
|
|
15
|
-
var queryClient = useQueryClient();
|
|
16
|
-
var removeURLChain = useCallback(function () {
|
|
17
|
-
if (urlChain && urlParams) {
|
|
18
|
-
console.log('remove url');
|
|
19
|
-
urlParams.delete('chain');
|
|
20
|
-
var newUrl = "".concat(window.location.pathname, "?").concat(urlParams.toString());
|
|
21
|
-
window.history.replaceState({}, '', newUrl);
|
|
22
|
-
}
|
|
23
|
-
}, [urlChain, urlParams]);
|
|
24
|
-
var setChainFilterOption = useCallback(function (newValue) {
|
|
25
|
-
updateCookie(newValue);
|
|
26
|
-
queryClient.setQueryData(["".concat(QUERY_KEYS.CHAIN_FILTER_OPTION)], newValue);
|
|
27
|
-
removeURLChain();
|
|
28
|
-
}, [updateCookie, queryClient, removeURLChain]);
|
|
29
|
-
return { data: data, setChainFilterOption: setChainFilterOption };
|
|
30
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
2
|
-
import BigNumber from "bignumber.js";
|
|
3
|
-
import { ChainId } from "../../enum/apeswaplists";
|
|
4
|
-
import ProgressBar from "../ProgressBar/ProgressBar";
|
|
5
|
-
import ProgressBarWrapper from "../ProgressBar/ProgressBarWrapper";
|
|
6
|
-
import TokenInfoAndName from "../TokenInfoAndName";
|
|
7
|
-
import Tooltip from "../Tooltip/Tooltip";
|
|
8
|
-
import { Svg, TooltipBubble } from "../uikit-sdk";
|
|
9
|
-
import { formatDollar, formatValue } from "../../utils/formatNumbers";
|
|
10
|
-
import getTimePeriods from "../../utils/getTimePeriods";
|
|
11
|
-
import { BLOCK_EXPLORER } from "../../config/constants/chains";
|
|
12
|
-
import { useEffect, useState } from "react";
|
|
13
|
-
import '../../scss/BondRow.scss';
|
|
14
|
-
import { Flex } from "theme-ui";
|
|
15
|
-
var BondRow = function (_a) {
|
|
16
|
-
var _b, _c, _d;
|
|
17
|
-
var bond = _a.bond, hotBonds = _a.hotBonds;
|
|
18
|
-
// Modal
|
|
19
|
-
var _e = useState(false), isModalOpen = _e[0], setIsModalOpen = _e[1];
|
|
20
|
-
useEffect(function () {
|
|
21
|
-
if (isModalOpen === true) {
|
|
22
|
-
if (typeof window !== "undefined") {
|
|
23
|
-
var newUrl = "/?bondAddress=".concat(bond.billAddress, "&bondChain=").concat(bond.chainId);
|
|
24
|
-
window.history.pushState({ path: newUrl }, '', newUrl);
|
|
25
|
-
console.log(isModalOpen);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}, [isModalOpen]);
|
|
29
|
-
useEffect(function () {
|
|
30
|
-
var fullUrl = window.location.href;
|
|
31
|
-
console.log('URL: ', fullUrl);
|
|
32
|
-
}, []);
|
|
33
|
-
var rowClick = function (bond) {
|
|
34
|
-
setIsModalOpen(true);
|
|
35
|
-
};
|
|
36
|
-
// Functions for calcuations
|
|
37
|
-
var vestingTime = function (vestingTerm) {
|
|
38
|
-
return getTimePeriods(vestingTerm !== null && vestingTerm !== void 0 ? vestingTerm : 0, true);
|
|
39
|
-
};
|
|
40
|
-
var getDiscountColor = function (discount) {
|
|
41
|
-
return discount < 0 ? 'discount-negative' : 'discount-positive';
|
|
42
|
-
};
|
|
43
|
-
var remainingPercentage = function (bond) {
|
|
44
|
-
var _a, _b;
|
|
45
|
-
var totalMaxPayout = new BigNumber((_a = bond.maxTotalPayout) !== null && _a !== void 0 ? _a : '0').div(new BigNumber(10).pow(bond.earnToken.decimals[bond.chainId]));
|
|
46
|
-
var remainingTokens = new BigNumber((_b = bond.tokensRemaining) !== null && _b !== void 0 ? _b : '0');
|
|
47
|
-
return remainingTokens.div(totalMaxPayout).times(100).toNumber();
|
|
48
|
-
};
|
|
49
|
-
var remainingTokensFormat = function (bond) {
|
|
50
|
-
var _a;
|
|
51
|
-
return formatValue({ num: new BigNumber((_a = bond.tokensRemaining) !== null && _a !== void 0 ? _a : '0') });
|
|
52
|
-
};
|
|
53
|
-
var remainingTokensUsd = function (bond) {
|
|
54
|
-
var _a, _b;
|
|
55
|
-
var tokens = new BigNumber((_a = bond.tokensRemaining) !== null && _a !== void 0 ? _a : '0');
|
|
56
|
-
return tokens.times((_b = bond.payoutTokenPrice) !== null && _b !== void 0 ? _b : 0);
|
|
57
|
-
};
|
|
58
|
-
var getBillContractURL = function (bond) {
|
|
59
|
-
var _a;
|
|
60
|
-
var selectedChain = (_a = bond.chainId) !== null && _a !== void 0 ? _a : ChainId.BSC;
|
|
61
|
-
var explorerLink = BLOCK_EXPLORER[selectedChain];
|
|
62
|
-
return "".concat(explorerLink, "/address/").concat(bond === null || bond === void 0 ? void 0 : bond.billAddress);
|
|
63
|
-
};
|
|
64
|
-
var calculateARR = function (bond) {
|
|
65
|
-
var _a;
|
|
66
|
-
var discount = (_a = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _a !== void 0 ? _a : 0;
|
|
67
|
-
var vestingDays = vestingTime(bond.vestingTerm).days;
|
|
68
|
-
return parseFloat((((discount * 365) / vestingDays).toFixed(2)));
|
|
69
|
-
};
|
|
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: {
|
|
71
|
-
width: '127px',
|
|
72
|
-
height: '25px',
|
|
73
|
-
flexDirection: 'column',
|
|
74
|
-
justifyContent: 'center',
|
|
75
|
-
display: ['none', 'none', 'none', 'flex'],
|
|
76
|
-
}, showTooltip: true, toolTip: "".concat(remainingTokensFormat(bond), " ").concat(bond.earnToken.symbol, " (").concat(formatDollar({
|
|
77
|
-
num: remainingTokensUsd(bond).toNumber(),
|
|
78
|
-
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));
|
|
80
|
-
};
|
|
81
|
-
export default BondRow;
|