From 63215263573c21f086fd1555fe04141ecd9580bc Mon Sep 17 00:00:00 2001 From: RedVeil Date: Tue, 18 Apr 2023 10:09:34 +0200 Subject: [PATCH 1/8] removed app package --- package.json | 2 - packages/app/.gitignore | 13 - packages/app/.nvmrc | 1 - packages/app/.prettierignore | 14 - packages/app/LottieAnimations/loader.json | 1006 -- packages/app/Procfile | 1 - packages/app/README.md | 3 - packages/app/__test__/index.test.tsx | 12 - packages/app/abis/ERC20.json | 293 - .../components/BatchButter/BatchProgress.tsx | 50 - .../BatchButter/ButterTokenInput.tsx | 206 - .../BatchButter/CheckMarkToggleWithInfo.tsx | 48 - .../components/BatchButter/ClaimableBatch.tsx | 108 - .../BatchButter/ClaimableBatches.tsx | 171 - .../BatchButter/EmptyClaimableBatch.tsx | 30 - .../BatchButter/MintRedeemInterface.tsx | 184 - .../BatchButter/MintRedeemToggle.tsx | 78 - .../BatchButter/MobileClaimableBatch.tsx | 99 - .../MobileEmptyClaimableBatches.tsx | 31 - .../BatchButter/MobileTutorialSlider.tsx | 89 - .../BatchButter/MobileTutorialStepButton.tsx | 21 - .../components/BatchButter/OutputToken.tsx | 38 - .../BatchButter/SlippageSettings.tsx | 140 - .../components/BatchButter/StatInfoCard.tsx | 28 - .../app/components/BatchButter/Tutorial.tsx | 114 - .../components/BatchButter/TutorialSlider.tsx | 80 - .../app/components/BatchButter/ZapModal.tsx | 99 - packages/app/components/CardIcon.tsx | 37 - packages/app/components/CardLoader.tsx | 13 - packages/app/components/Common/AlertCard.tsx | 35 - packages/app/components/Common/Badge.tsx | 16 - .../app/components/Common/CustomDropdown.tsx | 67 - packages/app/components/Common/Divider.tsx | 10 - .../app/components/Common/DropdownOptions.tsx | 61 - .../Common/FooterLandScapeImage.tsx | 11 - .../components/Common/MobilePopupSelect.tsx | 43 - packages/app/components/Common/Page.tsx | 38 - .../Common/ScrollableSelect/index.tsx | 43 - packages/app/components/Common/TextLink.tsx | 34 - packages/app/components/Common/TokenInput.tsx | 160 - packages/app/components/DropdownSelect.tsx | 73 - packages/app/components/FacebookPixel.tsx | 25 - packages/app/components/FakeInputField.tsx | 13 - packages/app/components/Footer.tsx | 3 - packages/app/components/InfoIconWithModal.tsx | 44 - packages/app/components/LoadingSpinner.tsx | 20 - packages/app/components/MainActionButton.tsx | 31 - packages/app/components/MobileExcuseAlert.tsx | 40 - .../app/components/NavBar/DesktopMenu.tsx | 99 - .../components/NavBar/DropDownComponent.tsx | 83 - packages/app/components/NavBar/GetPopMenu.tsx | 81 - packages/app/components/NavBar/MobileMenu.tsx | 281 - .../components/NavBar/MobileProductsMenu.tsx | 66 - packages/app/components/NavBar/NavBar.tsx | 26 - .../app/components/NavBar/NavbarLinks.tsx | 31 - .../app/components/Portfolio/NetWorthCard.tsx | 63 - .../components/Portfolio/PortfolioCardCon.tsx | 16 - .../components/Portfolio/PortfolioHero.tsx | 47 - .../components/Portfolio/PortfolioItem.tsx | 104 - .../Portfolio/PortfolioMenuTabs.tsx | 36 - .../Portfolio/PortfolioProductItem.tsx | 70 - .../app/components/Rewards/AirdropClaim.tsx | 76 - .../app/components/Rewards/VestingRecord.tsx | 63 - .../app/components/SVGIcons/DiscordIcon.tsx | 33 - .../app/components/SVGIcons/GithubIcon.tsx | 20 - .../app/components/SVGIcons/MediumIcon.tsx | 37 - .../app/components/SVGIcons/RedditIcon.tsx | 25 - .../components/SVGIcons/RightArrowIcon.tsx | 17 - .../app/components/SVGIcons/TelegramIcon.tsx | 25 - .../app/components/SVGIcons/TwitterIcon.tsx | 18 - .../app/components/SVGIcons/YoutubeIcon.tsx | 29 - packages/app/components/SearchBar.tsx | 23 - .../app/components/SecondaryActionButton.tsx | 38 - packages/app/components/SetStats.tsx | 59 - packages/app/components/StakeCard.tsx | 88 - packages/app/components/SwitchNetwork.tsx | 28 - packages/app/components/TokenInputToggle.tsx | 50 - .../components/WheelPicker/WheelPicker.tsx | 241 - .../WheelPicker/WheelPickerItem.tsx | 106 - packages/app/components/WheelPickers.tsx | 96 - packages/app/components/landing/Hero.tsx | 34 - .../app/components/landing/NetworthCard.tsx | 32 - packages/app/components/landing/Product.tsx | 51 - packages/app/components/landing/Products.tsx | 238 - packages/app/components/landing/TVLCard.tsx | 34 - .../staking/PopLockerInteraction.tsx | 165 - .../app/components/staking/StakeInterface.tsx | 321 - .../staking/StakeInterfaceLoader.tsx | 39 - .../components/staking/StakingInteraction.tsx | 96 - .../staking/SuccessfulStakingModal.tsx | 13 - .../components/staking/TermsModalContent.tsx | 46 - packages/app/context/actions.tsx | 126 - packages/app/context/store.tsx | 105 - packages/app/helper/ButterDataUtils.tsx | 151 - packages/app/helper/ClaimableBatchUtils.ts | 26 - packages/app/helper/YearnVault.ts | 60 - packages/app/helper/calculateAPY.ts | 146 - packages/app/helper/getAssetValue.ts | 21 - packages/app/helper/getStakingPool.ts | 79 - packages/app/helper/getToken.ts | 59 - packages/app/helper/inputRegex.ts | 4 - packages/app/helper/isDepositDisabled.tsx | 46 - packages/app/helper/modalHelpers.ts | 25 - packages/app/helper/placeholderImageUrl.ts | 2 - packages/app/helper/safeLocalstorageAccess.ts | 16 - packages/app/helper/threeXDataUtils.tsx | 204 - packages/app/helper/toTitleCase.ts | 10 - packages/app/helper/useWeb3Callbacks.ts | 48 - packages/app/helper/verifyEmail.ts | 5 - packages/app/helper/web3Onboard.tsx | 70 - packages/app/hooks/set/useAssetValue.tsx | 14 - .../app/hooks/set/useBasicIssuanceModule.tsx | 14 - packages/app/hooks/set/useButterBatch.tsx | 21 - packages/app/hooks/set/useButterBatchData.tsx | 62 - .../app/hooks/set/useButterBatchSample.tsx | 10 - .../app/hooks/set/useButterBatchZapper.tsx | 19 - packages/app/hooks/set/useButterWhaleData.tsx | 61 - .../hooks/set/useButterWhaleProcessing.tsx | 15 - packages/app/hooks/set/useGetYearnAPY.tsx | 32 - .../app/hooks/set/useSetComponentAddresses.ts | 19 - packages/app/hooks/set/useSetToken.tsx | 14 - packages/app/hooks/set/useSetTokenTVL.ts | 63 - packages/app/hooks/set/useThreeXBatch.tsx | 16 - packages/app/hooks/set/useThreeXData.tsx | 47 - packages/app/hooks/set/useThreeXWhale.tsx | 15 - packages/app/hooks/set/useThreeXWhaleData.tsx | 46 - packages/app/hooks/set/useThreeXZapper.tsx | 17 - .../hooks/staking/useBalanceAndAllowance.ts | 43 - packages/app/hooks/staking/useGetEarned.ts | 19 - .../staking/useGetMultipleStakingPools.ts | 32 - .../app/hooks/staking/useGetStakedBalance.ts | 26 - packages/app/hooks/staking/usePopLocker.ts | 22 - packages/app/hooks/staking/useStakingPool.ts | 30 - packages/app/hooks/tokens/useApproveERC20.ts | 29 - packages/app/hooks/tokens/useERC20.ts | 30 - .../app/hooks/tokens/useGetMultipleToken.ts | 23 - .../app/hooks/tokens/useLPTokenAddresses.tsx | 7 - packages/app/hooks/tokens/useMultipleERC20.ts | 11 - .../app/hooks/tokens/useSetTokenAddresses.tsx | 7 - .../hooks/tokens/useSweetVaultAddresses.tsx | 7 - .../app/hooks/tokens/useTokenAllowance.ts | 27 - packages/app/hooks/tokens/useTokenBalance.ts | 26 - packages/app/hooks/tokens/useTokenPrices.tsx | 132 - .../app/hooks/tokens/useTotalTokenSupply.ts | 26 - .../app/hooks/useAdjustDepositDecimals.tsx | 14 - packages/app/hooks/useAllStakingPools.ts | 40 - .../hooks/useButterIsSupportedOnNetwork.ts | 15 - packages/app/hooks/useChainIdFromUrl.ts | 19 - packages/app/hooks/useChainUrl.ts | 32 - packages/app/hooks/useClaimEscrows.ts | 32 - packages/app/hooks/useClaimStakingReward.ts | 22 - packages/app/hooks/useClickOutside.ts | 34 - packages/app/hooks/useContractMetadata.ts | 15 - packages/app/hooks/useDefaultTokenList.ts | 8 - packages/app/hooks/useDeployment.ts | 23 - packages/app/hooks/useGetUserEscrows.ts | 83 - packages/app/hooks/useIsConnected.tsx | 16 - packages/app/hooks/useNetworkNameFromUrl.tsx | 14 - packages/app/hooks/usePushWithinChain.ts | 23 - packages/app/hooks/useRpcProvider.ts | 8 - packages/app/hooks/useStakingContracts.ts | 15 - .../app/hooks/useSubscribeToNewsletter.tsx | 111 - packages/app/hooks/useSweetVaults.ts | 7 - packages/app/hooks/useSwitchChainModal.ts | 34 - .../app/hooks/useThreeCurveVirtualPrice.ts | 27 - packages/app/hooks/useThreePool.ts | 15 - packages/app/hooks/useTransaction.ts | 61 - packages/app/hooks/useVestingEscrow.ts | 16 - packages/app/hooks/useWeb3.ts | 61 - packages/app/hooks/useWindowSize.ts | 31 - .../hooks/wheelPicker/useHandleKeyboard.ts | 60 - packages/app/hooks/wheelPicker/useObserver.ts | 109 - .../hooks/wheelPicker/useScrollAnimation.ts | 58 - packages/app/index.d.ts | 20 - packages/app/jest.config.js | 10 - packages/app/next-env.d.ts | 5 - packages/app/next.config.js | 48 - packages/app/nodemon.json | 5 - packages/app/package.json | 86 - packages/app/pages/[network]/error.tsx | 48 - packages/app/pages/[network]/portfolio.tsx | 52 - packages/app/pages/[network]/set/3x.tsx | 664 -- packages/app/pages/[network]/set/butter.tsx | 768 -- packages/app/pages/[network]/staking/[id].tsx | 117 - packages/app/pages/[network]/staking/pop.tsx | 156 - packages/app/pages/_app.tsx | 147 - packages/app/pages/index.tsx | 24 - packages/app/postcss.config.js | 7 - packages/app/public/ButterBatchZapperAbi.json | 78 - .../app/public/android-chrome-192x192.png | Bin 2741 -> 0 bytes .../app/public/android-chrome-512x512.png | Bin 11455 -> 0 bytes packages/app/public/apple-touch-icon.png | Bin 2540 -> 0 bytes packages/app/public/docs/PopcornMay2022.pdf | Bin 335155 -> 0 bytes .../app/public/docs/Popcorn_whitepaper_v1.pdf | Bin 1625209 -> 0 bytes packages/app/public/favicon-16x16.png | Bin 581 -> 0 bytes packages/app/public/favicon-32x32.png | Bin 764 -> 0 bytes packages/app/public/favicon.ico | Bin 15086 -> 0 bytes .../Avenir_Next_LT_Pro/AvenirLTPro-Black.woff | Bin 25300 -> 0 bytes .../Avenir_Next_LT_Pro/AvenirLTPro-Book.woff | Bin 25720 -> 0 bytes .../Avenir_Next_LT_Pro/AvenirLTPro-Heavy.woff | Bin 25440 -> 0 bytes .../Avenir_Next_LT_Pro/AvenirLTPro-Light.woff | Bin 25328 -> 0 bytes .../AvenirLTPro-Medium.woff | Bin 25820 -> 0 bytes .../Avenir_Next_LT_Pro/AvenirLTPro-Roman.woff | Bin 25652 -> 0 bytes .../AvenirNextLTPro-Bold.woff | Bin 39620 -> 0 bytes .../AvenirNextLTPro-Demi.woff | Bin 38768 -> 0 bytes .../AvenirNextLTPro-It.woff | Bin 38484 -> 0 bytes .../AvenirNextLTPro-Regular.woff | Bin 38024 -> 0 bytes .../fonts/Inter/inter-v2-latin-200.woff2 | Bin 17432 -> 0 bytes .../fonts/Inter/inter-v2-latin-300.woff2 | Bin 17360 -> 0 bytes .../fonts/Inter/inter-v2-latin-400.woff2 | Bin 16904 -> 0 bytes .../fonts/Inter/inter-v2-latin-500.woff2 | Bin 17728 -> 0 bytes .../fonts/Inter/inter-v2-latin-600.woff2 | Bin 17792 -> 0 bytes packages/app/public/fonts/Inter/styles.css | 28 - .../public/fonts/KH_Teka/KHTeka-Black.woff | Bin 44320 -> 0 bytes .../fonts/KH_Teka/KHTeka-BlackItalic.woff | Bin 44608 -> 0 bytes .../app/public/fonts/KH_Teka/KHTeka-Bold.woff | Bin 45412 -> 0 bytes .../fonts/KH_Teka/KHTeka-BoldItalic.woff | Bin 46276 -> 0 bytes .../public/fonts/KH_Teka/KHTeka-Light.woff | Bin 43768 -> 0 bytes .../fonts/KH_Teka/KHTeka-LightItalic.woff | Bin 45500 -> 0 bytes .../public/fonts/KH_Teka/KHTeka-Medium.woff | Bin 44776 -> 0 bytes .../fonts/KH_Teka/KHTeka-MediumItalic.woff | Bin 45628 -> 0 bytes .../public/fonts/KH_Teka/KHTeka-Regular.woff | Bin 44060 -> 0 bytes .../fonts/KH_Teka/KHTeka-RegularItalic.woff | Bin 45104 -> 0 bytes packages/app/public/gql/graph.txt | 33 - packages/app/public/gql/mainnetQuery.json | 2591 ----- packages/app/public/gql/polygonQuery.json | 9291 ----------------- packages/app/public/images/3xHero.svg | 15 - packages/app/public/images/4xImage.svg | 10 - packages/app/public/images/ComingSoonCat.png | Bin 13660 -> 0 bytes packages/app/public/images/ComingSoonCat.svg | 45 - packages/app/public/images/Cornfield.svg | 33 - .../app/public/images/Instant Butter_icon.svg | 3 - packages/app/public/images/blackCircle.svg | 3 - packages/app/public/images/bubbleGumWoman.svg | 14 - .../public/images/builtWithLogos/curve.svg | 14 - .../public/images/builtWithLogos/setLogo.svg | 20 - .../images/builtWithLogos/synthetix.svg | 18 - .../public/images/builtWithLogos/uniswap.svg | 25 - .../public/images/builtWithLogos/yearn.svg | 15 - .../app/public/images/butter/Step-1-3X.png | Bin 597540 -> 0 bytes packages/app/public/images/butter/Step-1.png | Bin 596514 -> 0 bytes packages/app/public/images/butter/Step-2.png | Bin 441540 -> 0 bytes .../app/public/images/butter/Step-3-3X.png | Bin 506734 -> 0 bytes packages/app/public/images/butter/Step-3.png | Bin 506618 -> 0 bytes .../public/images/butter/batch-popover.png | Bin 37154 -> 0 bytes packages/app/public/images/butter/modal-1.png | Bin 19007 -> 0 bytes packages/app/public/images/butter/modal-2.png | Bin 24869 -> 0 bytes .../images/butter/primary-btn-divider.svg | 5 - packages/app/public/images/butterHero.svg | 10 - packages/app/public/images/catPopVault.svg | 54 - .../app/public/images/catPopVaultMobile.png | Bin 27774 -> 0 bytes .../app/public/images/chartPlaceholder.svg | 218 - .../app/public/images/claim/Group_842.png | Bin 38756 -> 0 bytes packages/app/public/images/claim/popover.png | Bin 15824 -> 0 bytes packages/app/public/images/claimCat.png | Bin 19320 -> 0 bytes packages/app/public/images/claims-cat.svg | 38 - packages/app/public/images/closeIcon.svg | 4 - packages/app/public/images/comingSoon.svg | 13 - .../images/common/primary-btn-divider.png | Bin 1628 -> 0 bytes packages/app/public/images/do good.svg | 21 - packages/app/public/images/emptyPopcorn.svg | 20 - .../app/public/images/errorBackground.svg | 158 - packages/app/public/images/farmer.svg | 73 - packages/app/public/images/farmerCat.svg | 72 - .../app/public/images/fireProductBadge.svg | 12 - packages/app/public/images/g0.svg | 9 - packages/app/public/images/g0Card.svg | 23 - packages/app/public/images/hands.svg | 5 - .../app/public/images/icons/3crv_icon.png | Bin 10438 -> 0 bytes packages/app/public/images/icons/BTR.svg | 4 - packages/app/public/images/icons/IconPlay.svg | 3 - packages/app/public/images/icons/POP.svg | 8 - packages/app/public/images/icons/arbLogo.png | Bin 709 -> 0 bytes packages/app/public/images/icons/arbitrum.png | Bin 7800 -> 0 bytes packages/app/public/images/icons/bsc-logo.png | Bin 2868 -> 0 bytes packages/app/public/images/icons/coins.svg | 4 - packages/app/public/images/icons/crvSEth.png | 7 - packages/app/public/images/icons/dd-arrow.svg | 3 - packages/app/public/images/icons/ethLogo.png | Bin 117493 -> 0 bytes .../app/public/images/icons/exchangeIcon.svg | 6 - .../images/icons/exchangeIconSingle.svg | 4 - .../app/public/images/icons/polygonLogo.png | Bin 543 -> 0 bytes packages/app/public/images/icons/popLogo.png | Bin 13986 -> 0 bytes packages/app/public/images/icons/popLogo.svg | 7 - .../app/public/images/icons/pop_64x64.png | Bin 2645 -> 0 bytes packages/app/public/images/icons/slippage.png | Bin 529 -> 0 bytes packages/app/public/images/icons/tooltip.svg | 4 - .../app/public/images/icons/walletIcon.svg | 1 - .../app/public/images/icons/waveEqual.svg | 3 - packages/app/public/images/immunefi.svg | 14 - packages/app/public/images/immunefiCard.svg | 15 - packages/app/public/images/infoIcon.svg | 3 - packages/app/public/images/loadingCat.svg | 55 - packages/app/public/images/lock.svg | 5 - packages/app/public/images/mobileErrorBg.svg | 136 - .../public/images/modalImages/comingSoon.svg | 4 - .../modalImages/inconsistentNetwork.svg | 6 - .../app/public/images/modalImages/migrate.svg | 6 - .../app/public/images/modalImages/mint.svg | 5 - .../public/images/modalImages/redeemed.svg | 3 - .../app/public/images/modalImages/restake.svg | 6 - .../images/modalImages/successfulStake.svg | 4 - .../images/modalImages/vestingImage.svg | 5 - packages/app/public/images/nature.png | Bin 1401321 -> 0 bytes .../app/public/images/newProductBadge.svg | 6 - .../app/public/images/newsletterAvatar.png | Bin 2418 -> 0 bytes .../images/popcorn-logo-circle-disabled.svg | 12 - .../app/public/images/popcorn-logo-circle.svg | 23 - packages/app/public/images/popcorn1.svg | 4 - packages/app/public/images/popcorn2.svg | 3 - packages/app/public/images/popx.csv | 2258 ---- packages/app/public/images/portfolio.svg | 16 - packages/app/public/images/rocket.svg | 188 - packages/app/public/images/smiley.svg | 5 - .../app/public/images/social_cover_image.svg | 7 - .../app/public/images/stake/lpStaking.png | Bin 49443 -> 0 bytes .../app/public/images/stake/restake_image.png | Bin 65262 -> 0 bytes .../images/stake/stake-success-modal.png | Bin 19792 -> 0 bytes packages/app/public/images/stakingBG.png | Bin 41919 -> 0 bytes packages/app/public/images/stakingCard.svg | 6 - packages/app/public/images/sweetVaults.svg | 7 - packages/app/public/images/textLogo.png | Bin 55055 -> 0 bytes packages/app/public/images/tokens/3X.svg | 6 - packages/app/public/images/tokens/3crv.png | Bin 5332 -> 0 bytes packages/app/public/images/tokens/BTR.svg | 4 - .../app/public/images/tokens/Group 1104.svg | 9 - .../app/public/images/tokens/Group 1108.svg | 9 - packages/app/public/images/tokens/RAI.svg | 14 - packages/app/public/images/tokens/ageur.svg | 9 - .../app/public/images/tokens/boltLogo.svg | 15 - packages/app/public/images/tokens/butter.png | Bin 682 -> 0 bytes packages/app/public/images/tokens/clogo.svg | 14 - packages/app/public/images/tokens/crvSeth.png | Bin 12095 -> 0 bytes packages/app/public/images/tokens/dai.webp | Bin 486 -> 0 bytes packages/app/public/images/tokens/eth.png | Bin 2431 -> 0 bytes .../multi-collateral-dai-dai-logo 1.svg | 11 - packages/app/public/images/tokens/peSeth.webp | Bin 1372 -> 0 bytes .../app/public/images/tokens/sDiamondLogo.svg | 9 - packages/app/public/images/tokens/sEth.webp | Bin 1802 -> 0 bytes packages/app/public/images/tokens/sLogo.svg | 9 - packages/app/public/images/tokens/sUSD.png | Bin 5129 -> 0 bytes .../app/public/images/tokens/sUnderscore.svg | 14 - packages/app/public/images/tokens/susd 1.svg | 5 - .../public/images/tokens/tether-usdt-logo.svg | 11 - .../app/public/images/tokens/threeCrv.svg | 1530 --- packages/app/public/images/tokens/threeX.svg | 7 - packages/app/public/images/tokens/threeX1.svg | 3 - packages/app/public/images/tokens/threeX2.svg | 7 - packages/app/public/images/tokens/threeX3.svg | 21 - packages/app/public/images/tokens/threeX4.svg | 19 - packages/app/public/images/tokens/threeX5.svg | 21 - packages/app/public/images/tokens/threeX6.svg | 7 - packages/app/public/images/tokens/threeX7.svg | 7 - .../public/images/tokens/threeXborderless.png | Bin 5833 -> 0 bytes .../app/public/images/tokens/threexBig.svg | 6 - .../images/tokens/usd-coin-usdc-logo.svg | 12 - packages/app/public/images/tokens/usdc.webp | Bin 868 -> 0 bytes packages/app/public/images/tokens/usdt.svg | 3 - packages/app/public/images/tokens/usdt.webp | Bin 1250 -> 0 bytes packages/app/public/images/treeRow.svg | 855 -- packages/app/public/images/twoFingers.svg | 5 - packages/app/public/images/vaultopen.svg | 86 - packages/app/public/images/wallet.svg | 3 - .../app/public/images/wallets/metamask.svg | 61 - .../public/images/wallets/walletConnect.svg | 15 - packages/app/public/images/yellowCircle.svg | 6 - packages/app/public/images/zokyo.svg | 15 - packages/app/public/images/zokyoCard.svg | 9 - packages/app/public/manifest.json | 5 - packages/app/public/site.webmanifest | 11 - packages/app/setupTests.js | 1 - packages/app/styles/globals.css | 377 - packages/app/tailwind.config.js | 5 - packages/app/tsconfig.json | 14 - packages/app/tsconfig.server.json | 10 - packages/app/types.d.ts | 7 - .../components/components/ConnectWallet.tsx | 2 +- .../components/GoogleAnalyticsPrompt.tsx | 4 +- .../components/InfoIconWithTooltip.tsx | 0 .../components/InputTokenWithError.tsx | 2 +- .../components}/MobileCardSlider.tsx | 5 +- .../components/Modal/DualActionModal.tsx | 5 +- .../Modal/MultiChoiceActionModal.tsx | 4 +- .../Modal/NetworkChangePromptModal.tsx | 4 +- .../components/Modal/SingleActionModal.tsx | 7 +- .../components/NavBar/DesktopMenu.tsx | 18 +- .../components/NavBar/MobileMenu.tsx | 22 +- .../components/NavBar/MobileProductsMenu.tsx | 34 +- .../components/NavBar/NavbarLinks.tsx | 2 +- .../components/components/NetworkFilter.tsx | 2 +- .../components/NetworkSticker.tsx | 14 +- .../components}/NotAvailable.tsx | 0 packages/components/components/Page.tsx | 2 +- packages/components/components/PageLoader.tsx | 2 +- .../components/Portfolio/AssetRow.tsx | 6 +- .../components/Portfolio/PortfolioSection.tsx | 4 +- .../components}/PseudoRadioButton.tsx | 5 +- .../components}/SearchToken.tsx | 4 +- .../components}/SelectToken.tsx | 4 +- .../components}/SliderContainer.tsx | 0 .../components/StakingTermsAndConditions.tsx | 8 +- .../components}/StatusWithLabel.tsx | 14 +- .../components/TertiaryActionButton.tsx | 0 .../components/TokenIcon.tsx | 4 +- .../components/components/landing/Product.tsx | 6 +- .../components/landing/Products.tsx | 65 +- .../components/hooks/useChainIdFromUrl.ts | 27 + .../components/hooks/useDefaultTokenList.ts | 8 + .../hooks/useNetworkName.ts} | 5 +- .../hooks/useNetworth.ts} | 7 +- .../hooks/usePoolTvl.ts} | 21 +- .../hooks/useProductLinks.ts} | 12 - .../hooks/useRestakeAlert.tsx | 39 +- .../hooks}/useStakingTVL.ts | 20 +- .../hooks/useSubscribeToNewsletter.tsx | 8 +- packages/components/lib/Contract/TotalTvl.tsx | 4 +- .../components/OfacCheck.tsx | 5 +- .../components/SweetVault/Deposit.tsx | 2 +- .../components/SweetVault/DepositWithdraw.tsx | 2 +- .../components/SweetVault/SweetVault.tsx | 8 +- .../components/SweetVault/Withdraw.tsx | 2 +- .../components/landing/Hero.tsx | 19 +- .../components/landing/SecuritySection.tsx | 5 +- .../components/rewards/AirdropClaim.tsx | 10 +- .../components/rewards/ClaimCard.tsx | 6 +- .../rewards/StakingRewardsContainer.tsx | 2 +- .../components/staking/StakeCard.tsx | 17 +- .../staking/VestingRecordDropDown.tsx | 0 .../components/vesting}/RewardSummaryCard.tsx | 4 +- .../components/vesting/Vesting.tsx | 2 +- .../components/vesting/VestingContainer.tsx | 6 +- .../hooks/staking/useAllStakingAddresses.tsx | 33 +- .../hooks/vesting/useEscrows.tsx | 60 - .../hooks/xPopRedemption/useXPOPRedemption.ts | 73 - packages/greenfield-app/package.json | 1 - .../greenfield-app/pages/[network]/error.tsx | 53 +- .../greenfield-app/pages/[network]/set/3x.tsx | 5 - .../pages/[network]/set/butter.tsx | 5 - .../pages/[network]/staking/[id].tsx | 407 +- .../pages/[network]/staking/pop.tsx | 35 +- packages/greenfield-app/pages/_app.tsx | 2 +- packages/greenfield-app/pages/index.tsx | 2 +- packages/greenfield-app/pages/rewards.tsx | 6 +- .../greenfield-app/pages/sweet-vaults.tsx | 4 - packages/landing/components/DesktopMenu.tsx | 3 +- packages/landing/package.json | 1 - 446 files changed, 508 insertions(+), 32031 deletions(-) delete mode 100644 packages/app/.gitignore delete mode 100644 packages/app/.nvmrc delete mode 100644 packages/app/.prettierignore delete mode 100644 packages/app/LottieAnimations/loader.json delete mode 100644 packages/app/Procfile delete mode 100644 packages/app/README.md delete mode 100644 packages/app/__test__/index.test.tsx delete mode 100644 packages/app/abis/ERC20.json delete mode 100644 packages/app/components/BatchButter/BatchProgress.tsx delete mode 100644 packages/app/components/BatchButter/ButterTokenInput.tsx delete mode 100644 packages/app/components/BatchButter/CheckMarkToggleWithInfo.tsx delete mode 100644 packages/app/components/BatchButter/ClaimableBatch.tsx delete mode 100644 packages/app/components/BatchButter/ClaimableBatches.tsx delete mode 100644 packages/app/components/BatchButter/EmptyClaimableBatch.tsx delete mode 100644 packages/app/components/BatchButter/MintRedeemInterface.tsx delete mode 100644 packages/app/components/BatchButter/MintRedeemToggle.tsx delete mode 100644 packages/app/components/BatchButter/MobileClaimableBatch.tsx delete mode 100644 packages/app/components/BatchButter/MobileEmptyClaimableBatches.tsx delete mode 100644 packages/app/components/BatchButter/MobileTutorialSlider.tsx delete mode 100644 packages/app/components/BatchButter/MobileTutorialStepButton.tsx delete mode 100644 packages/app/components/BatchButter/OutputToken.tsx delete mode 100644 packages/app/components/BatchButter/SlippageSettings.tsx delete mode 100644 packages/app/components/BatchButter/StatInfoCard.tsx delete mode 100644 packages/app/components/BatchButter/Tutorial.tsx delete mode 100644 packages/app/components/BatchButter/TutorialSlider.tsx delete mode 100644 packages/app/components/BatchButter/ZapModal.tsx delete mode 100644 packages/app/components/CardIcon.tsx delete mode 100644 packages/app/components/CardLoader.tsx delete mode 100644 packages/app/components/Common/AlertCard.tsx delete mode 100644 packages/app/components/Common/Badge.tsx delete mode 100644 packages/app/components/Common/CustomDropdown.tsx delete mode 100644 packages/app/components/Common/Divider.tsx delete mode 100644 packages/app/components/Common/DropdownOptions.tsx delete mode 100644 packages/app/components/Common/FooterLandScapeImage.tsx delete mode 100644 packages/app/components/Common/MobilePopupSelect.tsx delete mode 100644 packages/app/components/Common/Page.tsx delete mode 100644 packages/app/components/Common/ScrollableSelect/index.tsx delete mode 100644 packages/app/components/Common/TextLink.tsx delete mode 100644 packages/app/components/Common/TokenInput.tsx delete mode 100644 packages/app/components/DropdownSelect.tsx delete mode 100644 packages/app/components/FacebookPixel.tsx delete mode 100644 packages/app/components/FakeInputField.tsx delete mode 100644 packages/app/components/Footer.tsx delete mode 100644 packages/app/components/InfoIconWithModal.tsx delete mode 100644 packages/app/components/LoadingSpinner.tsx delete mode 100644 packages/app/components/MainActionButton.tsx delete mode 100644 packages/app/components/MobileExcuseAlert.tsx delete mode 100644 packages/app/components/NavBar/DesktopMenu.tsx delete mode 100644 packages/app/components/NavBar/DropDownComponent.tsx delete mode 100644 packages/app/components/NavBar/GetPopMenu.tsx delete mode 100644 packages/app/components/NavBar/MobileMenu.tsx delete mode 100644 packages/app/components/NavBar/MobileProductsMenu.tsx delete mode 100644 packages/app/components/NavBar/NavBar.tsx delete mode 100644 packages/app/components/NavBar/NavbarLinks.tsx delete mode 100644 packages/app/components/Portfolio/NetWorthCard.tsx delete mode 100644 packages/app/components/Portfolio/PortfolioCardCon.tsx delete mode 100644 packages/app/components/Portfolio/PortfolioHero.tsx delete mode 100644 packages/app/components/Portfolio/PortfolioItem.tsx delete mode 100644 packages/app/components/Portfolio/PortfolioMenuTabs.tsx delete mode 100644 packages/app/components/Portfolio/PortfolioProductItem.tsx delete mode 100644 packages/app/components/Rewards/AirdropClaim.tsx delete mode 100644 packages/app/components/Rewards/VestingRecord.tsx delete mode 100644 packages/app/components/SVGIcons/DiscordIcon.tsx delete mode 100644 packages/app/components/SVGIcons/GithubIcon.tsx delete mode 100644 packages/app/components/SVGIcons/MediumIcon.tsx delete mode 100644 packages/app/components/SVGIcons/RedditIcon.tsx delete mode 100644 packages/app/components/SVGIcons/RightArrowIcon.tsx delete mode 100644 packages/app/components/SVGIcons/TelegramIcon.tsx delete mode 100644 packages/app/components/SVGIcons/TwitterIcon.tsx delete mode 100644 packages/app/components/SVGIcons/YoutubeIcon.tsx delete mode 100644 packages/app/components/SearchBar.tsx delete mode 100644 packages/app/components/SecondaryActionButton.tsx delete mode 100644 packages/app/components/SetStats.tsx delete mode 100644 packages/app/components/StakeCard.tsx delete mode 100644 packages/app/components/SwitchNetwork.tsx delete mode 100644 packages/app/components/TokenInputToggle.tsx delete mode 100644 packages/app/components/WheelPicker/WheelPicker.tsx delete mode 100644 packages/app/components/WheelPicker/WheelPickerItem.tsx delete mode 100644 packages/app/components/WheelPickers.tsx delete mode 100644 packages/app/components/landing/Hero.tsx delete mode 100644 packages/app/components/landing/NetworthCard.tsx delete mode 100644 packages/app/components/landing/Product.tsx delete mode 100644 packages/app/components/landing/Products.tsx delete mode 100644 packages/app/components/landing/TVLCard.tsx delete mode 100644 packages/app/components/staking/PopLockerInteraction.tsx delete mode 100644 packages/app/components/staking/StakeInterface.tsx delete mode 100644 packages/app/components/staking/StakeInterfaceLoader.tsx delete mode 100644 packages/app/components/staking/StakingInteraction.tsx delete mode 100644 packages/app/components/staking/SuccessfulStakingModal.tsx delete mode 100644 packages/app/components/staking/TermsModalContent.tsx delete mode 100644 packages/app/context/actions.tsx delete mode 100644 packages/app/context/store.tsx delete mode 100644 packages/app/helper/ButterDataUtils.tsx delete mode 100644 packages/app/helper/ClaimableBatchUtils.ts delete mode 100644 packages/app/helper/YearnVault.ts delete mode 100644 packages/app/helper/calculateAPY.ts delete mode 100644 packages/app/helper/getAssetValue.ts delete mode 100644 packages/app/helper/getStakingPool.ts delete mode 100644 packages/app/helper/getToken.ts delete mode 100644 packages/app/helper/inputRegex.ts delete mode 100644 packages/app/helper/isDepositDisabled.tsx delete mode 100644 packages/app/helper/modalHelpers.ts delete mode 100644 packages/app/helper/placeholderImageUrl.ts delete mode 100644 packages/app/helper/safeLocalstorageAccess.ts delete mode 100644 packages/app/helper/threeXDataUtils.tsx delete mode 100644 packages/app/helper/toTitleCase.ts delete mode 100644 packages/app/helper/useWeb3Callbacks.ts delete mode 100644 packages/app/helper/verifyEmail.ts delete mode 100644 packages/app/helper/web3Onboard.tsx delete mode 100644 packages/app/hooks/set/useAssetValue.tsx delete mode 100644 packages/app/hooks/set/useBasicIssuanceModule.tsx delete mode 100644 packages/app/hooks/set/useButterBatch.tsx delete mode 100644 packages/app/hooks/set/useButterBatchData.tsx delete mode 100644 packages/app/hooks/set/useButterBatchSample.tsx delete mode 100644 packages/app/hooks/set/useButterBatchZapper.tsx delete mode 100644 packages/app/hooks/set/useButterWhaleData.tsx delete mode 100644 packages/app/hooks/set/useButterWhaleProcessing.tsx delete mode 100644 packages/app/hooks/set/useGetYearnAPY.tsx delete mode 100644 packages/app/hooks/set/useSetComponentAddresses.ts delete mode 100644 packages/app/hooks/set/useSetToken.tsx delete mode 100644 packages/app/hooks/set/useSetTokenTVL.ts delete mode 100644 packages/app/hooks/set/useThreeXBatch.tsx delete mode 100644 packages/app/hooks/set/useThreeXData.tsx delete mode 100644 packages/app/hooks/set/useThreeXWhale.tsx delete mode 100644 packages/app/hooks/set/useThreeXWhaleData.tsx delete mode 100644 packages/app/hooks/set/useThreeXZapper.tsx delete mode 100644 packages/app/hooks/staking/useBalanceAndAllowance.ts delete mode 100644 packages/app/hooks/staking/useGetEarned.ts delete mode 100644 packages/app/hooks/staking/useGetMultipleStakingPools.ts delete mode 100644 packages/app/hooks/staking/useGetStakedBalance.ts delete mode 100644 packages/app/hooks/staking/usePopLocker.ts delete mode 100644 packages/app/hooks/staking/useStakingPool.ts delete mode 100644 packages/app/hooks/tokens/useApproveERC20.ts delete mode 100644 packages/app/hooks/tokens/useERC20.ts delete mode 100644 packages/app/hooks/tokens/useGetMultipleToken.ts delete mode 100644 packages/app/hooks/tokens/useLPTokenAddresses.tsx delete mode 100644 packages/app/hooks/tokens/useMultipleERC20.ts delete mode 100644 packages/app/hooks/tokens/useSetTokenAddresses.tsx delete mode 100644 packages/app/hooks/tokens/useSweetVaultAddresses.tsx delete mode 100644 packages/app/hooks/tokens/useTokenAllowance.ts delete mode 100644 packages/app/hooks/tokens/useTokenBalance.ts delete mode 100644 packages/app/hooks/tokens/useTokenPrices.tsx delete mode 100644 packages/app/hooks/tokens/useTotalTokenSupply.ts delete mode 100644 packages/app/hooks/useAdjustDepositDecimals.tsx delete mode 100644 packages/app/hooks/useAllStakingPools.ts delete mode 100644 packages/app/hooks/useButterIsSupportedOnNetwork.ts delete mode 100644 packages/app/hooks/useChainIdFromUrl.ts delete mode 100644 packages/app/hooks/useChainUrl.ts delete mode 100644 packages/app/hooks/useClaimEscrows.ts delete mode 100644 packages/app/hooks/useClaimStakingReward.ts delete mode 100644 packages/app/hooks/useClickOutside.ts delete mode 100644 packages/app/hooks/useContractMetadata.ts delete mode 100644 packages/app/hooks/useDefaultTokenList.ts delete mode 100644 packages/app/hooks/useDeployment.ts delete mode 100644 packages/app/hooks/useGetUserEscrows.ts delete mode 100644 packages/app/hooks/useIsConnected.tsx delete mode 100644 packages/app/hooks/useNetworkNameFromUrl.tsx delete mode 100644 packages/app/hooks/usePushWithinChain.ts delete mode 100644 packages/app/hooks/useRpcProvider.ts delete mode 100644 packages/app/hooks/useStakingContracts.ts delete mode 100644 packages/app/hooks/useSubscribeToNewsletter.tsx delete mode 100644 packages/app/hooks/useSweetVaults.ts delete mode 100644 packages/app/hooks/useSwitchChainModal.ts delete mode 100644 packages/app/hooks/useThreeCurveVirtualPrice.ts delete mode 100644 packages/app/hooks/useThreePool.ts delete mode 100644 packages/app/hooks/useTransaction.ts delete mode 100644 packages/app/hooks/useVestingEscrow.ts delete mode 100644 packages/app/hooks/useWeb3.ts delete mode 100644 packages/app/hooks/useWindowSize.ts delete mode 100644 packages/app/hooks/wheelPicker/useHandleKeyboard.ts delete mode 100644 packages/app/hooks/wheelPicker/useObserver.ts delete mode 100644 packages/app/hooks/wheelPicker/useScrollAnimation.ts delete mode 100644 packages/app/index.d.ts delete mode 100644 packages/app/jest.config.js delete mode 100644 packages/app/next-env.d.ts delete mode 100644 packages/app/next.config.js delete mode 100644 packages/app/nodemon.json delete mode 100644 packages/app/package.json delete mode 100644 packages/app/pages/[network]/error.tsx delete mode 100644 packages/app/pages/[network]/portfolio.tsx delete mode 100644 packages/app/pages/[network]/set/3x.tsx delete mode 100644 packages/app/pages/[network]/set/butter.tsx delete mode 100644 packages/app/pages/[network]/staking/[id].tsx delete mode 100644 packages/app/pages/[network]/staking/pop.tsx delete mode 100644 packages/app/pages/_app.tsx delete mode 100644 packages/app/pages/index.tsx delete mode 100644 packages/app/postcss.config.js delete mode 100644 packages/app/public/ButterBatchZapperAbi.json delete mode 100644 packages/app/public/android-chrome-192x192.png delete mode 100644 packages/app/public/android-chrome-512x512.png delete mode 100644 packages/app/public/apple-touch-icon.png delete mode 100644 packages/app/public/docs/PopcornMay2022.pdf delete mode 100644 packages/app/public/docs/Popcorn_whitepaper_v1.pdf delete mode 100644 packages/app/public/favicon-16x16.png delete mode 100644 packages/app/public/favicon-32x32.png delete mode 100644 packages/app/public/favicon.ico delete mode 100644 packages/app/public/fonts/Avenir_Next_LT_Pro/AvenirLTPro-Black.woff delete mode 100644 packages/app/public/fonts/Avenir_Next_LT_Pro/AvenirLTPro-Book.woff delete mode 100644 packages/app/public/fonts/Avenir_Next_LT_Pro/AvenirLTPro-Heavy.woff delete mode 100644 packages/app/public/fonts/Avenir_Next_LT_Pro/AvenirLTPro-Light.woff delete mode 100644 packages/app/public/fonts/Avenir_Next_LT_Pro/AvenirLTPro-Medium.woff delete mode 100644 packages/app/public/fonts/Avenir_Next_LT_Pro/AvenirLTPro-Roman.woff delete mode 100644 packages/app/public/fonts/Avenir_Next_LT_Pro/AvenirNextLTPro-Bold.woff delete mode 100644 packages/app/public/fonts/Avenir_Next_LT_Pro/AvenirNextLTPro-Demi.woff delete mode 100644 packages/app/public/fonts/Avenir_Next_LT_Pro/AvenirNextLTPro-It.woff delete mode 100644 packages/app/public/fonts/Avenir_Next_LT_Pro/AvenirNextLTPro-Regular.woff delete mode 100644 packages/app/public/fonts/Inter/inter-v2-latin-200.woff2 delete mode 100644 packages/app/public/fonts/Inter/inter-v2-latin-300.woff2 delete mode 100644 packages/app/public/fonts/Inter/inter-v2-latin-400.woff2 delete mode 100644 packages/app/public/fonts/Inter/inter-v2-latin-500.woff2 delete mode 100644 packages/app/public/fonts/Inter/inter-v2-latin-600.woff2 delete mode 100644 packages/app/public/fonts/Inter/styles.css delete mode 100644 packages/app/public/fonts/KH_Teka/KHTeka-Black.woff delete mode 100644 packages/app/public/fonts/KH_Teka/KHTeka-BlackItalic.woff delete mode 100644 packages/app/public/fonts/KH_Teka/KHTeka-Bold.woff delete mode 100644 packages/app/public/fonts/KH_Teka/KHTeka-BoldItalic.woff delete mode 100644 packages/app/public/fonts/KH_Teka/KHTeka-Light.woff delete mode 100644 packages/app/public/fonts/KH_Teka/KHTeka-LightItalic.woff delete mode 100644 packages/app/public/fonts/KH_Teka/KHTeka-Medium.woff delete mode 100644 packages/app/public/fonts/KH_Teka/KHTeka-MediumItalic.woff delete mode 100644 packages/app/public/fonts/KH_Teka/KHTeka-Regular.woff delete mode 100644 packages/app/public/fonts/KH_Teka/KHTeka-RegularItalic.woff delete mode 100644 packages/app/public/gql/graph.txt delete mode 100644 packages/app/public/gql/mainnetQuery.json delete mode 100644 packages/app/public/gql/polygonQuery.json delete mode 100644 packages/app/public/images/3xHero.svg delete mode 100644 packages/app/public/images/4xImage.svg delete mode 100644 packages/app/public/images/ComingSoonCat.png delete mode 100644 packages/app/public/images/ComingSoonCat.svg delete mode 100644 packages/app/public/images/Cornfield.svg delete mode 100644 packages/app/public/images/Instant Butter_icon.svg delete mode 100644 packages/app/public/images/blackCircle.svg delete mode 100644 packages/app/public/images/bubbleGumWoman.svg delete mode 100644 packages/app/public/images/builtWithLogos/curve.svg delete mode 100644 packages/app/public/images/builtWithLogos/setLogo.svg delete mode 100644 packages/app/public/images/builtWithLogos/synthetix.svg delete mode 100644 packages/app/public/images/builtWithLogos/uniswap.svg delete mode 100644 packages/app/public/images/builtWithLogos/yearn.svg delete mode 100644 packages/app/public/images/butter/Step-1-3X.png delete mode 100644 packages/app/public/images/butter/Step-1.png delete mode 100644 packages/app/public/images/butter/Step-2.png delete mode 100644 packages/app/public/images/butter/Step-3-3X.png delete mode 100644 packages/app/public/images/butter/Step-3.png delete mode 100644 packages/app/public/images/butter/batch-popover.png delete mode 100644 packages/app/public/images/butter/modal-1.png delete mode 100644 packages/app/public/images/butter/modal-2.png delete mode 100644 packages/app/public/images/butter/primary-btn-divider.svg delete mode 100644 packages/app/public/images/butterHero.svg delete mode 100644 packages/app/public/images/catPopVault.svg delete mode 100644 packages/app/public/images/catPopVaultMobile.png delete mode 100644 packages/app/public/images/chartPlaceholder.svg delete mode 100644 packages/app/public/images/claim/Group_842.png delete mode 100644 packages/app/public/images/claim/popover.png delete mode 100644 packages/app/public/images/claimCat.png delete mode 100644 packages/app/public/images/claims-cat.svg delete mode 100644 packages/app/public/images/closeIcon.svg delete mode 100644 packages/app/public/images/comingSoon.svg delete mode 100644 packages/app/public/images/common/primary-btn-divider.png delete mode 100644 packages/app/public/images/do good.svg delete mode 100644 packages/app/public/images/emptyPopcorn.svg delete mode 100644 packages/app/public/images/errorBackground.svg delete mode 100644 packages/app/public/images/farmer.svg delete mode 100644 packages/app/public/images/farmerCat.svg delete mode 100644 packages/app/public/images/fireProductBadge.svg delete mode 100644 packages/app/public/images/g0.svg delete mode 100644 packages/app/public/images/g0Card.svg delete mode 100644 packages/app/public/images/hands.svg delete mode 100644 packages/app/public/images/icons/3crv_icon.png delete mode 100644 packages/app/public/images/icons/BTR.svg delete mode 100644 packages/app/public/images/icons/IconPlay.svg delete mode 100644 packages/app/public/images/icons/POP.svg delete mode 100644 packages/app/public/images/icons/arbLogo.png delete mode 100644 packages/app/public/images/icons/arbitrum.png delete mode 100644 packages/app/public/images/icons/bsc-logo.png delete mode 100644 packages/app/public/images/icons/coins.svg delete mode 100644 packages/app/public/images/icons/crvSEth.png delete mode 100644 packages/app/public/images/icons/dd-arrow.svg delete mode 100644 packages/app/public/images/icons/ethLogo.png delete mode 100644 packages/app/public/images/icons/exchangeIcon.svg delete mode 100644 packages/app/public/images/icons/exchangeIconSingle.svg delete mode 100644 packages/app/public/images/icons/polygonLogo.png delete mode 100644 packages/app/public/images/icons/popLogo.png delete mode 100644 packages/app/public/images/icons/popLogo.svg delete mode 100644 packages/app/public/images/icons/pop_64x64.png delete mode 100644 packages/app/public/images/icons/slippage.png delete mode 100644 packages/app/public/images/icons/tooltip.svg delete mode 100644 packages/app/public/images/icons/walletIcon.svg delete mode 100644 packages/app/public/images/icons/waveEqual.svg delete mode 100644 packages/app/public/images/immunefi.svg delete mode 100644 packages/app/public/images/immunefiCard.svg delete mode 100755 packages/app/public/images/infoIcon.svg delete mode 100755 packages/app/public/images/loadingCat.svg delete mode 100644 packages/app/public/images/lock.svg delete mode 100644 packages/app/public/images/mobileErrorBg.svg delete mode 100644 packages/app/public/images/modalImages/comingSoon.svg delete mode 100644 packages/app/public/images/modalImages/inconsistentNetwork.svg delete mode 100644 packages/app/public/images/modalImages/migrate.svg delete mode 100644 packages/app/public/images/modalImages/mint.svg delete mode 100644 packages/app/public/images/modalImages/redeemed.svg delete mode 100644 packages/app/public/images/modalImages/restake.svg delete mode 100644 packages/app/public/images/modalImages/successfulStake.svg delete mode 100644 packages/app/public/images/modalImages/vestingImage.svg delete mode 100644 packages/app/public/images/nature.png delete mode 100644 packages/app/public/images/newProductBadge.svg delete mode 100644 packages/app/public/images/newsletterAvatar.png delete mode 100644 packages/app/public/images/popcorn-logo-circle-disabled.svg delete mode 100644 packages/app/public/images/popcorn-logo-circle.svg delete mode 100644 packages/app/public/images/popcorn1.svg delete mode 100755 packages/app/public/images/popcorn2.svg delete mode 100644 packages/app/public/images/popx.csv delete mode 100644 packages/app/public/images/portfolio.svg delete mode 100644 packages/app/public/images/rocket.svg delete mode 100644 packages/app/public/images/smiley.svg delete mode 100644 packages/app/public/images/social_cover_image.svg delete mode 100644 packages/app/public/images/stake/lpStaking.png delete mode 100644 packages/app/public/images/stake/restake_image.png delete mode 100644 packages/app/public/images/stake/stake-success-modal.png delete mode 100644 packages/app/public/images/stakingBG.png delete mode 100644 packages/app/public/images/stakingCard.svg delete mode 100644 packages/app/public/images/sweetVaults.svg delete mode 100644 packages/app/public/images/textLogo.png delete mode 100644 packages/app/public/images/tokens/3X.svg delete mode 100644 packages/app/public/images/tokens/3crv.png delete mode 100644 packages/app/public/images/tokens/BTR.svg delete mode 100644 packages/app/public/images/tokens/Group 1104.svg delete mode 100644 packages/app/public/images/tokens/Group 1108.svg delete mode 100644 packages/app/public/images/tokens/RAI.svg delete mode 100644 packages/app/public/images/tokens/ageur.svg delete mode 100644 packages/app/public/images/tokens/boltLogo.svg delete mode 100644 packages/app/public/images/tokens/butter.png delete mode 100644 packages/app/public/images/tokens/clogo.svg delete mode 100644 packages/app/public/images/tokens/crvSeth.png delete mode 100644 packages/app/public/images/tokens/dai.webp delete mode 100644 packages/app/public/images/tokens/eth.png delete mode 100644 packages/app/public/images/tokens/multi-collateral-dai-dai-logo 1.svg delete mode 100644 packages/app/public/images/tokens/peSeth.webp delete mode 100644 packages/app/public/images/tokens/sDiamondLogo.svg delete mode 100644 packages/app/public/images/tokens/sEth.webp delete mode 100644 packages/app/public/images/tokens/sLogo.svg delete mode 100644 packages/app/public/images/tokens/sUSD.png delete mode 100644 packages/app/public/images/tokens/sUnderscore.svg delete mode 100644 packages/app/public/images/tokens/susd 1.svg delete mode 100644 packages/app/public/images/tokens/tether-usdt-logo.svg delete mode 100644 packages/app/public/images/tokens/threeCrv.svg delete mode 100644 packages/app/public/images/tokens/threeX.svg delete mode 100644 packages/app/public/images/tokens/threeX1.svg delete mode 100644 packages/app/public/images/tokens/threeX2.svg delete mode 100644 packages/app/public/images/tokens/threeX3.svg delete mode 100644 packages/app/public/images/tokens/threeX4.svg delete mode 100644 packages/app/public/images/tokens/threeX5.svg delete mode 100644 packages/app/public/images/tokens/threeX6.svg delete mode 100644 packages/app/public/images/tokens/threeX7.svg delete mode 100644 packages/app/public/images/tokens/threeXborderless.png delete mode 100644 packages/app/public/images/tokens/threexBig.svg delete mode 100644 packages/app/public/images/tokens/usd-coin-usdc-logo.svg delete mode 100644 packages/app/public/images/tokens/usdc.webp delete mode 100644 packages/app/public/images/tokens/usdt.svg delete mode 100644 packages/app/public/images/tokens/usdt.webp delete mode 100644 packages/app/public/images/treeRow.svg delete mode 100644 packages/app/public/images/twoFingers.svg delete mode 100644 packages/app/public/images/vaultopen.svg delete mode 100644 packages/app/public/images/wallet.svg delete mode 100644 packages/app/public/images/wallets/metamask.svg delete mode 100755 packages/app/public/images/wallets/walletConnect.svg delete mode 100644 packages/app/public/images/yellowCircle.svg delete mode 100644 packages/app/public/images/zokyo.svg delete mode 100644 packages/app/public/images/zokyoCard.svg delete mode 100644 packages/app/public/manifest.json delete mode 100644 packages/app/public/site.webmanifest delete mode 100644 packages/app/setupTests.js delete mode 100644 packages/app/styles/globals.css delete mode 100644 packages/app/tailwind.config.js delete mode 100644 packages/app/tsconfig.json delete mode 100644 packages/app/tsconfig.server.json delete mode 100644 packages/app/types.d.ts rename packages/{app => components}/components/InfoIconWithTooltip.tsx (100%) rename packages/{app/components/Common => components/components}/MobileCardSlider.tsx (87%) rename packages/{app => components}/components/NetworkSticker.tsx (51%) rename packages/{app/components/Rewards => components/components}/NotAvailable.tsx (100%) rename packages/{app/components/BatchButter => components/components}/PseudoRadioButton.tsx (75%) rename packages/{app/components/BatchButter => components/components}/SearchToken.tsx (95%) rename packages/{app/components/BatchButter => components/components}/SelectToken.tsx (95%) rename packages/{app/components/Common => components/components}/SliderContainer.tsx (100%) rename packages/{app => components}/components/StakingTermsAndConditions.tsx (93%) rename packages/{app/components/Common => components/components}/StatusWithLabel.tsx (83%) rename packages/{app => components}/components/TertiaryActionButton.tsx (100%) rename packages/{app => components}/components/TokenIcon.tsx (88%) create mode 100644 packages/components/hooks/useChainIdFromUrl.ts create mode 100644 packages/components/hooks/useDefaultTokenList.ts rename packages/{app/hooks/useNetworkName.tsx => components/hooks/useNetworkName.ts} (84%) rename packages/{app/hooks/useNetWorth.ts => components/hooks/useNetworth.ts} (95%) rename packages/{app/hooks/usePoolTVL.ts => components/hooks/usePoolTvl.ts} (58%) rename packages/{app/hooks/useProductLinks.tsx => components/hooks/useProductLinks.ts} (61%) rename packages/{app => components}/hooks/useRestakeAlert.tsx (68%) rename packages/{app/hooks/staking => components/hooks}/useStakingTVL.ts (56%) rename packages/{app => greenfield-app}/components/OfacCheck.tsx (90%) rename packages/{app => greenfield-app}/components/landing/SecuritySection.tsx (93%) rename packages/{app => greenfield-app}/components/staking/VestingRecordDropDown.tsx (100%) rename packages/{app/components/Rewards => greenfield-app/components/vesting}/RewardSummaryCard.tsx (93%) delete mode 100644 packages/greenfield-app/hooks/vesting/useEscrows.tsx delete mode 100644 packages/greenfield-app/hooks/xPopRedemption/useXPOPRedemption.ts delete mode 100644 packages/greenfield-app/pages/[network]/set/3x.tsx delete mode 100644 packages/greenfield-app/pages/[network]/set/butter.tsx diff --git a/package.json b/package.json index 434cd4d7..36ef25b0 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,6 @@ "build": "yarn lerna run build", "app:build": "cd packages/hardhat; yarn build; cd ../app; yarn build", "grants:build": "cd packages/hardhat; yarn build; cd ../grants; yarn build", - "app:start": "yarn lerna run --scope @popcorn/app start", - "start": "yarn lerna run --scope @popcorn/app start", "pretify": "prettier --write .", "test": "yarn lerna run test", "nuke": "rm -r node_modules; for d in packages/*/node_modules; do echo $d; rm -r $d; done; for d in packages/*/.next; do echo $d; rm -r $d; done", diff --git a/packages/app/.gitignore b/packages/app/.gitignore deleted file mode 100644 index 884409c1..00000000 --- a/packages/app/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Dependency directories -node_modules/ - -# next.js build output -.next - -# production server output -dist - -out - -types -.env diff --git a/packages/app/.nvmrc b/packages/app/.nvmrc deleted file mode 100644 index ebea32b6..00000000 --- a/packages/app/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -v14.15.1 diff --git a/packages/app/.prettierignore b/packages/app/.prettierignore deleted file mode 100644 index bfb39291..00000000 --- a/packages/app/.prettierignore +++ /dev/null @@ -1,14 +0,0 @@ -# Dependency directories -node_modules/ - -# next.js build output -.next - -# production server output -dist - -out -build -types -.env -__test__ \ No newline at end of file diff --git a/packages/app/LottieAnimations/loader.json b/packages/app/LottieAnimations/loader.json deleted file mode 100644 index f7e0f1a7..00000000 --- a/packages/app/LottieAnimations/loader.json +++ /dev/null @@ -1,1006 +0,0 @@ -{ - "v": "4.8.0", - "meta": { - "g": "LottieFiles AE 3.0.0", - "a": "", - "k": "", - "d": "", - "tc": "" - }, - "fr": 60, - "ip": 0, - "op": 179, - "w": 1080, - "h": 1080, - "nm": "1080x1080_Animation Symbol_White", - "ddd": 0, - "assets": [], - "layers": [ - { - "ddd": 0, - "ind": 1, - "ty": 4, - "nm": "Layer 2 Outlines", - "sr": 1, - "ks": { - "o": { - "a": 1, - "k": [ - { - "i": { - "x": [0], - "y": [1] - }, - "o": { - "x": [1], - "y": [0] - }, - "t": 5, - "s": [0] - }, - { - "t": 15, - "s": [100] - } - ], - "ix": 11 - }, - "r": { - "a": 0, - "k": 0, - "ix": 10 - }, - "p": { - "a": 0, - "k": [-0.25, 1080.75, 0], - "ix": 2 - }, - "a": { - "a": 0, - "k": [0, 541, 0], - "ix": 1 - }, - "s": { - "a": 1, - "k": [ - { - "i": { - "x": [0, 0, 0], - "y": [1, 1, 1] - }, - "o": { - "x": [1, 1, 1], - "y": [0, 0, 0] - }, - "t": 0, - "s": [50, 50, 100] - }, - { - "t": 30, - "s": [100, 100, 100] - } - ], - "ix": 6 - } - }, - "ao": 0, - "shapes": [ - { - "ty": "gr", - "it": [ - { - "ind": 0, - "ty": "sh", - "ix": 1, - "ks": { - "a": 0, - "k": { - "i": [ - [0, 149.117], - [149.117, 0], - [0, -149.117], - [-149.117, 0] - ], - "o": [ - [0, -149.117], - [-149.117, 0], - [0, 149.117], - [149.117, 0] - ], - "v": [ - [270, 0], - [0, -270], - [-270, 0], - [0, 270] - ], - "c": true - }, - "ix": 2 - }, - "nm": "Path 1", - "mn": "ADBE Vector Shape - Group", - "hd": false - }, - { - "ty": "fl", - "c": { - "a": 0, - "k": [0, 0, 0, 1], - "ix": 4 - }, - "o": { - "a": 0, - "k": 100, - "ix": 5 - }, - "r": 1, - "bm": 0, - "nm": "Fill 1", - "mn": "ADBE Vector Graphic - Fill", - "hd": false - }, - { - "ty": "tr", - "p": { - "a": 0, - "k": [270.25, 270.25], - "ix": 2 - }, - "a": { - "a": 0, - "k": [0, 0], - "ix": 1 - }, - "s": { - "a": 0, - "k": [100, 100], - "ix": 3 - }, - "r": { - "a": 0, - "k": 0, - "ix": 6 - }, - "o": { - "a": 0, - "k": 100, - "ix": 7 - }, - "sk": { - "a": 0, - "k": 0, - "ix": 4 - }, - "sa": { - "a": 0, - "k": 0, - "ix": 5 - }, - "nm": "Transform" - } - ], - "nm": "Group 1", - "np": 2, - "cix": 2, - "bm": 0, - "ix": 1, - "mn": "ADBE Vector Group", - "hd": false - } - ], - "ip": 0, - "op": 1800, - "st": 0, - "bm": 0 - }, - { - "ddd": 0, - "ind": 2, - "ty": 4, - "nm": "Layer 7 Outlines", - "sr": 1, - "ks": { - "o": { - "a": 1, - "k": [ - { - "i": { - "x": [0], - "y": [1] - }, - "o": { - "x": [1], - "y": [0] - }, - "t": 15, - "s": [0] - }, - { - "t": 25, - "s": [100] - } - ], - "ix": 11 - }, - "r": { - "a": 0, - "k": 0, - "ix": 10 - }, - "p": { - "a": 1, - "k": [ - { - "i": { - "x": 0, - "y": 1 - }, - "o": { - "x": 1, - "y": 0 - }, - "t": 10, - "s": [304.831, 775.39, 0], - "to": [10, -10, 0], - "ti": [-10, 10, 0] - }, - { - "t": 40, - "s": [348.831, 731.39, 0] - } - ], - "ix": 2 - }, - "a": { - "a": 0, - "k": [0, 488, 0], - "ix": 1 - }, - "s": { - "a": 1, - "k": [ - { - "i": { - "x": [0, 0, 0], - "y": [1, 1, 1] - }, - "o": { - "x": [1, 1, 1], - "y": [0, 0, 0] - }, - "t": 10, - "s": [80, 80, 100] - }, - { - "t": 40, - "s": [100, 100, 100] - } - ], - "ix": 6 - } - }, - "ao": 0, - "shapes": [ - { - "ty": "gr", - "it": [ - { - "ind": 0, - "ty": "sh", - "ix": 1, - "ks": { - "a": 0, - "k": { - "i": [ - [0, 0], - [105.442, 105.442], - [105.442, -105.441] - ], - "o": [ - [105.442, -105.442], - [-105.442, -105.441], - [0, 0] - ], - "v": [ - [138.198, 243.64], - [138.198, -138.198], - [-243.64, -138.198] - ], - "c": true - }, - "ix": 2 - }, - "nm": "Path 1", - "mn": "ADBE Vector Shape - Group", - "hd": false - }, - { - "ty": "fl", - "c": { - "a": 0, - "k": [0, 0, 0, 1], - "ix": 4 - }, - "o": { - "a": 0, - "k": 100, - "ix": 5 - }, - "r": 1, - "bm": 0, - "nm": "Fill 1", - "mn": "ADBE Vector Graphic - Fill", - "hd": false - }, - { - "ty": "tr", - "p": { - "a": 0, - "k": [243.89, 243.889], - "ix": 2 - }, - "a": { - "a": 0, - "k": [0, 0], - "ix": 1 - }, - "s": { - "a": 0, - "k": [100, 100], - "ix": 3 - }, - "r": { - "a": 0, - "k": 0, - "ix": 6 - }, - "o": { - "a": 0, - "k": 100, - "ix": 7 - }, - "sk": { - "a": 0, - "k": 0, - "ix": 4 - }, - "sa": { - "a": 0, - "k": 0, - "ix": 5 - }, - "nm": "Transform" - } - ], - "nm": "Group 1", - "np": 2, - "cix": 2, - "bm": 0, - "ix": 1, - "mn": "ADBE Vector Group", - "hd": false - } - ], - "ip": 0, - "op": 1800, - "st": 0, - "bm": 0 - }, - { - "ddd": 0, - "ind": 3, - "ty": 4, - "nm": "Layer 3 Outlines", - "sr": 1, - "ks": { - "o": { - "a": 1, - "k": [ - { - "i": { - "x": [0], - "y": [1] - }, - "o": { - "x": [1], - "y": [0] - }, - "t": 15, - "s": [0] - }, - { - "t": 25, - "s": [100] - } - ], - "ix": 11 - }, - "r": { - "a": 0, - "k": 0, - "ix": 10 - }, - "p": { - "a": 1, - "k": [ - { - "i": { - "x": 0, - "y": 1 - }, - "o": { - "x": 1, - "y": 0 - }, - "t": 35, - "s": [802.721, 802.721, 0], - "to": [10, 10, 0], - "ti": [-10, -10, 0] - }, - { - "t": 70, - "s": [862.721, 862.721, 0] - } - ], - "ix": 2 - }, - "a": { - "a": 0, - "k": [243.889, 243.89, 0], - "ix": 1 - }, - "s": { - "a": 1, - "k": [ - { - "i": { - "x": [0.711, 0.711, 0.711], - "y": [1.015, 1.015, 1] - }, - "o": { - "x": [0.379, 0.379, 0.379], - "y": [0, 0, 0] - }, - "t": 10, - "s": [80, 80, 100] - }, - { - "i": { - "x": [-0.124, -0.124, -0.124], - "y": [1, 1, 1] - }, - "o": { - "x": [0.858, 0.858, 0.858], - "y": [0.074, 0.074, 0] - }, - "t": 15, - "s": [70, 70, 100] - }, - { - "t": 40, - "s": [100, 100, 100] - } - ], - "ix": 6 - } - }, - "ao": 0, - "shapes": [ - { - "ty": "gr", - "it": [ - { - "ind": 0, - "ty": "sh", - "ix": 1, - "ks": { - "a": 0, - "k": { - "i": [ - [0, 0], - [-105.442, 105.442], - [105.441, 105.442] - ], - "o": [ - [105.442, 105.442], - [105.441, -105.442], - [0, 0] - ], - "v": [ - [-230.459, 151.378], - [151.379, 151.378], - [151.379, -230.46] - ], - "c": true - }, - "ix": 2 - }, - "nm": "Path 1", - "mn": "ADBE Vector Shape - Group", - "hd": false - }, - { - "ty": "fl", - "c": { - "a": 0, - "k": [0, 0, 0, 1], - "ix": 4 - }, - "o": { - "a": 0, - "k": 100, - "ix": 5 - }, - "r": 1, - "bm": 0, - "nm": "Fill 1", - "mn": "ADBE Vector Graphic - Fill", - "hd": false - }, - { - "ty": "tr", - "p": { - "a": 0, - "k": [230.709, 230.71], - "ix": 2 - }, - "a": { - "a": 0, - "k": [0, 0], - "ix": 1 - }, - "s": { - "a": 0, - "k": [100, 100], - "ix": 3 - }, - "r": { - "a": 0, - "k": 0, - "ix": 6 - }, - "o": { - "a": 0, - "k": 100, - "ix": 7 - }, - "sk": { - "a": 0, - "k": 0, - "ix": 4 - }, - "sa": { - "a": 0, - "k": 0, - "ix": 5 - }, - "nm": "Transform" - } - ], - "nm": "Group 1", - "np": 4, - "cix": 2, - "bm": 0, - "ix": 1, - "mn": "ADBE Vector Group", - "hd": false - } - ], - "ip": 0, - "op": 1800, - "st": 0, - "bm": 0 - }, - { - "ddd": 0, - "ind": 4, - "ty": 4, - "nm": "Layer 5 Outlines", - "sr": 1, - "ks": { - "o": { - "a": 1, - "k": [ - { - "i": { - "x": [0], - "y": [1] - }, - "o": { - "x": [1], - "y": [0] - }, - "t": 15, - "s": [0] - }, - { - "t": 25, - "s": [100] - } - ], - "ix": 11 - }, - "r": { - "a": 0, - "k": 0, - "ix": 10 - }, - "p": { - "a": 1, - "k": [ - { - "i": { - "x": 0, - "y": 1 - }, - "o": { - "x": 1, - "y": 0 - }, - "t": 35, - "s": [802.721, 277.279, 0], - "to": [10, -10, 0], - "ti": [-10, 10, 0] - }, - { - "t": 70, - "s": [862.721, 217.279, 0] - } - ], - "ix": 2 - }, - "a": { - "a": 0, - "k": [243.89, 243.889, 0], - "ix": 1 - }, - "s": { - "a": 1, - "k": [ - { - "i": { - "x": [0.711, 0.711, 0.711], - "y": [1.015, 1.015, 1] - }, - "o": { - "x": [0.379, 0.379, 0.379], - "y": [0, 0, 0] - }, - "t": 10, - "s": [80, 80, 100] - }, - { - "i": { - "x": [-0.124, -0.124, -0.124], - "y": [1, 1, 1] - }, - "o": { - "x": [0.858, 0.858, 0.858], - "y": [0.074, 0.074, 0] - }, - "t": 15, - "s": [70, 70, 100] - }, - { - "t": 40, - "s": [100, 100, 100] - } - ], - "ix": 6 - } - }, - "ao": 0, - "shapes": [ - { - "ty": "gr", - "it": [ - { - "ind": 0, - "ty": "sh", - "ix": 1, - "ks": { - "a": 0, - "k": { - "i": [ - [0, 0], - [105.442, 105.442], - [105.442, -105.441] - ], - "o": [ - [105.442, -105.442], - [-105.442, -105.441], - [0, 0] - ], - "v": [ - [151.378, 230.459], - [151.378, -151.379], - [-230.46, -151.379] - ], - "c": true - }, - "ix": 2 - }, - "nm": "Path 1", - "mn": "ADBE Vector Shape - Group", - "hd": false - }, - { - "ty": "fl", - "c": { - "a": 0, - "k": [0, 0, 0, 1], - "ix": 4 - }, - "o": { - "a": 0, - "k": 100, - "ix": 5 - }, - "r": 1, - "bm": 0, - "nm": "Fill 1", - "mn": "ADBE Vector Graphic - Fill", - "hd": false - }, - { - "ty": "tr", - "p": { - "a": 0, - "k": [230.71, 257.07], - "ix": 2 - }, - "a": { - "a": 0, - "k": [0, 0], - "ix": 1 - }, - "s": { - "a": 0, - "k": [100, 100], - "ix": 3 - }, - "r": { - "a": 0, - "k": 0, - "ix": 6 - }, - "o": { - "a": 0, - "k": 100, - "ix": 7 - }, - "sk": { - "a": 0, - "k": 0, - "ix": 4 - }, - "sa": { - "a": 0, - "k": 0, - "ix": 5 - }, - "nm": "Transform" - } - ], - "nm": "Group 1", - "np": 4, - "cix": 2, - "bm": 0, - "ix": 1, - "mn": "ADBE Vector Group", - "hd": false - } - ], - "ip": 0, - "op": 1800, - "st": 0, - "bm": 0 - }, - { - "ddd": 0, - "ind": 5, - "ty": 4, - "nm": "Layer 6 Outlines", - "sr": 1, - "ks": { - "o": { - "a": 1, - "k": [ - { - "i": { - "x": [0], - "y": [1] - }, - "o": { - "x": [1], - "y": [0] - }, - "t": 15, - "s": [0] - }, - { - "t": 25, - "s": [100] - } - ], - "ix": 11 - }, - "r": { - "a": 0, - "k": 0, - "ix": 10 - }, - "p": { - "a": 1, - "k": [ - { - "i": { - "x": 0, - "y": 1 - }, - "o": { - "x": 1, - "y": 0 - }, - "t": 35, - "s": [277.279, 277.279, 0], - "to": [-10, -10, 0], - "ti": [10, 10, 0] - }, - { - "t": 70, - "s": [217.279, 217.279, 0] - } - ], - "ix": 2 - }, - "a": { - "a": 0, - "k": [243.889, 243.89, 0], - "ix": 1 - }, - "s": { - "a": 1, - "k": [ - { - "i": { - "x": [0.711, 0.711, 0.711], - "y": [1.015, 1.015, 1] - }, - "o": { - "x": [0.379, 0.379, 0.379], - "y": [0, 0, 0] - }, - "t": 10, - "s": [80, 80, 100] - }, - { - "i": { - "x": [-0.124, -0.124, -0.124], - "y": [1, 1, 1] - }, - "o": { - "x": [0.858, 0.858, 0.858], - "y": [0.074, 0.074, 0] - }, - "t": 15, - "s": [70, 70, 100] - }, - { - "t": 40, - "s": [100, 100, 100] - } - ], - "ix": 6 - } - }, - "ao": 0, - "shapes": [ - { - "ty": "gr", - "it": [ - { - "ind": 0, - "ty": "sh", - "ix": 1, - "ks": { - "a": 0, - "k": { - "i": [ - [0, 0], - [105.442, -105.442], - [-105.441, -105.442] - ], - "o": [ - [-105.442, -105.442], - [-105.441, 105.442], - [0, 0] - ], - "v": [ - [230.459, -151.378], - [-151.379, -151.378], - [-151.379, 230.46] - ], - "c": true - }, - "ix": 2 - }, - "nm": "Path 1", - "mn": "ADBE Vector Shape - Group", - "hd": false - }, - { - "ty": "fl", - "c": { - "a": 0, - "k": [0, 0, 0, 1], - "ix": 4 - }, - "o": { - "a": 0, - "k": 100, - "ix": 5 - }, - "r": 1, - "bm": 0, - "nm": "Fill 1", - "mn": "ADBE Vector Graphic - Fill", - "hd": false - }, - { - "ty": "tr", - "p": { - "a": 0, - "k": [257.07, 257.07], - "ix": 2 - }, - "a": { - "a": 0, - "k": [0, 0], - "ix": 1 - }, - "s": { - "a": 0, - "k": [100, 100], - "ix": 3 - }, - "r": { - "a": 0, - "k": 0, - "ix": 6 - }, - "o": { - "a": 0, - "k": 100, - "ix": 7 - }, - "sk": { - "a": 0, - "k": 0, - "ix": 4 - }, - "sa": { - "a": 0, - "k": 0, - "ix": 5 - }, - "nm": "Transform" - } - ], - "nm": "Group 1", - "np": 4, - "cix": 2, - "bm": 0, - "ix": 1, - "mn": "ADBE Vector Group", - "hd": false - } - ], - "ip": 0, - "op": 1800, - "st": 0, - "bm": 0 - } - ], - "markers": [] -} diff --git a/packages/app/Procfile b/packages/app/Procfile deleted file mode 100644 index 709e0a25..00000000 --- a/packages/app/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: yarn start \ No newline at end of file diff --git a/packages/app/README.md b/packages/app/README.md deleted file mode 100644 index aeeffd03..00000000 --- a/packages/app/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# @popcorn/app - -Next.js Typescript application. diff --git a/packages/app/__test__/index.test.tsx b/packages/app/__test__/index.test.tsx deleted file mode 100644 index 7f2827b9..00000000 --- a/packages/app/__test__/index.test.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { render, screen } from "@testing-library/react"; -import React from "react"; -import Index from "../pages/index"; - -describe("Index page", () => { - it("should render elements properly", () => { - render(); - - expect(screen.getByText("Custom internal button")).toBeInTheDocument(); - expect(screen.getByText("Button from ui")).toBeInTheDocument(); - }); -}); diff --git a/packages/app/abis/ERC20.json b/packages/app/abis/ERC20.json deleted file mode 100644 index 58236490..00000000 --- a/packages/app/abis/ERC20.json +++ /dev/null @@ -1,293 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "initialSupply", - "type": "uint256" - }, - { - "internalType": "string", - "name": "tokenName", - "type": "string" - }, - { - "internalType": "string", - "name": "tokenSymbol", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/app/components/BatchButter/BatchProgress.tsx b/packages/app/components/BatchButter/BatchProgress.tsx deleted file mode 100644 index 2ee1e87f..00000000 --- a/packages/app/components/BatchButter/BatchProgress.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { InfoIconWithTooltip } from "@popcorn/app/components/InfoIconWithTooltip"; -import { BigNumber, constants } from "ethers"; -import { formatUnits, parseEther } from "ethers/lib/utils"; -import { useEffect, useState } from "react"; - -interface BatchProgressProps { - batchAmount: BigNumber; - threshold: BigNumber; -} -6; -const BatchProgress: React.FC = ({ batchAmount, threshold }) => { - const [progress, setProgress] = useState(0); - - useEffect(() => { - setProgress(100 - parseInt(formatUnits(batchAmount.mul(parseEther("100")).div(threshold)))); - }, [batchAmount]); - - return ( -
-
-
-
-

- {batchAmount.eq(constants.Zero) - ? 0 - : (Number(formatUnits(batchAmount)) / 1000).toFixed(Number(formatUnits(batchAmount, 18)) > 1000 ? 0 : 1)} - k -

-
-
-
-
-
-

Batch

- -
-

- Your mint/redeem deposit will be processed with the next batch. -

-
-
-
- ); -}; -export default BatchProgress; diff --git a/packages/app/components/BatchButter/ButterTokenInput.tsx b/packages/app/components/BatchButter/ButterTokenInput.tsx deleted file mode 100644 index 9737256c..00000000 --- a/packages/app/components/BatchButter/ButterTokenInput.tsx +++ /dev/null @@ -1,206 +0,0 @@ -import { formatEther, formatUnits } from "@ethersproject/units"; -import { ChainId, formatAndRoundBigNumber, numberToBigNumber } from "@popcorn/utils"; -import { SelectedToken, Token } from "@popcorn/utils/types"; -import { BigNumber, constants } from "ethers"; -import { escapeRegExp, inputRegex } from "@popcorn/app/helper/inputRegex"; -import { useDeployment } from "@popcorn/app/hooks/useDeployment"; -import { useEffect, useRef, useState } from "react"; -import { CheckMarkToggleWithInfo } from "@popcorn/app/components/BatchButter/CheckMarkToggleWithInfo"; -import SelectToken from "@popcorn/app/components/BatchButter/SelectToken"; - -import InputTokenWithError from "@popcorn/components/components/InputTokenWithError"; - -export enum Pages { - "butter", - "instantButter", - "threeX", - "instantThreeX", -} - -export const pageToDisplayToken = (page: Pages) => { - switch (page) { - case Pages.butter: - case Pages.instantButter: - return { input: "3CRV", output: "BTR" }; - case Pages.threeX: - case Pages.instantThreeX: - return { input: "USDC", output: "3X" }; - } -}; - -export interface ButterTokenInputProps { - options: Token[]; - selectToken?: (token: Token) => void; - selectedToken: SelectedToken; - depositAmount: BigNumber; - setDepositAmount: (amount: BigNumber) => void; - depositDisabled: { disabled: boolean; errorMessage: string }; - hasUnclaimedBalances?: boolean; - useUnclaimedDeposits?: boolean; - setUseUnclaimedDeposits?: (toggle: boolean) => void; - withdrawMode: boolean; - setWithdrawMode: (toggle: boolean) => void; - page: Pages; - instant: boolean; - chainId: ChainId; - disabled?: boolean; -} - -const ButterTokenInput: React.FC = ({ - options, - selectToken, - selectedToken, - depositAmount, - setDepositAmount, - depositDisabled, - hasUnclaimedBalances, - useUnclaimedDeposits, - setUseUnclaimedDeposits, - withdrawMode, - setWithdrawMode, - page, - instant, - chainId, -}) => { - const addr = useDeployment(chainId); - - const [estimatedAmount, setEstimatedAmount] = useState(""); - - const displayAmount = depositAmount.isZero() - ? "" - : formatUnits(depositAmount || "0", selectedToken?.input?.decimals || 18); - const ref = useRef(displayAmount); - - useEffect(() => { - if (displayAmount !== ref.current) { - ref.current = ref.current.includes(".") ? displayAmount : displayAmount.split(".")[0]; - } - }, [ref, displayAmount]); - - const onUpdate = (nextUserInput: string) => { - if (nextUserInput === "" || inputRegex.test(escapeRegExp(nextUserInput))) { - setDepositAmount(numberToBigNumber(nextUserInput, selectedToken.input.decimals)), (ref.current = nextUserInput); - } - }; - - useEffect(() => { - if (depositAmount.eq(constants.Zero)) { - setEstimatedAmount(""); - } else { - calcOutputAmountsFromInput(depositAmount); - } - }, [depositAmount]); - - function calcOutputAmountsFromInput(value: BigNumber): void { - setEstimatedAmount( - formatAndRoundBigNumber(value.mul(selectedToken.input.price).div(selectedToken.output.price), 18), - ); - } - - const useUnclaimedDepositsisDisabled = (): boolean => { - const keys = page === Pages.threeX ? [addr.usdc, addr.threeX] : [addr.threeCrv, addr.butter]; - return selectedToken?.input?.address ? !keys.includes(selectedToken.input.address) : true; - }; - - return ( - <> -
-
-

{withdrawMode ? "Redeem Amount" : "Deposit Amount"}

-
- { - onUpdate(e.currentTarget.value.replace(/,/g, ".")); - }} - onMaxClick={() => { - const maxAmount = useUnclaimedDeposits - ? selectedToken?.input?.claimableBalance - : selectedToken?.input?.balance; - calcOutputAmountsFromInput(maxAmount); - setDepositAmount(maxAmount); - ref.current = Number(formatEther(maxAmount)).toFixed(3); - }} - errorMessage={depositDisabled?.disabled && depositDisabled?.errorMessage} - value={ref.current} - allowSelection={!withdrawMode} - selectedToken={selectedToken?.input} - tokenList={options?.filter( - (option) => - !(withdrawMode ? [addr.threeCrv, addr.usdc] : [addr.butter, addr.threeX]).includes(option.address), - )} - onSelectToken={selectToken} - /> - - {[Pages.threeX, Pages.butter].includes(page) && hasUnclaimedBalances && !useUnclaimedDepositsisDisabled() && ( - { - setEstimatedAmount("0"); - setDepositAmount(constants.Zero); - setUseUnclaimedDeposits(!useUnclaimedDeposits); - }} - infoTitle="About Unclaimed Balances" - infoText={`When a batch is minted but the ${ - pageToDisplayToken(page).output - } has not been claimed yet, it can be redeemed without having to claim it first. By checking “use unclaimed balances” you will be able to redeem unclaimed balances of ${ - pageToDisplayToken(page).output - }. This process applies also for unclaimed ${pageToDisplayToken(page).input}, which can be converted to ${ - pageToDisplayToken(page).output - } without having to claim it.`} - label="Use only unclaimed balances" - className="pb-4" - /> - )} -
-
- -
-

{`Estimated ${selectedToken?.output?.symbol} Amount`}

-
-
- - ![addr.butter, addr.threeX].includes(option.address))} - selectToken={selectToken} - /> -
-
-
- - ); -}; -export default ButterTokenInput; diff --git a/packages/app/components/BatchButter/CheckMarkToggleWithInfo.tsx b/packages/app/components/BatchButter/CheckMarkToggleWithInfo.tsx deleted file mode 100644 index 8562998b..00000000 --- a/packages/app/components/BatchButter/CheckMarkToggleWithInfo.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { InfoIconWithModal } from "@popcorn/app/components/InfoIconWithModal"; -import { ChangeEventHandler } from "react"; - -export function CheckMarkToggleWithInfo({ - disabled = false, - value, - infoText, - infoTitle, - label, - onChange, - image, - className, -}: { - disabled?: boolean; - value: boolean; - onChange: ChangeEventHandler; - infoTitle: string; - infoText: string; - label: string; - image?: React.ReactElement; - className?: string; -}) { - return ( -
- -
- -

{infoText}

-
-
-
- ); -} diff --git a/packages/app/components/BatchButter/ClaimableBatch.tsx b/packages/app/components/BatchButter/ClaimableBatch.tsx deleted file mode 100644 index 812b7561..00000000 --- a/packages/app/components/BatchButter/ClaimableBatch.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import { AccountBatch, BatchType } from "@popcorn/utils/src/types"; -import { InfoIconWithModal } from "@popcorn/app/components/InfoIconWithModal"; -import MainActionButton from "@popcorn/app/components/MainActionButton"; -import TertiaryActionButton from "@popcorn/app/components/TertiaryActionButton"; -import { formatBatchInputToken, formatBatchOutputToken } from "@popcorn/app/helper/ClaimableBatchUtils"; -export interface BatchProps { - batch: AccountBatch; - handleClaimAndStake: (batch: AccountBatch) => void; - handleClaim: (batch: AccountBatch) => void; - handleWithdraw: (batch: AccountBatch) => void; - isThreeX?: boolean; -} - -const ClaimableBatch: React.FC = ({ - batch, - handleClaimAndStake, - handleClaim, - handleWithdraw, - isThreeX = false, -}) => { - const splitTokenLabel = (value: string) => { - const split = value.split(" "); - - return { - value: split[0], - token: split[1], - }; - }; - return ( - - -

Deposited

-
-

- { - splitTokenLabel( - formatBatchInputToken(batch.accountSuppliedTokenBalance, batch.batchType === BatchType.Mint, isThreeX), - ).value - } - - {" "} - { - splitTokenLabel( - formatBatchInputToken( - batch.accountSuppliedTokenBalance, - batch.batchType === BatchType.Mint, - isThreeX, - ), - ).token - } - -

- {!isThreeX && batch.batchType === BatchType.Mint && ( -
- -

- Your stablecoins have been swapped into 3CRV in order to mint BTR. For this reason you see a 3CRV - balance here. -

-
-
- )} -
- - -

Claimable

-

- { - splitTokenLabel( - formatBatchOutputToken(batch.accountClaimableTokenBalance, batch.batchType === BatchType.Mint, isThreeX), - ).value - }{" "} - - { - splitTokenLabel( - formatBatchOutputToken( - batch.accountClaimableTokenBalance, - batch.batchType === BatchType.Mint, - isThreeX, - ), - ).token - } - -

- - - {batch.claimable && batch.batchType === BatchType.Mint ? ( -
-
- handleClaimAndStake(batch)} /> -
-
- handleClaim(batch)} /> -
-
- ) : ( -
- (batch.claimable ? handleClaim(batch) : handleWithdraw(batch))} - /> -
- )} - - - ); -}; -export default ClaimableBatch; diff --git a/packages/app/components/BatchButter/ClaimableBatches.tsx b/packages/app/components/BatchButter/ClaimableBatches.tsx deleted file mode 100644 index d1d436b1..00000000 --- a/packages/app/components/BatchButter/ClaimableBatches.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import { AccountBatch, BatchType, Token } from "@popcorn/utils/src/types"; -import PopUpModal from "@popcorn/components/components/Modal/PopUpModal"; -import { setSingleActionModal } from "@popcorn/components/context/actions"; -import { store } from "@popcorn/components/context/store"; -import useWindowSize from "@popcorn/app/hooks/useWindowSize"; -import Image from "next/image"; -import { useContext, useState } from "react"; -import ClaimableBatch from "@popcorn/app/components/BatchButter/ClaimableBatch"; -import EmptyClaimableBatch from "@popcorn/app/components/BatchButter/EmptyClaimableBatch"; -import MobileClaimableBatch from "@popcorn/app/components/BatchButter/MobileClaimableBatch"; -import MobileEmptyClaimableBatches from "@popcorn/app/components/BatchButter/MobileEmptyClaimableBatches"; -import ZapModal from "@popcorn/app/components/BatchButter/ZapModal"; - -interface ClaimableBatchesProps { - options: Token[]; - slippage: number; - setSlippage: (slippage: number) => void; - batches: AccountBatch[]; - claim: Function; - claimAndStake: Function; - withdraw: Function; - isThreeX?: boolean; -} - -const ClaimableBatches: React.FC = ({ - options, - slippage, - setSlippage, - batches, - claim, - claimAndStake, - withdraw, - isThreeX = false, -}) => { - const { dispatch } = useContext(store); - const { width: windowWidth } = useWindowSize(); - const [currentBatch, setCurrentBatch] = useState({} as AccountBatch); - const [handleClaimPopup, setHandleClaimPopup] = useState(false); - - const renderZapModal = (batch: AccountBatch, isWithdraw: boolean = false) => { - return ( - { - dispatch(setSingleActionModal(false)); - setHandleClaimPopup(false); - }} - withdraw={withdraw} - claim={claim} - batchId={batch.batchId ?? "0"} - withdrawAmount={batch.accountSuppliedTokenBalance} - isWithdraw={isWithdraw} - /> - ); - }; - - function handleClaim(batch: AccountBatch) { - if (batch.batchType === BatchType.Mint) { - claim(batch.batchId); - } - if (batch.batchType === BatchType.Redeem) { - if (windowWidth > 768) { - dispatch( - setSingleActionModal({ - image: default token icon, - title: "Claim", - children: ( -
-

Choose an output token

- {renderZapModal(batch)} -
- ), - onDismiss: { - onClick: () => dispatch(setSingleActionModal(false)), - }, - }), - ); - } else { - setCurrentBatch(batch); - setHandleClaimPopup(true); - } - } - } - - function handleWithdraw(batch: AccountBatch) { - if (batch.batchType === BatchType.Mint) { - dispatch( - setSingleActionModal({ - image: default token icon, - title: "Choose an Output Token", - children: <>{renderZapModal(batch, true)}, - onDismiss: { - onClick: () => dispatch(setSingleActionModal(false)), - }, - }), - ); - } else { - withdraw(batch.batchId, batch.accountSuppliedTokenBalance); - } - } - - function handleClaimAndStake(batch: AccountBatch) { - claimAndStake(batch.batchId); - } - - return ( - <> - - - - - - - - - {batches?.length > 0 ? ( - - {batches?.map((batch) => ( - - ))} - - ) : ( - - - - )} -
- Your Batches -
-
-
-

Your Batches

-
- {batches?.length > 0 ? ( -
- {batches?.map((batch) => ( - - ))} -
- ) : ( - - )} -
- -
- setHandleClaimPopup(false)}> -

Select a token

- {renderZapModal(currentBatch)} -
-
- - ); -}; -export default ClaimableBatches; diff --git a/packages/app/components/BatchButter/EmptyClaimableBatch.tsx b/packages/app/components/BatchButter/EmptyClaimableBatch.tsx deleted file mode 100644 index 6e755deb..00000000 --- a/packages/app/components/BatchButter/EmptyClaimableBatch.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import MainActionButton from "@popcorn/app/components/MainActionButton"; -import TertiaryActionButton from "@popcorn/app/components/TertiaryActionButton"; -import React from "react"; - -const EmptyClaimableBatch = () => { - return ( - - -

Deposited

- - - - -

Claimable

-

-

- - -
-
- -
-
- -
-
- - - ); -}; - -export default EmptyClaimableBatch; diff --git a/packages/app/components/BatchButter/MintRedeemInterface.tsx b/packages/app/components/BatchButter/MintRedeemInterface.tsx deleted file mode 100644 index f669fb38..00000000 --- a/packages/app/components/BatchButter/MintRedeemInterface.tsx +++ /dev/null @@ -1,184 +0,0 @@ -import { ChainId } from "@popcorn/utils"; -import { BatchType, Token } from "@popcorn/utils/src/types"; -import { InfoIconWithModal } from "@popcorn/app/components/InfoIconWithModal"; -import SecondaryActionButton from "@popcorn/app/components/SecondaryActionButton"; -import { BigNumber, constants, ethers } from "ethers"; -import Link from "next/link"; -import MainActionButton from "@popcorn/app/components/MainActionButton"; -import ButterTokenInput, { - ButterTokenInputProps, - Pages, - pageToDisplayToken, -} from "@popcorn/app/components/BatchButter/ButterTokenInput"; -import { CheckMarkToggleWithInfo } from "@popcorn/app/components/BatchButter/CheckMarkToggleWithInfo"; -import MintRedeemToggle from "@popcorn/app/components/BatchButter/MintRedeemToggle"; -import SlippageSettings from "@popcorn/app/components/BatchButter/SlippageSettings"; -import { useFeatures } from "@popcorn/components/hooks/useFeatures"; - -interface MintRedeemInterfaceProps extends ButterTokenInputProps { - mainAction: (depositAmount: BigNumber, batchType: BatchType, stakeImmidiate?: boolean) => Promise; - approve: (token: Token) => Promise; - slippage: number; - setSlippage: (slippage: number) => void; - instant: boolean; - setInstant?: (instant: boolean) => void; - showSlippageAdjust: boolean; - chainId: ChainId; -} - -const MintRedeemInterface: React.FC = ({ - approve, - depositAmount, - depositDisabled, - mainAction, - options, - page, - selectedToken, - setDepositAmount, - setUseUnclaimedDeposits, - setWithdrawMode, - slippage, - setSlippage, - useUnclaimedDeposits, - instant, - setInstant, - withdrawMode, - hasUnclaimedBalances, - selectToken, - showSlippageAdjust, - chainId, - disabled, -}) => { - const { features } = useFeatures(); - - function isAllowanceInsufficient() { - return ( - !selectedToken?.input?.allowance || - selectedToken.input.allowance.eq(ethers.constants.Zero) || - depositAmount.gt(selectedToken.input.allowance) - ); - } - - const butterModalImage = ; - return ( -
- -
- -
- {!useUnclaimedDeposits && [Pages.butter, Pages.threeX].includes(page) && features["instant3X"] && ( -
- setInstant(!instant)} - image={butterModalImage} - infoTitle="Instant Butter" - infoText="Using 'Instant Butter' comes with higher gas costs. Mint/redeem Butter in one transaction without having to wait for a batch to process. Use this feature only when the gas costs are acceptable to you." - /> -
- )} - {showSlippageAdjust && ( -
- -
- )} -
-
- {hasUnclaimedBalances && useUnclaimedDeposits && ( -
- mainAction(depositAmount, withdrawMode ? BatchType.Redeem : BatchType.Mint)} - disabled={depositDisabled?.disabled || depositAmount.eq(constants.Zero)} - /> -
- )} - {!(hasUnclaimedBalances && useUnclaimedDeposits) && isAllowanceInsufficient() && ( -
- approve(selectedToken?.input)} - /> - mainAction(depositAmount, withdrawMode ? BatchType.Redeem : BatchType.Mint)} - disabled={true} - /> -
- )} - {!(hasUnclaimedBalances && useUnclaimedDeposits) && !isAllowanceInsufficient() && ( -
- {instant && !withdrawMode ? ( - <> - -

Mint & Stake vs. Mint

- - Choose Mint & Stake to automatically stake the token to earn POP rewards. If you select Mint you - will not earn POP rewards unless the token is staked in the - - staking - - page. -

- } - /> -
- { - mainAction(depositAmount, BatchType.Mint, true); - }} - disabled={depositDisabled?.disabled || depositAmount.eq(constants.Zero)} - /> - { - mainAction(depositAmount, BatchType.Mint, false); - }} - disabled={depositDisabled?.disabled || depositAmount.eq(constants.Zero)} - /> - - ) : ( - { - if (withdrawMode) { - mainAction(depositAmount, BatchType.Redeem); - } else { - mainAction(depositAmount, BatchType.Mint); - } - }} - disabled={depositDisabled?.disabled || depositAmount.eq(constants.Zero)} - /> - )} -
- )} -
-
- ); -}; -export default MintRedeemInterface; diff --git a/packages/app/components/BatchButter/MintRedeemToggle.tsx b/packages/app/components/BatchButter/MintRedeemToggle.tsx deleted file mode 100644 index 49c1cf91..00000000 --- a/packages/app/components/BatchButter/MintRedeemToggle.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { localStringOptions } from "@popcorn/utils"; -import { InfoIconWithTooltip } from "@popcorn/app/components/InfoIconWithTooltip"; -import { Dispatch } from "react"; - -interface MintRedeemToggleProps { - redeeming: Boolean; - setRedeeming: Dispatch; - isThreeX?: Boolean; -} - -const MintRedeemToggle: React.FC = ({ redeeming, setRedeeming, isThreeX = false }) => { - const displayInputToken = isThreeX ? "USDC" : "3CRV"; - const displayOutputToken = isThreeX ? "3X" : "BTR"; - - return ( -
-
setRedeeming(false)} - > -

- Mint -

-
- -
-
-
setRedeeming(true)} - > -

- Redeem -

-
- -
-
-
- ); -}; -export default MintRedeemToggle; diff --git a/packages/app/components/BatchButter/MobileClaimableBatch.tsx b/packages/app/components/BatchButter/MobileClaimableBatch.tsx deleted file mode 100644 index de522a14..00000000 --- a/packages/app/components/BatchButter/MobileClaimableBatch.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { BatchType } from "@popcorn/utils/src/types"; -import MainActionButton from "@popcorn/app/components/MainActionButton"; -import TertiaryActionButton from "@popcorn/app/components/TertiaryActionButton"; -import { formatBatchInputToken, formatBatchOutputToken } from "@popcorn/app/helper/ClaimableBatchUtils"; -import { BatchProps } from "@popcorn/app/components/BatchButter/ClaimableBatch"; - -const MobileClaimableBatch: React.FC = ({ - batch, - handleClaimAndStake, - handleClaim, - handleWithdraw, - isThreeX = false, -}) => { - const splitTokenLabel = (value: string) => { - const split = value.split(" "); - - return { - value: split[0], - token: split[1], - }; - }; - return ( -
-
-
-

Deposited

-

- { - splitTokenLabel( - formatBatchInputToken(batch.accountSuppliedTokenBalance, batch.batchType === BatchType.Mint, isThreeX), - ).value - } - - {" "} - { - splitTokenLabel( - formatBatchInputToken( - batch.accountSuppliedTokenBalance, - batch.batchType === BatchType.Mint, - isThreeX, - ), - ).token - } - -

-
-
-

Claimable

-

- { - splitTokenLabel( - formatBatchOutputToken( - batch.accountClaimableTokenBalance, - batch.batchType === BatchType.Mint, - isThreeX, - ), - ).value - }{" "} - - { - splitTokenLabel( - formatBatchOutputToken( - batch.accountClaimableTokenBalance, - batch.batchType === BatchType.Mint, - isThreeX, - ), - ).token - } - -

-
-
-
- {batch.claimable && batch.batchType === BatchType.Mint && ( -
- handleClaimAndStake(batch)} disabled={false} label="Claim & Stake" /> -
- )} - {batch.claimable && batch.batchType === BatchType.Redeem && ( -
- handleClaim(batch)} /> -
- )} - {!batch.claimable && ( -
- handleWithdraw(batch)} /> -
- )} - - {batch.claimable && batch.batchType === BatchType.Mint && ( -
- handleClaim(batch)} disabled={false} label="Claim" /> -
- )} -
-
- ); -}; -export default MobileClaimableBatch; diff --git a/packages/app/components/BatchButter/MobileEmptyClaimableBatches.tsx b/packages/app/components/BatchButter/MobileEmptyClaimableBatches.tsx deleted file mode 100644 index 098ab38a..00000000 --- a/packages/app/components/BatchButter/MobileEmptyClaimableBatches.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import MainActionButton from "@popcorn/app/components/MainActionButton"; -import TertiaryActionButton from "@popcorn/app/components/TertiaryActionButton"; -import React from "react"; - -const MobileEmptyClaimableBatches = () => { - return ( -
-
-
-

Deposited

-

-

-
-
-

Claimable

-

-

-
-
-
- {" "} -
- -
- -
-
-
-
- ); -}; - -export default MobileEmptyClaimableBatches; diff --git a/packages/app/components/BatchButter/MobileTutorialSlider.tsx b/packages/app/components/BatchButter/MobileTutorialSlider.tsx deleted file mode 100644 index c303060a..00000000 --- a/packages/app/components/BatchButter/MobileTutorialSlider.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { ChevronLeftIcon } from "@heroicons/react/outline"; -import React, { useRef, useState } from "react"; -import Slider from "react-slick"; - -let inactiveDot = "bg-black bg-opacity-25"; -let activeDot = "bg-black"; - -const MobileTutorialSlider = ({ onCloseMenu, isThreeX }) => { - const [currentSlide, setCurrentSlide] = useState(0); - - const customSlider = useRef(null); - - const gotoSlide = (id) => { - setCurrentSlide(id); - customSlider.current.slickGoTo(id); - }; - - const settings = { - dots: false, - infinite: true, - speed: 500, - slidesToShow: 1, - slidesToScroll: 1, - autoplay: false, - easing: "easeInOut", - pauseOnHover: false, - beforeChange: (oldIndex: number, newIndex: number) => { - setCurrentSlide(newIndex); - }, - }; - const tutorialSteps: Array<{ title: string; content: string }> = [ - { - title: "Step 1 - Begin the Minting Process", - content: - "First connect your wallet. Then select the token you would like to deposit from the dropdown, enter the deposit amount and click ‘Mint’. If you are depositing for the first time, you’ll need to approve the contract.", - }, - { - title: "Step 2 – Wait for the batch to process", - content: `Your deposits will be held in ${ - isThreeX ? "3X" : "Butter" - }’s batch processing queue. Note: To minimise gas fees, deposits are processed approximately every 24 hours. You are able to withdraw your deposits during this phase.`, - }, - { - title: `Step 3 – Claim your minted ${isThreeX ? "3X" : "Butter"}!`, - content: `Once the batch has been processed, you will be able to claim the new minted ${ - isThreeX ? "3X" : "Butter" - } tokens!`, - }, - ]; - - return ( -
-
- -

How It Works

-
-
- (customSlider.current = slider)}> - {tutorialSteps.map((step, index) => ( -
-
-
-

{step.title}

-

{step.content}

-
- -
- {tutorialSteps.map((steps, index) => ( -
gotoSlide(index)} - >
- ))} -
-
-
- ))} -
-
-
- ); -}; - -export default MobileTutorialSlider; diff --git a/packages/app/components/BatchButter/MobileTutorialStepButton.tsx b/packages/app/components/BatchButter/MobileTutorialStepButton.tsx deleted file mode 100644 index d40fb328..00000000 --- a/packages/app/components/BatchButter/MobileTutorialStepButton.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { Dispatch, SetStateAction } from "react"; - -interface MobileTutorialStepButtonProps { - stepState: [number, Dispatch>]; - activeState: number; -} - -export default function MobileTutorialStepButton({ - stepState, - activeState, -}: MobileTutorialStepButtonProps): JSX.Element { - const [step, setStep] = stepState; - return ( -
setStep(activeState)} - > -
-
- ); -} diff --git a/packages/app/components/BatchButter/OutputToken.tsx b/packages/app/components/BatchButter/OutputToken.tsx deleted file mode 100644 index 62f3b44b..00000000 --- a/packages/app/components/BatchButter/OutputToken.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { Token } from "@popcorn/utils/types"; -import Image from "next/image"; -import { Dispatch } from "react"; -import PseudoRadioButton from "@popcorn/app/components/BatchButter/PseudoRadioButton"; - -interface OutputTokenProps { - outputToken: Token[]; - selectToken: Dispatch; - selectedToken: Token; -} - -const OutputToken: React.FC = ({ outputToken, selectToken, selectedToken }) => { - return ( -
- {outputToken.map((token) => ( -
- - - {token.symbol - - {token.symbol} -
- } - activeClass="border-1 border-customBrown" - isActive={selectedToken === token} - handleClick={() => { - selectToken(token); - }} - /> -
- ))} -
- ); -}; - -export default OutputToken; diff --git a/packages/app/components/BatchButter/SlippageSettings.tsx b/packages/app/components/BatchButter/SlippageSettings.tsx deleted file mode 100644 index 09fa7319..00000000 --- a/packages/app/components/BatchButter/SlippageSettings.tsx +++ /dev/null @@ -1,140 +0,0 @@ -import { InfoIconWithModal } from "@popcorn/app/components/InfoIconWithModal"; -import PopUpModal from "@popcorn/components/components/Modal/PopUpModal"; -import { setSingleActionModal } from "@popcorn/components/context/actions"; -import { store } from "@popcorn/components/context/store"; -import { escapeRegExp, inputRegex } from "@popcorn/app/helper/inputRegex"; -import { Dispatch, useContext, useState } from "react"; -import PseudoRadioButton from "@popcorn/app/components/BatchButter/PseudoRadioButton"; - -interface CustomSlippageInputProps { - value: string; - setValue?: Dispatch; - setSlippage: Dispatch; -} - -export const CustomSlippageInput: React.FC = (props) => { - const { value, setValue, setSlippage } = props; - - const onUpdate = (nextUserInput: string) => { - if (inputRegex.test(escapeRegExp(nextUserInput))) { - setValue?.(nextUserInput); - setSlippage(Number(nextUserInput)); - } - }; - return ( -
-
- { - onUpdate(e.target.value.replace(/,/g, ".")); - }} - inputMode="decimal" - autoComplete="off" - autoCorrect="off" - // text-specific options - type="text" - pattern="^[0-9]*[.,]?[0-9]*$" - minLength={1} - maxLength={4} - spellCheck="false" - /> -
-

%

-
-
-
- ); -}; -interface SlippageSettingsProps { - slippage: number; - setSlippage: Dispatch; - slippageOptions: number[]; -} - -const SlippageContent: React.FC = ({ slippage, setSlippage, slippageOptions }) => { - const [value, setValue] = useState(String(slippage)); - return ( -
-
-
-

Slippage Tolerance

-
- -
-
-
-
- {slippageOptions.map((option) => ( - { - setValue(String(option)); - setSlippage(option); - }} - /> - ))} -
-
-
-

Custom Adjustments

-
- -
-
- - -
-
- ); -}; - -const SlippageSettings: React.FC = ({ slippage, setSlippage, slippageOptions }) => { - const { dispatch } = useContext(store); - const [showPopUp, setShowPopUp] = useState(false); - - return ( - <> -
- dispatch( - setSingleActionModal({ - title: "Slippage", - children: ( - - ), - onDismiss: { - label: "Done", - onClick: () => dispatch(setSingleActionModal(false)), - }, - }), - ) - } - > - -

{`Adjust slippage (${slippage}%)`}

-
- -
setShowPopUp(true)} - > - -

{`Adjust slippage (${slippage}%)`}

-
-
- setShowPopUp(false)}> - - -
- - ); -}; - -export default SlippageSettings; diff --git a/packages/app/components/BatchButter/StatInfoCard.tsx b/packages/app/components/BatchButter/StatInfoCard.tsx deleted file mode 100644 index a42476e6..00000000 --- a/packages/app/components/BatchButter/StatInfoCard.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { InfoIconWithTooltip } from "@popcorn/app/components/InfoIconWithTooltip"; -import CardIcon from "@popcorn/app/components/CardIcon"; -import { InfoIconWithModalProps } from "@popcorn/app/components/InfoIconWithModal"; - -interface StatInfoCardProps { - title: string; - content: string | JSX.Element; - icon: string; - info?: InfoIconWithModalProps; -} -export default function StatInfoCard({ title, content, icon, info }: StatInfoCardProps): JSX.Element { - return ( -
-
- -
-
-

{title}

- {info && ( - - )} -
-

{content}

-
-
-
- ); -} diff --git a/packages/app/components/BatchButter/Tutorial.tsx b/packages/app/components/BatchButter/Tutorial.tsx deleted file mode 100644 index c29af182..00000000 --- a/packages/app/components/BatchButter/Tutorial.tsx +++ /dev/null @@ -1,114 +0,0 @@ -import { useState } from "react"; -import * as Icon from "react-feather"; -import { useSwipeable } from "react-swipeable"; -import MobileTutorialStepButton from "@popcorn/app/components/BatchButter/MobileTutorialStepButton"; - -function title(step: number, isThreeX: boolean): string { - switch (step) { - case 1: - return "Step 1 - Begin the Minting Process"; - case 2: - return "Step 2 – Wait for the batch to process"; - case 3: - return `Step 3 – Claim your minted ${isThreeX ? "3X" : "Butter"}!`; - } -} - -function text(step: number, isThreeX: boolean): string { - switch (step) { - case 1: - return "First connect your wallet. Then select the token you would like to deposit from the dropdown, enter the deposit amount and click ‘Mint’. If you are depositing for the first time, you’ll need to approve the contract."; - case 2: - return `Your deposits will be held in ${ - isThreeX ? "3X" : "Butter" - }’s batch processing queue. Note: To minimise gas fees, deposits are processed approximately every 24 hours. You are able to withdraw your deposits during this phase.`; - case 3: - return `Once the batch has been processed, you will be able to claim the new minted ${ - isThreeX ? "3X" : "Butter" - } tokens!`; - } -} - -function tutorialContent(step: number, isThreeX: boolean): JSX.Element { - const imageLinks: { butter: string; threeX: string }[] = [ - { - butter: `/images/butter/Step-1.png`, - threeX: `/images/butter/Step-1-3X.png`, - }, - { - butter: `/images/butter/Step-2.png`, - threeX: `/images/butter/Step-2.png`, - }, - { - butter: `/images/butter/Step-3.png`, - threeX: `/images/butter/Step-3-3X.png`, - }, - ]; - return ( -
- -
- ); -} - -function Tutorial({ isThreeX = false }: { isThreeX?: boolean }) { - const [step, setStep] = useState(1); - - const swipeHandler = useSwipeable({ - onSwipedLeft: (eventData) => { - setStep(step === 3 ? 1 : step + 1); - }, - onSwipedRight: (eventData) => { - setStep(step === 1 ? 3 : step - 1); - }, - delta: 10, - preventDefaultTouchmoveEvent: false, - trackTouch: true, - trackMouse: true, - rotationAngle: 0, // set a rotation angle - }); - - return ( - <> -
-
- -
-
-
{tutorialContent(step, isThreeX)}
-
-

How it works

-

{title(step, isThreeX)}

-

{text(step, isThreeX)}

-
-
-
- -
-
-
- - - -
- - ); -} - -export default Tutorial; diff --git a/packages/app/components/BatchButter/TutorialSlider.tsx b/packages/app/components/BatchButter/TutorialSlider.tsx deleted file mode 100644 index 6c393642..00000000 --- a/packages/app/components/BatchButter/TutorialSlider.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import React, { useRef, useState } from "react"; -import Slider from "react-slick"; - -let activeDot = "bg-white"; -let inactiveDot = "bg-white bg-opacity-50"; - -const TutorialSlider = ({ isThreeX }: { isThreeX: boolean }) => { - const [currentSlide, setCurrentSlide] = useState(0); - - const customSlider = useRef(null); - - const gotoSlide = (id) => { - setCurrentSlide(id); - customSlider.current.slickGoTo(id); - }; - - const settings = { - dots: false, - infinite: true, - speed: 500, - slidesToShow: 1, - slidesToScroll: 1, - autoplay: false, - easing: "easeInOut", - pauseOnHover: false, - beforeChange: (oldIndex: number, newIndex: number) => { - setCurrentSlide(newIndex); - }, - }; - - const tutorialSteps: Array<{ title: string; content: string }> = [ - { - title: "Step 1 - Begin the Minting Process", - content: - "First connect your wallet. Then select the token you would like to deposit from the dropdown, enter the deposit amount and click ‘Mint’. If you are depositing for the first time, you’ll need to approve the contract.", - }, - { - title: "Step 2 – Wait for the batch to process", - content: `Your deposits will be held in ${ - isThreeX ? "3X" : "Butter" - }’s batch processing queue. Note: To minimise gas fees, deposits are processed approximately every 24 hours. You are able to withdraw your deposits during this phase.`, - }, - { - title: `Step 3 – Claim your minted ${isThreeX ? "3X" : "Butter"}!`, - content: `Once the batch has been processed, you will be able to claim the new minted ${ - isThreeX ? "3X" : "Butter" - } tokens!`, - }, - ]; - return ( -
- (customSlider.current = slider)}> - {tutorialSteps.map((step, index) => ( -
-
-
How It Works
- -
-

{step.title}

-

{step.content}

-
- -
- {tutorialSteps.map((steps, index) => ( -
gotoSlide(index)} - key={index} - >
- ))} -
-
-
- ))} -
-
- ); -}; - -export default TutorialSlider; diff --git a/packages/app/components/BatchButter/ZapModal.tsx b/packages/app/components/BatchButter/ZapModal.tsx deleted file mode 100644 index 32b2aca4..00000000 --- a/packages/app/components/BatchButter/ZapModal.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { BigNumber } from "@ethersproject/bignumber"; -import { Token } from "@popcorn/utils/types"; -import { InfoIconWithTooltip } from "@popcorn/app/components/InfoIconWithTooltip"; -import MainActionButton from "@popcorn/app/components/MainActionButton"; -import TertiaryActionButton from "@popcorn/app/components/TertiaryActionButton"; -import { Dispatch, useState } from "react"; -import OutputToken from "@popcorn/app/components/BatchButter/OutputToken"; -import PseudoRadioButton from "@popcorn/app/components/BatchButter/PseudoRadioButton"; -import { CustomSlippageInput } from "@popcorn/app/components/BatchButter/SlippageSettings"; - -interface ZapModalProps { - tokenOptions: Token[]; - slippage: number; - setSlippage: Dispatch; - slippageOptions: number[]; - closeModal: Function; - withdraw: Function; - claim: Function; - batchId: string; - withdrawAmount: BigNumber; - isWithdraw?: boolean; -} - -export default function ZapModal({ - tokenOptions, - slippage, - setSlippage, - slippageOptions, - closeModal, - withdraw, - claim, - batchId, - withdrawAmount, - isWithdraw = false, -}: ZapModalProps): JSX.Element { - const [selectedToken, selectToken] = useState(tokenOptions[0]); - const [slippageValue, setSlippageValue] = useState(String(slippage)); - - return ( -
- - {selectedToken !== tokenOptions[0] && ( -
-
-
-

Slippage Tolerance

- -
-
- {slippageOptions.map((item, index) => ( -
- { - setSlippage(item); - setSlippageValue(String(item)); - }} - /> -
- ))} -
-
- -
-
-

Custom adjustment Slippage

- -
- -
-
- )} -
- { - isWithdraw - ? withdraw(batchId, withdrawAmount, selectedToken !== tokenOptions[0], selectedToken) - : claim(batchId, selectedToken !== tokenOptions[0], selectedToken); - closeModal(); - }} - > - -
-
- ); -} diff --git a/packages/app/components/CardIcon.tsx b/packages/app/components/CardIcon.tsx deleted file mode 100644 index 01c40c05..00000000 --- a/packages/app/components/CardIcon.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import * as Icon from "react-feather"; - -function getIcon(icon: string): JSX.Element { - switch (icon) { - case "Lock": - return ; - case "Gift": - return ; - case "Money": - return ; - case "Key": - return ; - case "Wait": - return ; - } -} - -export interface CardIconProps { - icon: string; -} - -export default function CardIcon({ icon }: CardIconProps): JSX.Element { - switch (icon) { - case "Butter": - return butter; - case "3X": - return 3X; - default: - return ( -
-
{getIcon(icon)}
-
- ); - } -} diff --git a/packages/app/components/CardLoader.tsx b/packages/app/components/CardLoader.tsx deleted file mode 100644 index 51487a5f..00000000 --- a/packages/app/components/CardLoader.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from "react"; -import ContentLoader from "react-content-loader"; -export const CardLoader: React.FC = () => { - return ( - - {/*eslint-disable */} - - - - {/*eslint-enable */} - - ); -}; diff --git a/packages/app/components/Common/AlertCard.tsx b/packages/app/components/Common/AlertCard.tsx deleted file mode 100644 index 38cd9689..00000000 --- a/packages/app/components/Common/AlertCard.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import TextLink from "@popcorn/app/components/Common/TextLink"; - -export interface AlertCardLink { - text: string; - url: string; - openInNewTab?: boolean; -} - -interface AlertCardProps { - title: string; - text: string; - links: AlertCardLink[]; -} - -export default function AlertCard({ title, text, links }: AlertCardProps): JSX.Element { - return ( -
-
-

{title}

-

{text}

-
- {links.map((link) => ( - - ))} -
-
-
- ); -} diff --git a/packages/app/components/Common/Badge.tsx b/packages/app/components/Common/Badge.tsx deleted file mode 100644 index 085819a7..00000000 --- a/packages/app/components/Common/Badge.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { FC } from "react"; - -export interface Badge { - text: string; - textColor: string; - bgColor: string; -} - -interface BadgeProps { - badge: Badge; -} - -const Badge: FC = ({ badge }) => { - return
{badge.text}
; -}; -export default Badge; diff --git a/packages/app/components/Common/CustomDropdown.tsx b/packages/app/components/Common/CustomDropdown.tsx deleted file mode 100644 index 7537ff9b..00000000 --- a/packages/app/components/Common/CustomDropdown.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { Menu } from "@headlessui/react"; -import { ViewGridIcon } from "@heroicons/react/outline"; -import { ChevronDownIcon } from "@heroicons/react/solid"; -import DropdownOptions from "@popcorn/app/components/Common/DropdownOptions"; -import React, { FC } from "react"; -import { MobilePopupSelect } from "@popcorn/app/components/Common/MobilePopupSelect"; - -interface IFilter { - categoryFilter: { id: string; value: string }; - switchFilter: (item: { id: string; value: string }) => void; - categories: Array<{ id: string; value: string }>; -} - -const CustomDropdown: FC = ({ categoryFilter, switchFilter, categories }) => { - const [openFilter, setOpenFilter] = React.useState(false); - return ( - <> -
- - -
-
- -

{categoryFilter.value}

-
-
- -
-
-
-
- -
-
- -
- - ); -}; - -export default CustomDropdown; diff --git a/packages/app/components/Common/Divider.tsx b/packages/app/components/Common/Divider.tsx deleted file mode 100644 index eb308aab..00000000 --- a/packages/app/components/Common/Divider.tsx +++ /dev/null @@ -1,10 +0,0 @@ -const Divider = () => { - return ( -
- - ); -}; -export default Divider; diff --git a/packages/app/components/Common/DropdownOptions.tsx b/packages/app/components/Common/DropdownOptions.tsx deleted file mode 100644 index 6f8cf573..00000000 --- a/packages/app/components/Common/DropdownOptions.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { Menu, Transition } from "@headlessui/react"; -import { Fragment } from "react"; - -interface FilterProps { - options: Array | { [key: string]: string }[]; - selectedItem: string | { name: string; link: string }; - switchFilter: (item: string | { [key: string]: string }) => void; - position: string; - width: string; - borderRadius: string; - borderRadiusFirstLast: string; -} - -const BeneficiaryOptions: React.FC = ({ - options, - switchFilter, - position, - width, - selectedItem, - borderRadius, - borderRadiusFirstLast, -}) => { - const checkActiveItem = (item: any) => { - if (typeof selectedItem === "string") { - return selectedItem === item; - } else { - return selectedItem.link === item.link; - } - }; - return ( - - - {options.map((item, index: number) => ( - - {({ active }) => ( - switchFilter(item)} - > -

{typeof item === "string" ? item : item.name || item.value}

-
- )} -
- ))} -
-
- ); -}; - -export default BeneficiaryOptions; diff --git a/packages/app/components/Common/FooterLandScapeImage.tsx b/packages/app/components/Common/FooterLandScapeImage.tsx deleted file mode 100644 index 429e2d6e..00000000 --- a/packages/app/components/Common/FooterLandScapeImage.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from "react"; - -const FooterLandScapeImage = () => { - return ( -
- -
- ); -}; - -export default FooterLandScapeImage; diff --git a/packages/app/components/Common/MobilePopupSelect.tsx b/packages/app/components/Common/MobilePopupSelect.tsx deleted file mode 100644 index 46c5d025..00000000 --- a/packages/app/components/Common/MobilePopupSelect.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React from "react"; -import { List, ListItem } from "@popcorn/app/components/Common/ScrollableSelect"; -import PopUpModal from "@popcorn/components/components/Modal/PopUpModal"; - -interface Category { - id: string; - value: string; -} - -interface Props { - categories: Category[]; - visible: boolean; - onClose: React.Dispatch>; - selectedItem: Category; - switchFilter: (item: Category) => void; -} - -export const MobilePopupSelect: React.FC = (props) => { - const { categories, visible, onClose, selectedItem, switchFilter } = props; - - const handleOnChange = (e: React.MouseEvent, value: Category) => { - e.preventDefault(); - switchFilter(value); - onClose(false); - }; - - return ( - onClose(false)}> - {selectedItem.id && ( - <> -

Categories

- - {categories.map((category) => ( - handleOnChange(e, category)}> - {category.value} - - ))} - - - )} -
- ); -}; diff --git a/packages/app/components/Common/Page.tsx b/packages/app/components/Common/Page.tsx deleted file mode 100644 index 2f687d20..00000000 --- a/packages/app/components/Common/Page.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import useRestakeAlert from "@popcorn/app/hooks/useRestakeAlert"; -import Footer from "@popcorn/app/components/Footer"; -import Navbar from "@popcorn/app/components/NavBar/NavBar"; -import useSubscribeToNewsletter from "@popcorn/app/hooks/useSubscribeToNewsletter"; -import React from "react"; -import { Toaster } from "react-hot-toast"; -import useTermsCheck from "@popcorn/components/hooks/useTermsCheck"; -import { useRouter } from "next/router"; -import classnames from "classnames"; -interface PageProps { - children: JSX.Element; -} -export default function Page({ children }: PageProps) { - useRestakeAlert(); - useSubscribeToNewsletter(); - useTermsCheck(); - - const { pathname } = useRouter(); - - const compactRoutes = ["/portfolio"]; - - return ( -
-
- - -
- {children} -
-
-
-
- ); -} diff --git a/packages/app/components/Common/ScrollableSelect/index.tsx b/packages/app/components/Common/ScrollableSelect/index.tsx deleted file mode 100644 index cd05cca9..00000000 --- a/packages/app/components/Common/ScrollableSelect/index.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React, { createContext, FC, useContext } from "react"; - -const ListContext = createContext({ - selected: "", -}); - -interface ListProps { - children: React.ReactNode; - selected: string; -} - -const List: FC = ({ children, selected }) => ( -
    - {children} -
-); - -interface ListItemProps { - children: React.ReactNode; - value: string; - onClick: React.MouseEventHandler; -} - -const ListItem: FC = ({ children, value, onClick }) => { - const { selected } = useContext(ListContext); - return ( -
  • - -
  • - ); -}; - -export { List, ListItem }; diff --git a/packages/app/components/Common/TextLink.tsx b/packages/app/components/Common/TextLink.tsx deleted file mode 100644 index 015e67f1..00000000 --- a/packages/app/components/Common/TextLink.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { ArrowCircleRightIcon } from "@heroicons/react/outline"; -import useNetworkName from "@popcorn/app/hooks/useNetworkName"; -import Link from "next/link"; - -interface TextLinkProps { - text: string; - url: string; - textSize?: string; - showArrow?: boolean; - outsideLink?: boolean; - openInNewTab?: boolean; -} - -export default function TextLink({ - text, - url, - textSize = "text-md", - showArrow = true, - outsideLink, - openInNewTab, -}: TextLinkProps) { - const networkName = useNetworkName(); - return ( - - {text} - {showArrow && } - - ); -} diff --git a/packages/app/components/Common/TokenInput.tsx b/packages/app/components/Common/TokenInput.tsx deleted file mode 100644 index c6c4a07b..00000000 --- a/packages/app/components/Common/TokenInput.tsx +++ /dev/null @@ -1,160 +0,0 @@ -import { ChainId, formatAndRoundBigNumber } from "@popcorn/utils"; -import { Token } from "@popcorn/utils/types"; -import SelectToken from "@popcorn/app/components/BatchButter/SelectToken"; -import TokenIcon from "@popcorn/app/components/TokenIcon"; -import { BigNumber, constants } from "ethers"; -import { formatUnits, parseUnits } from "ethers/lib/utils"; -import { escapeRegExp, inputRegex } from "@popcorn/app/helper/inputRegex"; -import { useEffect, useState } from "react"; -import { Pop } from "@popcorn/components/lib/types"; -import { Erc20 } from "@popcorn/components"; - -export interface TokenInputProps { - label: string; - token: Token; - amount: BigNumber; - setAmount: Function; - balance?: BigNumber; - readonly?: boolean; - account?: string; - tokenList?: Token[]; - selectToken?: (token: Token) => void; - chainId: ChainId; - spendableBalance?: Pop.HookResult; -} - -export const TokenInput: React.FC = ({ - label, - token, - setAmount, - amount, - balance, - readonly = false, - tokenList = [], - selectToken = null, - chainId, - spendableBalance, - account, -}) => { - const [displayAmount, setDisplayAmount] = useState( - amount.isZero() ? "" : formatUnits(amount, token?.decimals), - ); - const displaySpendableBalance = - spendableBalance?.status === "success" && - !!balance && - !balance.eq(constants.Zero) && - !!spendableBalance?.data && - !spendableBalance.data.eq(balance); - - const spendableBalanceFormatted = displaySpendableBalance - ? formatAndRoundBigNumber(spendableBalance?.data, token.decimals) - : ""; - - useEffect(() => { - if (amount.isZero()) { - setDisplayAmount(""); - } else if (readonly) { - setDisplayAmount(formatUnits(amount, token?.decimals)); - } - }, [amount]); - - const onUpdate = (nextUserInput: string) => { - if (inputRegex.test(escapeRegExp(nextUserInput))) { - const newAmount = ["", "."].includes(nextUserInput) ? constants.Zero : parseUnits(nextUserInput, token?.decimals); - setDisplayAmount(nextUserInput); - if (!amount.eq(newAmount)) { - setAmount(newAmount); - } - } - }; - - function setMaxAmount() { - const max = displaySpendableBalance ? spendableBalance?.data : balance; - setDisplayAmount(formatUnits(max, token?.decimals)); - setAmount(max); - } - - return ( - <> - {balance && ( - - )} -
    -
    -
    - { - onUpdate(e.target.value.replace(/,/g, ".")); - }} - value={displayAmount} - inputMode="decimal" - autoComplete="off" - autoCorrect="off" - // text-specific options - type="text" - pattern="^[0-9]*[.,]?[0-9]*$" - placeholder={"0.0"} - minLength={1} - maxLength={79} - spellCheck="false" - readOnly={readonly} - /> - {tokenList.length > 0 ? ( - - ) : ( -
    -
    - -
    -

    {token?.symbol}

    -
    - )} -
    -
    -
    - {balance && amount?.gt(balance) &&

    *Insufficient Balance

    } -
    - {balance && ( -
    - wallet balance of selected token -

    - {" "} - {displaySpendableBalance && "(" + spendableBalanceFormatted + " unlocked)"} -

    -
    - )} - {!readonly && balance && ( -
    - MAX -
    - )} -
    - - ); -}; -export default TokenInput; diff --git a/packages/app/components/DropdownSelect.tsx b/packages/app/components/DropdownSelect.tsx deleted file mode 100644 index b0c3036f..00000000 --- a/packages/app/components/DropdownSelect.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { Dispatch, useState } from "react"; - -interface DropdownSelectProps { - label: string; - selectOptions: any[]; - selectedValue?: any; - selectOption: Dispatch; - disabled?: boolean; -} - -const DropdownSelect: React.FC = ({ - label, - selectOptions, - selectOption, - selectedValue, - disabled = false, -}) => { - const [showOptions, setShowOptions] = useState(false); - return ( -
    -
    - -
    - {showOptions && ( -
    - {selectOptions.map((option) => ( -

    { - selectOption(option.value); - setShowOptions(false); - }} - > - {option.label} -

    - ))} -
    - )} -
    - ); -}; -export default DropdownSelect; diff --git a/packages/app/components/FacebookPixel.tsx b/packages/app/components/FacebookPixel.tsx deleted file mode 100644 index 3a0f99c7..00000000 --- a/packages/app/components/FacebookPixel.tsx +++ /dev/null @@ -1,25 +0,0 @@ -const FacebookPixel: React.FC = () => ( - <> -