├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .husky └── pre-commit ├── .prettierrc ├── .vscode ├── extensions.json └── settings.json ├── LICENSE ├── README.md ├── next-env.d.ts ├── next.config.js ├── package.json ├── public ├── Chillax-Regular.woff2 ├── Chillax-Semibold.woff2 ├── SpaceGrotesk[wght].woff2 ├── actions.json ├── favicon.ico ├── icons │ ├── acceleraytor-discord.svg │ ├── acceleraytor-global.svg │ ├── acceleraytor-list-collapse-open.svg │ ├── acceleraytor-list-medium.svg │ ├── acceleraytor-medium.svg │ ├── acceleraytor-telegram.svg │ ├── acceleraytor-twitch.svg │ ├── acceleraytor-twitter.svg │ └── acceleraytor-youtube.svg ├── images │ ├── clmm-nft.png │ ├── disclaimer-page-bg.webp │ ├── done.png │ ├── explorer-solana.png │ ├── explorer-solanaFM.png │ ├── explorer-solscan.png │ ├── liquidity-pool-card-title-bg.svg │ ├── moonpay-dots.svg │ ├── moonpay-gradient.png │ ├── payments │ │ ├── apple.webp │ │ ├── google.webp │ │ ├── mastercard.webp │ │ ├── paypal.webp │ │ └── visa.webp │ ├── tvl-lock.svg │ └── volume-total.svg ├── logo.png └── vercel.svg ├── sentry.client.config.ts ├── sentry.edge.config.ts ├── sentry.server.config.ts ├── sentryUtils.ts ├── src ├── api │ ├── axios.ts │ ├── event.ts │ └── txService.ts ├── components │ ├── AddressChip.tsx │ ├── AlertChip.tsx │ ├── AmountSlider.tsx │ ├── AppLayout │ │ ├── AppNavLayout.tsx │ │ ├── AppVersion.tsx │ │ ├── MobileBottomNavbar.tsx │ │ └── components │ │ │ ├── ColorThemeSettingField.tsx │ │ │ ├── DefaultExplorerSettingField.tsx │ │ │ ├── DisclaimerModal.tsx │ │ │ ├── LanguageSettingField.tsx │ │ │ ├── NavMoreButtonMenuPanel.tsx │ │ │ ├── PriorityButton.tsx │ │ │ ├── PriorityModalContent.tsx │ │ │ ├── RPCConnectionSettingField.tsx │ │ │ ├── SettingField.tsx │ │ │ ├── SettingFieldDivider.tsx │ │ │ ├── SettingFieldToggleButton.tsx │ │ │ ├── SlippageToleranceSettingField.tsx │ │ │ ├── TransactionFeeSetting.tsx │ │ │ └── VersionedTransactionSettingField.tsx │ ├── AppVersion.tsx │ ├── AprMDSwitchWidget.tsx │ ├── Button.tsx │ ├── CalloutMessageSlip.tsx │ ├── CalloutNote.tsx │ ├── Carousel.tsx │ ├── ChevronUpDownArrow.tsx │ ├── ConnectedButton.tsx │ ├── ConnectedOnly.tsx │ ├── Content.tsx │ ├── DateTimePicker │ │ ├── DatePick.tsx │ │ ├── TimePick.tsx │ │ └── index.tsx │ ├── DecimalInput.tsx │ ├── ExchangeRate.tsx │ ├── FarmDatePickerModal.tsx │ ├── IntervalCircle.tsx │ ├── LandingPage │ │ ├── Entry.tsx │ │ ├── Facilitate.tsx │ │ ├── Feature.tsx │ │ ├── Footer.tsx │ │ ├── Header.tsx │ │ ├── Liquidity.tsx │ │ ├── Partner.tsx │ │ ├── ProtocolStat.tsx │ │ ├── components │ │ │ ├── FeatureCard.tsx │ │ │ ├── FooterItem.tsx │ │ │ ├── FooterTitle.tsx │ │ │ ├── TotalValueVolume.tsx │ │ │ └── tvl.css │ │ ├── images │ │ │ ├── BuildOnSolana.tsx │ │ │ ├── Discord.tsx │ │ │ ├── Doc.tsx │ │ │ ├── ExpandArrowDown.tsx │ │ │ ├── FooterBg.tsx │ │ │ ├── Logo.tsx │ │ │ ├── LogoLegacy.tsx │ │ │ ├── Medium.tsx │ │ │ ├── SecondaryLogo.tsx │ │ │ ├── Telegram.tsx │ │ │ ├── Twitter.tsx │ │ │ ├── entry.png │ │ │ ├── expand-arrow-down.svg │ │ │ ├── facilitate.png │ │ │ ├── feature-card-fig.png │ │ │ ├── footer-bg.png │ │ │ ├── liquidity-amm.png │ │ │ ├── liquidity-card-chart.png │ │ │ ├── liquidity-launch.png │ │ │ ├── liquidity-swap.png │ │ │ ├── serum.png │ │ │ ├── solana.png │ │ │ └── sushi.png │ │ └── liquidity.css │ ├── List.tsx │ ├── ListItem.tsx │ ├── Loader │ │ ├── index.tsx │ │ └── styled.tsx │ ├── LoopCircle.tsx │ ├── MessageBox.tsx │ ├── MobileDesktop.tsx │ ├── Modal │ │ └── TxErrorModal.tsx │ ├── Moonpay.tsx │ ├── PageHeroTitle.tsx │ ├── Pagination │ │ ├── Item.tsx │ │ ├── Pagination.tsx │ │ ├── index.tsx │ │ └── interface.ts │ ├── PanelCard.tsx │ ├── QuestionToolTip.tsx │ ├── RadioTabs.tsx │ ├── ResponsiveModal.tsx │ ├── Select.tsx │ ├── SimpleList │ │ ├── index.tsx │ │ ├── interface.ts │ │ └── item.tsx │ ├── SlippageAdjuster │ │ ├── SlippageSettingField.tsx │ │ ├── SlippageSettingModal.tsx │ │ └── index.tsx │ ├── SolWallet │ │ ├── SelectWalletModal.tsx │ │ ├── WalletOnramp.tsx │ │ └── index.tsx │ ├── SortUpDownArrow.tsx │ ├── Steps.tsx │ ├── SubPageNote.tsx │ ├── Tabs.tsx │ ├── Tag.tsx │ ├── Toast │ │ ├── ToastTransaction.tsx │ │ ├── index.tsx │ │ └── toast.css │ ├── TokenAvatar.tsx │ ├── TokenAvatarPair.tsx │ ├── TokenInput.tsx │ ├── TokenSearchInput.tsx │ ├── TokenSelectBox.tsx │ ├── TokenSelectDialog │ │ ├── TokenSelectDialog.tsx │ │ ├── components │ │ │ ├── PopularTokenCell.tsx │ │ │ ├── TokenFreezeDialog.tsx │ │ │ ├── TokenList.tsx │ │ │ ├── TokenListSetting.tsx │ │ │ ├── TokenListUnknown.tsx │ │ │ └── TokenUnknownAddDialog.tsx │ │ └── index.ts │ ├── Tooltip.tsx │ ├── VirtualBox.tsx │ ├── VisualSlider.tsx │ └── WalletRecentTransactionBoard.tsx ├── features │ ├── Clmm │ │ ├── ClmmPosition │ │ │ ├── CreatePosition.tsx │ │ │ ├── DepositedNFTModal.tsx │ │ │ ├── index.tsx │ │ │ └── useValidate.ts │ │ ├── LiquidityEditModal │ │ │ ├── AddLiquidityModal.tsx │ │ │ ├── RemoveLiquidityModal.tsx │ │ │ └── validateSchema.ts │ │ ├── Lock │ │ │ ├── Lock.tsx │ │ │ ├── components │ │ │ │ ├── LiquidityItem.tsx │ │ │ │ └── LiquidityLockModal.tsx │ │ │ └── index.tsx │ │ ├── MigrateClmmFromStandardDialog │ │ │ ├── AprInfo.tsx │ │ │ ├── Dialog.tsx │ │ │ ├── RangeInput.tsx │ │ │ ├── index.ts │ │ │ └── useValidateSchema.ts │ │ ├── components │ │ │ ├── AprInfo.tsx │ │ │ ├── ChartPriceLabel.tsx │ │ │ ├── LiquidityChartRangeInput │ │ │ │ ├── Area.tsx │ │ │ │ ├── AxisBottom.tsx │ │ │ │ ├── Bound.ts │ │ │ │ ├── Brush.tsx │ │ │ │ ├── Chart.tsx │ │ │ │ ├── FeeAmount.ts │ │ │ │ ├── Line.tsx │ │ │ │ ├── Zoom.tsx │ │ │ │ ├── hooks.ts │ │ │ │ ├── index.tsx │ │ │ │ ├── svg.tsx │ │ │ │ └── types.ts │ │ │ ├── PreviewDepositModal.tsx │ │ │ ├── PriceSwitchButton.tsx │ │ │ ├── RangeInput.tsx │ │ │ ├── RangePercentTabs.tsx │ │ │ └── TokenInputGroup.tsx │ │ ├── type.ts │ │ ├── useClmmApr.ts │ │ └── utils │ │ │ ├── calApr.ts │ │ │ ├── duration.ts │ │ │ ├── math.ts │ │ │ ├── position.ts │ │ │ └── tick.ts │ ├── ComponentSpecification │ │ ├── components │ │ │ └── ComponentExamplePanel.tsx │ │ └── index.tsx │ ├── Create │ │ ├── ClmmPool │ │ │ ├── CreateClmmPool.tsx │ │ │ ├── components │ │ │ │ ├── CreateSuccessModal.tsx │ │ │ │ ├── CreateSuccessWithLockModal.tsx │ │ │ │ ├── SelectPoolTokenAndFee.tsx │ │ │ │ ├── SetPriceAndRange.tsx │ │ │ │ ├── Stepper.tsx │ │ │ │ ├── TokenAmountInput.tsx │ │ │ │ └── type.ts │ │ │ ├── index.tsx │ │ │ └── useValidate.ts │ │ ├── StandardPool │ │ │ ├── components │ │ │ │ ├── CreateSuccessModal.tsx │ │ │ │ ├── Done.tsx │ │ │ │ └── Initialize.tsx │ │ │ ├── hooks │ │ │ │ ├── useInitPoolSchema.ts │ │ │ │ └── useMarketSchema.ts │ │ │ └── index.tsx │ │ └── components │ │ │ └── CreatePoolEntryDialog.tsx │ ├── Debug │ │ ├── components │ │ │ └── NonAtaItem.tsx │ │ └── index.tsx │ ├── Farm │ │ ├── Create │ │ │ ├── components │ │ │ │ ├── AddRewards │ │ │ │ │ ├── Reward.tsx │ │ │ │ │ ├── RewardBody.tsx │ │ │ │ │ ├── RewardHeader.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── DetailReview │ │ │ │ │ ├── PoolReviewItem.tsx │ │ │ │ │ ├── RewardHeader.tsx │ │ │ │ │ ├── RewardReviewItem.tsx │ │ │ │ │ ├── RewardTotalValue.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── PoolSelectDialog.tsx │ │ │ │ ├── SelectPool.tsx │ │ │ │ ├── TxSuccessModal.tsx │ │ │ │ └── useRewardSchema.ts │ │ │ ├── index.tsx │ │ │ └── type.ts │ │ ├── Edit │ │ │ ├── Edit.tsx │ │ │ ├── components │ │ │ │ ├── AddAnotherRewardDialog.tsx │ │ │ │ ├── AddMoreRewardDialog.tsx │ │ │ │ ├── AdjustRewardDialog.tsx │ │ │ │ ├── FarmInfoItem.tsx │ │ │ │ ├── FarmingRewardItem.tsx │ │ │ │ ├── FarmingRewards.tsx │ │ │ │ └── NewRewards.tsx │ │ │ ├── index.tsx │ │ │ ├── schema │ │ │ │ ├── useAddNewRewardSchema.ts │ │ │ │ └── useAdjustRewardSchema.ts │ │ │ └── util.ts │ │ └── useAddReward.ts │ ├── Liquidity │ │ ├── Decrease │ │ │ ├── components │ │ │ │ ├── BalanceInfo.tsx │ │ │ │ ├── RemoveLiquidity.tsx │ │ │ │ └── UnStakeLiquidity.tsx │ │ │ └── index.tsx │ │ ├── Increase │ │ │ ├── Add │ │ │ │ ├── components │ │ │ │ │ └── StakeLpModal.tsx │ │ │ │ └── index.tsx │ │ │ ├── Stake │ │ │ │ └── index.tsx │ │ │ ├── components │ │ │ │ ├── PoolInfo.tsx │ │ │ │ ├── PositionBalance.tsx │ │ │ │ └── StakeableHint.tsx │ │ │ └── index.tsx │ │ ├── components │ │ │ ├── SelectFarmListItem.tsx │ │ │ └── SelectedFarm.tsx │ │ └── utils.ts │ ├── Moonpay │ │ ├── Moonpay.tsx │ │ └── index.tsx │ ├── Pools │ │ ├── Pools.tsx │ │ ├── components │ │ │ ├── CreatePoolButton.tsx │ │ │ ├── PoolChart │ │ │ │ ├── Chart.tsx │ │ │ │ ├── ChartTooltip.tsx │ │ │ │ ├── const.ts │ │ │ │ └── index.tsx │ │ │ ├── PoolDetailMobileDrawer.tsx │ │ │ ├── PoolItemLoadingSkeleton.tsx │ │ │ ├── PoolListHeader.tsx │ │ │ ├── PoolListItem.tsx │ │ │ ├── PoolListItemAprDetailPopoverContent.tsx │ │ │ ├── PoolListItemAprLine.tsx │ │ │ ├── PoolListItemAprPie.tsx │ │ │ ├── PoolListItemRewardStack.tsx │ │ │ ├── PoolTabList.tsx │ │ │ └── TVLInfoPanel.tsx │ │ ├── cssBlocks.ts │ │ ├── index.tsx │ │ ├── useScrollTitleCollapse.ts │ │ └── util.ts │ ├── Portfolio │ │ ├── AcceleraytorAlertChip.tsx │ │ ├── components │ │ │ ├── SectionIdo │ │ │ │ ├── components │ │ │ │ │ └── IdoRowItem.tsx │ │ │ │ └── index.tsx │ │ │ ├── SectionMyFarms │ │ │ │ ├── components │ │ │ │ │ ├── FarmItem.tsx │ │ │ │ │ ├── Period.tsx │ │ │ │ │ ├── Tvl.tsx │ │ │ │ │ ├── Unemitted.tsx │ │ │ │ │ └── WeeklyRewards.tsx │ │ │ │ └── index.tsx │ │ │ ├── SectionMyPositions │ │ │ │ ├── TabClmm.tsx │ │ │ │ ├── TabStaked.tsx │ │ │ │ ├── TabStandard.tsx │ │ │ │ ├── components │ │ │ │ │ ├── Clmm │ │ │ │ │ │ ├── ClmmPositionAccountItem.tsx │ │ │ │ │ │ ├── ClmmPositionAccountItemDetail.tsx │ │ │ │ │ │ ├── ClmmPositionAccountItemDetail │ │ │ │ │ │ │ ├── EstimatedApr.tsx │ │ │ │ │ │ │ ├── NftMintAddress.tsx │ │ │ │ │ │ │ ├── PendingYield.tsx │ │ │ │ │ │ │ └── PoolInfoDrawerFace.tsx │ │ │ │ │ │ ├── ClmmPositionAccountItemDetailMobileDrawer.tsx │ │ │ │ │ │ ├── ClmmPositionAccountItemFace.tsx │ │ │ │ │ │ └── ClmmPositionItemsCard.tsx │ │ │ │ │ ├── Staked │ │ │ │ │ │ ├── Apr.tsx │ │ │ │ │ │ ├── Manipulate.tsx │ │ │ │ │ │ ├── PendingRewards.tsx │ │ │ │ │ │ ├── StakedValue.tsx │ │ │ │ │ │ ├── StakingPositionRawItem.tsx │ │ │ │ │ │ └── TokenBriefFace.tsx │ │ │ │ │ └── Standard │ │ │ │ │ │ ├── ItemDetail │ │ │ │ │ │ ├── ActionButtons.tsx │ │ │ │ │ │ ├── FarmTitleBadge.tsx │ │ │ │ │ │ ├── ItemName.tsx │ │ │ │ │ │ ├── PendingRewards.tsx │ │ │ │ │ │ ├── StandardMyPosition.tsx │ │ │ │ │ │ ├── StandardPoolAPR.tsx │ │ │ │ │ │ ├── TokenInfo.tsx │ │ │ │ │ │ └── TokenPair.tsx │ │ │ │ │ │ ├── StandardPoolRowItem.tsx │ │ │ │ │ │ └── components │ │ │ │ │ │ ├── MobileStandardAMMDetailDrawer.tsx │ │ │ │ │ │ ├── StandardPoolRowStakeFarmHoldItem.tsx │ │ │ │ │ │ └── StandardPoolRowStakeFarmItem.tsx │ │ │ │ └── index.tsx │ │ │ └── SectionOverview │ │ │ │ ├── components │ │ │ │ ├── PortfolioIdle.tsx │ │ │ │ ├── PortfolioInfo.tsx │ │ │ │ └── PortfolioPieChart.tsx │ │ │ │ └── index.tsx │ │ └── index.tsx │ ├── Staking │ │ ├── Staking.tsx │ │ ├── components │ │ │ ├── StakeDialog.tsx │ │ │ ├── StakingPoolItem.tsx │ │ │ └── UnstakeDialog.tsx │ │ └── index.tsx │ ├── Swap │ │ ├── Swap.tsx │ │ ├── components │ │ │ ├── CandleChart.tsx │ │ │ ├── HighRiskAlert.tsx │ │ │ ├── SwapInfoBoard.tsx │ │ │ ├── SwapKlinePanel.tsx │ │ │ ├── SwapKlinePanelMobileDrawer.tsx │ │ │ ├── SwapKlinePanelMobileThumbnail.tsx │ │ │ └── SwapPanel.tsx │ │ ├── index.tsx │ │ ├── swapMeta.tsx │ │ ├── type.ts │ │ ├── useSwap.ts │ │ ├── useSwapStore.ts │ │ └── util.ts │ └── Wormhole │ │ ├── WormholeWidget.tsx │ │ ├── index.tsx │ │ ├── theme.ts │ │ └── types.ts ├── global.d.ts ├── hooks │ ├── app │ │ ├── useInitConnection.ts │ │ ├── useInitMobileDetector.ts │ │ ├── useLoadStorageData.ts │ │ ├── useRefreshChainTime.ts │ │ ├── useRefreshEpochInfo.ts │ │ └── useTokenAccountInfo.ts │ ├── farm │ │ ├── farmUtils.ts │ │ ├── type.ts │ │ ├── useFetchFarmBalance.ts │ │ ├── useFetchFarmByLpMint.ts │ │ ├── useFetchFarmInfoById.ts │ │ ├── useFetchFarmInfoByRpc.ts │ │ ├── useFetchMultipleFarmBalance.ts │ │ ├── useFetchMultipleFarmInfo.ts │ │ └── useFetchMultipleFarmInfoByRpc.ts │ ├── info │ │ ├── useFetchAccountInfo.ts │ │ ├── useFetchMainInfo.ts │ │ └── useFetchMultipleAccountInfo.ts │ ├── pool │ │ ├── amm │ │ │ ├── useFetchCpmmRpcPoolData.ts │ │ │ ├── useFetchRpcPoolData.ts │ │ │ └── useSubscribePoolInfo.ts │ │ ├── clmm │ │ │ ├── useFetchClmmRewardInfo.ts │ │ │ ├── useFetchMultipleRpcClmmInfo.ts │ │ │ ├── useFetchRpcClmmInfo.ts │ │ │ └── useSubscribeClmmInfo.ts │ │ ├── formatter.ts │ │ ├── type.ts │ │ ├── useFetchPoolById.ts │ │ ├── useFetchPoolByLpMint.ts │ │ ├── useFetchPoolByMint.ts │ │ ├── useFetchPoolChartData.ts │ │ ├── useFetchPoolChartLiquidity.ts │ │ ├── useFetchPoolChartVolume.ts │ │ ├── useFetchPoolKLine.ts │ │ ├── useFetchPoolList.tsx │ │ ├── useFetchStakePools.ts │ │ └── useMigratePoolConfig.ts │ ├── portfolio │ │ ├── clmm │ │ │ ├── useClmmBalance.ts │ │ │ ├── useClmmLockPosition.ts │ │ │ ├── useClmmPortfolioData.ts │ │ │ └── useClmmPositionInfo.ts │ │ ├── farm │ │ │ ├── useCreatedFarmInfo.ts │ │ │ └── useFarmPositions.ts │ │ ├── useAllPositionInfo.ts │ │ ├── useAllStandardPoolPosition.ts │ │ ├── useFetchIdoKeys.ts │ │ ├── useFetchOwnerIdo.ts │ │ └── useTokenBalance.ts │ ├── toast │ │ ├── multiToastUtil.ts │ │ ├── retryTx.ts │ │ ├── useGlobalToast.tsx │ │ └── useTxStatus.tsx │ ├── token │ │ ├── api.ts │ │ ├── useBirdeyeTokenPrice.ts │ │ ├── useFetchAccLpMint.ts │ │ ├── useMultipleTokenInfo.ts │ │ ├── useTokenInfo.ts │ │ ├── useTokenPrice.ts │ │ └── useTokenSetting.ts │ ├── useCallbackRef.ts │ ├── useDelayDisclosure.ts │ ├── useElementSizeRectDetector.ts │ ├── useEvent.ts │ ├── useHover.ts │ ├── useIntersectionObserver.ts │ ├── useIsomorphicLayoutEffect.ts │ ├── useMobileDetector.ts │ ├── useOutsideClick.ts │ ├── usePrevious.ts │ ├── useRecordedEffect.ts │ ├── useRefreshEpochInfo.ts │ ├── useResizeObserver.ts │ ├── useResponsive.ts │ ├── useScroll.ts │ ├── useScrollDegreeDetector.ts │ ├── useSearch.ts │ ├── useSort.ts │ ├── useStateWithUrl.ts │ ├── useSyncSignalState.ts │ ├── useTransitionEffect.ts │ ├── useTwinSyncer.ts │ ├── useViewportObserver.ts │ ├── useWindowDimensions.ts │ └── useWindowResize.ts ├── i18n │ ├── en.json │ ├── es.json │ ├── fr.json │ ├── index.ts │ ├── jp.json │ ├── ko.json │ ├── pt.json │ ├── ru.json │ ├── tr.json │ ├── zh-CN.json │ └── zh-TW.json ├── icons │ ├── RaydiumLogo.tsx │ ├── RaydiumLogoOutline.tsx │ ├── media │ │ ├── DiscardMediaIcon.tsx │ │ ├── TelegrameMediaIcon.tsx │ │ └── TwitterMediaIcon.tsx │ ├── misc │ │ ├── AddLiquidityPlus.tsx │ │ ├── AddTokenIcon.tsx │ │ ├── BalanceWalletIcon.tsx │ │ ├── Cart.tsx │ │ ├── ChartInfoIcon.tsx │ │ ├── ChevronDoubleDownIcon.tsx │ │ ├── ChevronDownIcon.tsx │ │ ├── ChevronLeftIcon.tsx │ │ ├── ChevronRightIcon.tsx │ │ ├── ChevronUpIcon.tsx │ │ ├── CircleArrowDown.tsx │ │ ├── CircleArrowRight.tsx │ │ ├── CircleCheck.tsx │ │ ├── CircleCheckBreaker.tsx │ │ ├── CircleCheckFill.tsx │ │ ├── CircleError.tsx │ │ ├── CircleInfo.tsx │ │ ├── CirclePluginIcon.tsx │ │ ├── CirclePlus.tsx │ │ ├── CircleSuccess.tsx │ │ ├── CircleWarning.tsx │ │ ├── ClmmIcon.tsx │ │ ├── Close.tsx │ │ ├── CopyIcon.tsx │ │ ├── DeleteIcon.tsx │ │ ├── DesktopIcon.tsx │ │ ├── DollarIcon.tsx │ │ ├── EditIcon.tsx │ │ ├── ExclaimationCircle.tsx │ │ ├── ExclaimationOctagon.tsx │ │ ├── ExclaimationTriangle.tsx │ │ ├── ExpandDownIcon.tsx │ │ ├── ExpandLeftTopIcon.tsx │ │ ├── ExpandUpIcon.tsx │ │ ├── ExternalLink.tsx │ │ ├── ExternalLinkLargeIcon.tsx │ │ ├── Farm.tsx │ │ ├── FullExpandIcon.tsx │ │ ├── Gear.tsx │ │ ├── GridIcon.tsx │ │ ├── HorizontalSwitchIcon.tsx │ │ ├── HorizontalSwitchSmallIcon.tsx │ │ ├── InfoCircleIcon.tsx │ │ ├── InputLockIcon.tsx │ │ ├── LinkIcon.tsx │ │ ├── LiquidityLockIcon.tsx │ │ ├── ListIcon.tsx │ │ ├── LockIcon.tsx │ │ ├── MenuHamburgerNavIcon.tsx │ │ ├── MinusIcon.tsx │ │ ├── MobileIcon.tsx │ │ ├── MoonIcon.tsx │ │ ├── MoonPayIcon.tsx │ │ ├── MoonPayIconWithText.tsx │ │ ├── MoreListControllers.tsx │ │ ├── NotFound.tsx │ │ ├── OpenBookIcon.tsx │ │ ├── Phantom.tsx │ │ ├── Plus.tsx │ │ ├── PlusCircleIcon.tsx │ │ ├── PlusIcon.tsx │ │ ├── PriorityFastIcon.tsx │ │ ├── PriorityFixIcon.tsx │ │ ├── PriorityTurboIcon.tsx │ │ ├── PriorityUltraIcon.tsx │ │ ├── PulseIcon.tsx │ │ ├── QuestionCircleIcon.tsx │ │ ├── RemoveTokenIcon.tsx │ │ ├── SearchIcon.tsx │ │ ├── SettingIcon.tsx │ │ ├── SliderThumb.tsx │ │ ├── SolGrey.tsx │ │ ├── SortDownIcon.tsx │ │ ├── SquareDIcon.tsx │ │ ├── SquareMIcon.tsx │ │ ├── StarIcon.tsx │ │ ├── SubtractIcon.tsx │ │ ├── SunIcon.tsx │ │ ├── SwapButtonOneTurnIcon.tsx │ │ ├── SwapButtonTwoTurnIcon.tsx │ │ ├── SwapChatEmptyIcon.tsx │ │ ├── SwapChatIcon.tsx │ │ ├── SwapExchangeIcon.tsx │ │ ├── SwapHorizontalIcon.tsx │ │ ├── SwapIcon.tsx │ │ ├── SwapMobileIcon.tsx │ │ ├── SwapPoolItemIcon.tsx │ │ ├── TealCircleCheckBadge.tsx │ │ ├── WalletSelectEggIcon.tsx │ │ ├── WalletSelectWalletIcon.tsx │ │ └── WarningIcon.tsx │ ├── networks │ │ ├── AvalancheNetworkIcon.tsx │ │ ├── BinanceNetworkIcon.tsx │ │ ├── EthereumNetworkIcon.tsx │ │ ├── PolygonNetworkIcon.tsx │ │ └── SolanaNetworkIcon.tsx │ ├── pageNavigation │ │ ├── AcceleraytorPageThumbnailIcon.tsx │ │ ├── BridgePageThumbnailIcon.tsx │ │ ├── DocThumbnailIcon.tsx │ │ ├── FeedbackThumbnailIcon.tsx │ │ ├── LiquidityPageThumbnailIcon.tsx │ │ ├── MoreThumbnailIcon.tsx │ │ ├── PortfolioPageThumbnailIcon.tsx │ │ ├── StakingPageThumbnailIcon.tsx │ │ └── SwapPageThumbnailIcon.tsx │ ├── pool │ │ ├── Exotic.tsx │ │ ├── FarmRewardIcon.tsx │ │ ├── MostPair.tsx │ │ ├── Stable.tsx │ │ └── VeryStable.tsx │ ├── type.ts │ └── wallet │ │ ├── Binance.tsx │ │ ├── Blocto.tsx │ │ ├── Brave.tsx │ │ ├── Coin98.tsx │ │ ├── Coinbase.tsx │ │ ├── Mathwallet.tsx │ │ ├── Metamask.tsx │ │ ├── Opera.tsx │ │ ├── Safepal.tsx │ │ ├── TokenPocket.tsx │ │ ├── Trustwallet.tsx │ │ └── Walletconnect.tsx ├── instrumentation.ts ├── pages │ ├── 404.tsx │ ├── _app.tsx │ ├── _document.tsx │ ├── _error.jsx │ ├── bridge.tsx │ ├── clmm │ │ ├── create-pool.tsx │ │ ├── create-position.tsx │ │ └── lock.tsx │ ├── debug.tsx │ ├── docs │ │ └── disclaimer.tsx │ ├── farms │ │ ├── create.tsx │ │ └── edit.tsx │ ├── index.tsx │ ├── liquidity-pools.tsx │ ├── liquidity │ │ ├── create-farm.tsx │ │ ├── create-pool.tsx │ │ ├── decrease.tsx │ │ └── increase.tsx │ ├── logs.tsx │ ├── moonpay.tsx │ ├── playground.tsx │ ├── portfolio.tsx │ ├── settings.tsx │ ├── staking.tsx │ └── swap.tsx ├── provider │ ├── GlobalColorProvider.tsx │ ├── Ledger │ │ ├── LedgerWalletAdapter.ts │ │ ├── polyfill.ts │ │ └── util.ts │ ├── ThemeProvider.tsx │ ├── WalletProvider.tsx │ └── index.tsx ├── store │ ├── configs │ │ ├── clmm.tsx │ │ ├── farm.tsx │ │ ├── liquidity.tsx │ │ └── market.tsx │ ├── createStore.ts │ ├── index.ts │ ├── useAppStore.ts │ ├── useClmmStore.ts │ ├── useCreateMarketStore.ts │ ├── useEVMStore.ts │ ├── useFarmStore.ts │ ├── useLiquidityStore.ts │ ├── useTokenAccountStore.ts │ └── useTokenStore.ts ├── theme │ ├── components │ │ ├── Alert.ts │ │ ├── Avatar.ts │ │ ├── Badge.ts │ │ ├── Button.ts │ │ ├── Card.ts │ │ ├── Checkbox.ts │ │ ├── Divider.ts │ │ ├── Drawer.ts │ │ ├── FormLabel.ts │ │ ├── Input.ts │ │ ├── Link.ts │ │ ├── Menu.ts │ │ ├── Modal.ts │ │ ├── NumberInput.ts │ │ ├── Popover.ts │ │ ├── Progress.ts │ │ ├── Slider.ts │ │ ├── Spinner.ts │ │ ├── Stepper.ts │ │ ├── Switch.ts │ │ ├── Table.ts │ │ ├── Tabs.ts │ │ ├── Tag.ts │ │ ├── Text.ts │ │ └── Tooltip.ts │ ├── cssBlocks.ts │ ├── cssValue │ │ └── getViewportExpression.ts │ ├── cssVariables │ │ ├── colors.ts │ │ ├── index.ts │ │ ├── shadow.ts │ │ └── size.ts │ ├── detailConfig.ts │ ├── foundations │ │ ├── breakpoints.ts │ │ ├── fontSize.ts │ │ └── radii.ts │ ├── index.ts │ └── styles.ts ├── type.ts ├── types │ ├── tools.ts │ └── tx.ts └── utils │ ├── arrayMethods.ts │ ├── changeCase.ts │ ├── common.ts │ ├── config │ └── birdeyeAPI.ts │ ├── date.ts │ ├── dom │ ├── onBreackpointChange.ts │ ├── onNodeChildrenChange.ts │ └── onWindowSizeChange.ts │ ├── duration.ts │ ├── functionMethods.ts │ ├── judges │ ├── areEqual.ts │ └── judgeType.ts │ ├── listToMap.ts │ ├── localStorage.ts │ ├── log.ts │ ├── merge.ts │ ├── numberish │ ├── formatter.ts │ ├── regex.ts │ ├── toApr.ts │ └── toPercentString.ts │ ├── objectTools.ts │ ├── parallelSwitch.ts │ ├── pool │ ├── formatAmmKeys.ts │ └── nameFormat.ts │ ├── publicKey.ts │ ├── react │ ├── addPropsToReactElement.ts │ ├── getElementsFromRef.ts │ ├── mergeProps.ts │ ├── mergeRef.ts │ └── pickChild.ts │ ├── routeTools.ts │ ├── searchItems.ts │ ├── shakeUndefindedItem.ts │ ├── shrinkToValue.ts │ ├── sortItems.ts │ ├── startLazyIntervalTask.ts │ ├── time.ts │ ├── token.ts │ ├── tx │ ├── computeBudget.ts │ ├── getEphemeralSigners.ts │ ├── historyTxStatus.ts │ └── swapError.ts │ └── url.ts ├── tsconfig.json └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | out/* 3 | .next/* 4 | misc/* 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # vscode local history 7 | .history 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env.local 30 | .env.development.local 31 | .env.test.local 32 | .env.production.local 33 | 34 | # vercel 35 | .vercel 36 | 37 | #ts 38 | tsconfig.tsbuildinfo 39 | 40 | # Sentry 41 | .sentry.properties 42 | 43 | # Sentry Config File 44 | .env.sentry-build-plugin 45 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | yarn type-check 5 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "bracketSpacing": true, 4 | "eslintIntegration": true, 5 | "overrides": [ 6 | { 7 | "files": ".prettierrc", 8 | "options": { 9 | "parser": "typescript" 10 | } 11 | } 12 | ], 13 | "printWidth": 140, 14 | "semi": false, 15 | "singleQuote": true, 16 | "tabWidth": 2, 17 | "trailingComma": "none", 18 | "useTabs": false 19 | } -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | // prettier 4 | "esbenp.prettier-vscode", 5 | // control prettier format flow 6 | "rohit-gohri.format-code-action", 7 | // colorful comments 8 | "aaron-bond.better-comments" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /public/Chillax-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/Chillax-Regular.woff2 -------------------------------------------------------------------------------- /public/Chillax-Semibold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/Chillax-Semibold.woff2 -------------------------------------------------------------------------------- /public/SpaceGrotesk[wght].woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/SpaceGrotesk[wght].woff2 -------------------------------------------------------------------------------- /public/actions.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": [ 3 | { 4 | "pathPattern": "/swap/**", 5 | "apiPath": "https://share.raydium.io/dialect/actions/swap/info/**" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/favicon.ico -------------------------------------------------------------------------------- /public/icons/acceleraytor-list-collapse-open.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /public/icons/acceleraytor-list-medium.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /public/icons/acceleraytor-medium.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/icons/acceleraytor-telegram.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /public/icons/acceleraytor-twitch.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /public/icons/acceleraytor-twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /public/icons/acceleraytor-youtube.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /public/images/clmm-nft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/clmm-nft.png -------------------------------------------------------------------------------- /public/images/disclaimer-page-bg.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/disclaimer-page-bg.webp -------------------------------------------------------------------------------- /public/images/done.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/done.png -------------------------------------------------------------------------------- /public/images/explorer-solana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/explorer-solana.png -------------------------------------------------------------------------------- /public/images/explorer-solanaFM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/explorer-solanaFM.png -------------------------------------------------------------------------------- /public/images/explorer-solscan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/explorer-solscan.png -------------------------------------------------------------------------------- /public/images/moonpay-dots.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /public/images/moonpay-gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/moonpay-gradient.png -------------------------------------------------------------------------------- /public/images/payments/apple.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/payments/apple.webp -------------------------------------------------------------------------------- /public/images/payments/google.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/payments/google.webp -------------------------------------------------------------------------------- /public/images/payments/mastercard.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/payments/mastercard.webp -------------------------------------------------------------------------------- /public/images/payments/paypal.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/payments/paypal.webp -------------------------------------------------------------------------------- /public/images/payments/visa.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/images/payments/visa.webp -------------------------------------------------------------------------------- /public/images/volume-total.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/public/logo.png -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /sentry.client.config.ts: -------------------------------------------------------------------------------- 1 | // This file configures the initialization of Sentry on the client. 2 | // The config you add here will be used whenever a users loads a page in their browser. 3 | // https://docs.sentry.io/platforms/javascript/guides/nextjs/ 4 | 5 | import * as Sentry from '@sentry/nextjs' 6 | import { beforeSend, beforeSendSpan } from './sentryUtils' 7 | 8 | Sentry.init({ 9 | dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, 10 | 11 | // Adjust this value in production, or use tracesSampler for greater control 12 | tracesSampleRate: 1, 13 | 14 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 15 | debug: false, 16 | replaysOnErrorSampleRate: 1.0, 17 | 18 | // This sets the sample rate to be 10%. You may want this to be 100% while 19 | // in development and sample at a lower rate in production 20 | replaysSessionSampleRate: 0.1, 21 | 22 | // You can remove this option if you're not planning to use the Sentry Session Replay feature: 23 | integrations: [ 24 | Sentry.replayIntegration({ 25 | // Additional Replay configuration goes in here, for example: 26 | maskAllText: true, 27 | blockAllMedia: true 28 | }) 29 | ], 30 | beforeSendSpan, 31 | beforeSend 32 | }) 33 | -------------------------------------------------------------------------------- /sentry.edge.config.ts: -------------------------------------------------------------------------------- 1 | // This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on). 2 | // The config you add here will be used whenever one of the edge features is loaded. 3 | // Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally. 4 | // https://docs.sentry.io/platforms/javascript/guides/nextjs/ 5 | 6 | import * as Sentry from '@sentry/nextjs' 7 | import { beforeSend, beforeSendSpan } from './sentryUtils' 8 | Sentry.init({ 9 | dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, 10 | 11 | // Adjust this value in production, or use tracesSampler for greater control 12 | tracesSampleRate: 1, 13 | 14 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 15 | debug: false, 16 | beforeSend, 17 | beforeSendSpan 18 | }) 19 | -------------------------------------------------------------------------------- /sentry.server.config.ts: -------------------------------------------------------------------------------- 1 | // This file configures the initialization of Sentry on the server. 2 | // The config you add here will be used whenever the server handles a request. 3 | // https://docs.sentry.io/platforms/javascript/guides/nextjs/ 4 | 5 | import * as Sentry from '@sentry/nextjs' 6 | import { beforeSend, beforeSendSpan } from './sentryUtils' 7 | 8 | Sentry.init({ 9 | dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, 10 | 11 | // Adjust this value in production, or use tracesSampler for greater control 12 | tracesSampleRate: 1, 13 | 14 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 15 | debug: false, 16 | 17 | // Uncomment the line below to enable Spotlight (https://spotlightjs.com) 18 | // spotlight: process.env.NODE_ENV === 'development', 19 | beforeSendSpan, 20 | beforeSend 21 | }) 22 | -------------------------------------------------------------------------------- /src/api/event.ts: -------------------------------------------------------------------------------- 1 | import { parseUserAgent } from 'react-device-detect' 2 | import axios from './axios' 3 | import { useAppStore } from '@/store/useAppStore' 4 | 5 | interface EventTypeConnectWallet { 6 | walletName: string 7 | connectStatus: 'success' | 'userUnlink' | 'failure' 8 | type: 'connectWallet' 9 | // deviceType: 'pc' | 'mobile' | 'tablet' 10 | errorMsg?: string 11 | } 12 | 13 | export const sendWalletEvent = async (props: EventTypeConnectWallet) => { 14 | try { 15 | const deviceInfo = parseUserAgent(window.navigator.userAgent) 16 | const deviceType = deviceInfo.device.type || 'pc' 17 | axios.post(`${useAppStore.getState().urlConfigs.MONITOR_BASE_HOST}/event`, { 18 | ...props, 19 | deviceType 20 | }) 21 | } catch { 22 | console.log('send event error') 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/components/AlertChip.tsx: -------------------------------------------------------------------------------- 1 | import WarningIcon from '@/icons/misc/WarningIcon' 2 | import { colors } from '@/theme/cssVariables' 3 | import { Box, Collapse, HStack, Spacer, useColorMode } from '@chakra-ui/react' 4 | import { ReactNode } from 'react' 5 | import { X } from 'react-feather' 6 | 7 | export function AlertChip(props: { isOpen?: boolean; onClose?: () => void; alertContent?: ReactNode }) { 8 | const { colorMode } = useColorMode() 9 | const isLight = colorMode === 'light' 10 | return ( 11 | 12 | 19 | 20 | 21 | 22 | {props.alertContent} 23 | 24 | 25 | 26 | 27 | 28 | 29 | ) 30 | } 31 | -------------------------------------------------------------------------------- /src/components/AppLayout/AppVersion.tsx: -------------------------------------------------------------------------------- 1 | import { useAppStore } from '@/store' 2 | import { colors } from '@/theme/cssVariables' 3 | import { toUTC } from '@/utils/date' 4 | import { Flex, Text } from '@chakra-ui/react' 5 | import { useState, useEffect } from 'react' 6 | 7 | function AppVersion() { 8 | const appVersion = useAppStore((s) => s.appVersion) 9 | const chainTimeOffset = useAppStore((s) => s.chainTimeOffset) 10 | const [time, setTime] = useState('') 11 | 12 | useEffect(() => { 13 | setTime(toUTC(new Date(Date.now() + chainTimeOffset))) 14 | }, [chainTimeOffset]) 15 | 16 | return ( 17 | 18 | {/* version */} 19 | {appVersion} 20 | {/* **block chain** current time */} 21 | {time} 22 | 23 | ) 24 | } 25 | 26 | export default AppVersion 27 | -------------------------------------------------------------------------------- /src/components/AppLayout/components/ColorThemeSettingField.tsx: -------------------------------------------------------------------------------- 1 | import { useColorMode } from '@chakra-ui/react' 2 | 3 | import Tabs from '@/components/Tabs' 4 | import MoonIcon from '@/icons/misc/MoonIcon' 5 | import SunIcon from '@/icons/misc/SunIcon' 6 | 7 | import { SettingField } from './SettingField' 8 | import { colors } from '@/theme/cssVariables' 9 | import { useTranslation } from 'react-i18next' 10 | 11 | export function ColorThemeSettingField() { 12 | const { t } = useTranslation() 13 | const { colorMode, toggleColorMode } = useColorMode() 14 | 15 | return ( 16 | }, 25 | { value: 'light', label: (isActive) => } 26 | ]} 27 | size="md" 28 | /> 29 | } 30 | /> 31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /src/components/AppLayout/components/SettingFieldDivider.tsx: -------------------------------------------------------------------------------- 1 | import { Divider as _Divider } from '@chakra-ui/react' 2 | 3 | export function Divider() { 4 | return <_Divider my={3}> 5 | } 6 | -------------------------------------------------------------------------------- /src/components/AppLayout/components/SettingFieldToggleButton.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Flex, HStack } from '@chakra-ui/react' 2 | import { ReactNode } from 'react' 3 | import { ChevronUp, ChevronDown } from 'react-feather' 4 | import { colors } from '@/theme/cssVariables' 5 | 6 | export function SettingFieldToggleButton(props: { isOpen?: boolean; renderContent?: ReactNode }) { 7 | return ( 8 | 19 | {props.isOpen ? ( 20 | 21 | 22 | 23 | ) : ( 24 | 25 | {props.renderContent} 26 | 27 | 28 | 29 | 30 | )} 31 | 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /src/components/AppLayout/components/VersionedTransactionSettingField.tsx: -------------------------------------------------------------------------------- 1 | import { Switch } from '@chakra-ui/react' 2 | import { TxVersion } from '@raydium-io/raydium-sdk-v2' 3 | import { useAppStore } from '@/store/useAppStore' 4 | import { SettingField } from './SettingField' 5 | import { useTranslation } from 'react-i18next' 6 | 7 | export function VersionedTransactionSettingField() { 8 | const { t } = useTranslation() 9 | const txVersion = useAppStore((s) => s.txVersion) 10 | const handleChange = () => { 11 | useAppStore.setState( 12 | { 13 | txVersion: txVersion === TxVersion.LEGACY ? TxVersion.V0 : TxVersion.LEGACY 14 | }, 15 | false, 16 | { type: 'VersionedTransactionSettingField' } as any 17 | ) 18 | } 19 | return ( 20 | } 24 | /> 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /src/components/CalloutNote.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Text } from '@chakra-ui/react' 2 | import { ReactNode } from 'react' 3 | import { colors } from '@/theme/cssVariables' 4 | 5 | export interface CalloutNoteProps { 6 | header?: ReactNode 7 | content?: ReactNode 8 | } 9 | 10 | export default function CalloutNote({ header, content: detail }: CalloutNoteProps) { 11 | return ( 12 | 13 | 14 | {header}: 15 | 16 | 17 | {detail} 18 | 19 | 20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /src/components/ChevronUpDownArrow.tsx: -------------------------------------------------------------------------------- 1 | import ChevronDownIcon from '@/icons/misc/ChevronDownIcon' 2 | import { SvgIcon } from '@/icons/type' 3 | import { Box } from '@chakra-ui/react' 4 | 5 | export default function ChevronUpDownArrow(props: SvgIcon & { isOpen?: boolean }) { 6 | const { isOpen, ...restProps } = props 7 | return ( 8 | 9 | 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/components/ConnectedButton.tsx: -------------------------------------------------------------------------------- 1 | import { useAppStore } from '@/store' 2 | import { Button, ButtonProps } from '@chakra-ui/react' 3 | import { useWalletModal } from '@solana/wallet-adapter-react-ui' 4 | import { LegacyRef, PropsWithChildren, forwardRef, useCallback } from 'react' 5 | import { useTranslation } from 'react-i18next' 6 | 7 | type Props = PropsWithChildren 8 | 9 | export default forwardRef(function ConnectedButton({ children, onClick, isDisabled, ...props }: Props, ref: LegacyRef) { 10 | const { t } = useTranslation() 11 | const connected = useAppStore((s) => s.connected) 12 | const { setVisible } = useWalletModal() 13 | const handleClick = useCallback(() => setVisible(true), [setVisible]) 14 | 15 | return ( 16 | 24 | ) 25 | }) 26 | -------------------------------------------------------------------------------- /src/components/ConnectedOnly.tsx: -------------------------------------------------------------------------------- 1 | import { useAppStore } from '@/store/useAppStore' 2 | import { ReactNode } from 'react' 3 | 4 | function ConnectedOnly({ children }: { children: ReactNode }) { 5 | const connected = useAppStore((s) => s.connected) 6 | return connected ? <>{children} : null 7 | } 8 | 9 | export default ConnectedOnly 10 | -------------------------------------------------------------------------------- /src/components/Content.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren } from 'react' 2 | 3 | import useInitConnection from '../hooks/app/useInitConnection' 4 | import useTokenAccountInfo from '../hooks/app/useTokenAccountInfo' 5 | import useRefreshChainTime from '../hooks/app/useRefreshChainTime' 6 | import useGlobalToast from '../hooks/toast/useGlobalToast' 7 | import useTxStatus from '../hooks/toast/useTxStatus' 8 | import useTokenSetting from '../hooks/token/useTokenSetting' 9 | import useInitMobileDetector from '@/hooks/app/useInitMobileDetector' 10 | import useLoadStorageData from '@/hooks/app/useLoadStorageData' 11 | import AppVersion from './AppVersion' 12 | 13 | export default function Content({ children, ...props }: PropsWithChildren) { 14 | // data related hooks 15 | useInitConnection(props) 16 | useTokenAccountInfo() 17 | useRefreshChainTime() 18 | useTokenSetting() 19 | useLoadStorageData() 20 | 21 | // ui related hooks 22 | useInitMobileDetector() 23 | useTxStatus() 24 | useGlobalToast() 25 | return ( 26 | <> 27 | 28 | {children} 29 | 30 | ) 31 | } 32 | -------------------------------------------------------------------------------- /src/components/DateTimePicker/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './DatePick' 2 | export * from './TimePick' 3 | -------------------------------------------------------------------------------- /src/components/ExchangeRate.tsx: -------------------------------------------------------------------------------- 1 | import { TokenInfo, Price } from '@raydium-io/raydium-sdk-v2' 2 | 3 | interface Props { 4 | tokenInput: TokenInfo 5 | tokenOutput: TokenInfo 6 | executionPrice?: Price 7 | } 8 | 9 | export default function ExchangeRate(props: Props) { 10 | const { tokenInput, tokenOutput, executionPrice } = props 11 | if (!executionPrice || executionPrice?.raw.isZero()) return null 12 | return ( 13 |
14 | 1 {tokenInput.symbol} ≈ {executionPrice.toFixed()}
1 {tokenOutput.symbol} ≈ {executionPrice.invert().toFixed()} 15 |
16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /src/components/LandingPage/Facilitate.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Center, Flex, Heading } from '@chakra-ui/react' 2 | 3 | import { colors } from '@/theme/cssVariables' 4 | 5 | import facilitate from './images/facilitate.png' 6 | 7 | export default function Facilitate() { 8 | return ( 9 | 10 |
11 | 12 | 13 | Facilitating Crosschain Liquidity 14 | 15 | 16 | 17 |
18 |
19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /src/components/LandingPage/Partner.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Center, Flex, Heading, Wrap, WrapItem } from '@chakra-ui/react' 2 | 3 | import { colors } from '@/theme/cssVariables' 4 | 5 | import serum from './images/serum.png' 6 | import solana from './images/solana.png' 7 | import sushi from './images/sushi.png' 8 | 9 | export default function Partner() { 10 | return ( 11 | 12 |
13 | 14 | 15 | Our Partners 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /src/components/LandingPage/components/FooterItem.tsx: -------------------------------------------------------------------------------- 1 | import { Box } from '@chakra-ui/react' 2 | 3 | import { colors } from '@/theme/cssVariables' 4 | 5 | export default function FooterItem({ children }: { key: string; children: React.ReactNode }) { 6 | return ( 7 | 8 | {children} 9 | 10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /src/components/LandingPage/components/FooterTitle.tsx: -------------------------------------------------------------------------------- 1 | import { Box } from '@chakra-ui/react' 2 | 3 | export default function FooterTitle({ title }: { title: string }) { 4 | return ( 5 | 6 | {title} 7 | 8 | 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /src/components/LandingPage/components/TotalValueVolume.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Flex, Text } from '@chakra-ui/react' 2 | 3 | import { colors } from '@/theme/cssVariables' 4 | 5 | export default function TotalValueVolume() { 6 | return ( 7 | 8 | 9 | 10 | 11 | ) 12 | } 13 | 14 | function ValueDisplay({ title, value }: { title: string; value: number }) { 15 | return ( 16 | 17 | 18 | {title} 19 | 20 | 31 | $ {value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')} 32 | 33 | 34 | ) 35 | } 36 | -------------------------------------------------------------------------------- /src/components/LandingPage/components/tvl.css: -------------------------------------------------------------------------------- 1 | .tvl { 2 | color: #313149; 3 | padding: 52px 70px 45px 70px; 4 | display: inline-block; 5 | margin: 75px 0; 6 | position: relative; 7 | z-index: 0; 8 | box-shadow: inset 0px 0px 15.6531px #8f76f0, 0px 0px 17.18px rgba(142, 117, 240, 0.4), 0px 0px 15.6531px rgba(143, 117, 240, 0.38); 9 | border-radius: 20px; 10 | } 11 | @media (max-width: 1000px) { 12 | .tvl { 13 | padding: 35px 25px 35px 25px; 14 | } 15 | } 16 | .tvl:before { 17 | content: ''; 18 | position: absolute; 19 | z-index: -1; 20 | inset: 0; 21 | padding: 2px; 22 | border-radius: 20px; 23 | background: linear-gradient(to right, #abc4ff, #7748fc); 24 | -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); 25 | mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); 26 | -webkit-mask-composite: xor; 27 | mask-composite: exclude; 28 | } 29 | -------------------------------------------------------------------------------- /src/components/LandingPage/images/ExpandArrowDown.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '@/icons/type' 2 | 3 | export default function ExpandArrowDown(props: SvgIcon) { 4 | const { width = 10, height = 5 } = props 5 | 6 | return ( 7 | 8 | 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/components/LandingPage/images/FooterBg.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '@/icons/type' 2 | 3 | export default function FooterBg(props: SvgIcon) { 4 | const { width = 1440, height = 696 } = props 5 | 6 | return ( 7 | 8 | 12 | 13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /src/components/LandingPage/images/entry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/src/components/LandingPage/images/entry.png -------------------------------------------------------------------------------- /src/components/LandingPage/images/expand-arrow-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/components/LandingPage/images/facilitate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/src/components/LandingPage/images/facilitate.png -------------------------------------------------------------------------------- /src/components/LandingPage/images/feature-card-fig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/src/components/LandingPage/images/feature-card-fig.png -------------------------------------------------------------------------------- /src/components/LandingPage/images/footer-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/src/components/LandingPage/images/footer-bg.png -------------------------------------------------------------------------------- /src/components/LandingPage/images/liquidity-amm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/src/components/LandingPage/images/liquidity-amm.png -------------------------------------------------------------------------------- /src/components/LandingPage/images/liquidity-card-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/src/components/LandingPage/images/liquidity-card-chart.png -------------------------------------------------------------------------------- /src/components/LandingPage/images/liquidity-launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/src/components/LandingPage/images/liquidity-launch.png -------------------------------------------------------------------------------- /src/components/LandingPage/images/liquidity-swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/src/components/LandingPage/images/liquidity-swap.png -------------------------------------------------------------------------------- /src/components/LandingPage/images/serum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/src/components/LandingPage/images/serum.png -------------------------------------------------------------------------------- /src/components/LandingPage/images/solana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/src/components/LandingPage/images/solana.png -------------------------------------------------------------------------------- /src/components/LandingPage/images/sushi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solutionwizard928/Raydium-UI-V3/941fdbb4b40cd31d267a233e647b14abbf224a43/src/components/LandingPage/images/sushi.png -------------------------------------------------------------------------------- /src/components/LandingPage/liquidity.css: -------------------------------------------------------------------------------- 1 | .landing-liquidity-card { 2 | background-color: rgba(255, 255, 255, 0.06); 3 | border-radius: 20px; 4 | max-width: 360px; 5 | height: 421px; 6 | padding: 41px 40px; 7 | } 8 | -------------------------------------------------------------------------------- /src/components/Loader/styled.tsx: -------------------------------------------------------------------------------- 1 | import styled from '@emotion/styled' 2 | import { keyframes } from '@emotion/react' 3 | 4 | export const loadingAnimation = keyframes` 5 | 0% { 6 | background-position: 100% 50%; 7 | } 8 | 100% { 9 | background-position: 0% 50%; 10 | } 11 | ` 12 | 13 | export const LoadingRows = styled.div` 14 | display: grid; 15 | 16 | & > div { 17 | animation: ${loadingAnimation} 1.5s infinite; 18 | animation-fill-mode: both; 19 | background: linear-gradient(to left, #f5f6fc 25%, #e8ecfb 50%, #f5f6fc 75%); 20 | background-size: 400%; 21 | border-radius: 12px; 22 | height: 2.4em; 23 | will-change: background-position; 24 | } 25 | ` 26 | 27 | export const LoadingOpacityContainer = styled.div<{ $loading: boolean }>` 28 | filter: ${({ $loading }) => ($loading ? 'grayscale(1)' : 'none')}; 29 | opacity: ${({ $loading }) => ($loading ? '0.4' : '1')}; 30 | transition: opacity 0.2s ease-in-out; 31 | ` 32 | -------------------------------------------------------------------------------- /src/components/LoopCircle.tsx: -------------------------------------------------------------------------------- 1 | import { useState, useEffect, useCallback, MouseEvent } from 'react' 2 | import { CircularProgress } from '@chakra-ui/react' 3 | 4 | interface Props { 5 | replay: number 6 | onReplay?: () => void 7 | } 8 | 9 | export default function LoopCircle({ replay, onReplay }: Props) { 10 | const [progress, setProgress] = useState(0) 11 | 12 | const reReplayFn = useCallback(() => { 13 | onReplay?.() 14 | setProgress(0) 15 | setTimeout(() => { 16 | setProgress(100) 17 | }, 10) 18 | }, [onReplay]) 19 | 20 | const handleClick = useCallback( 21 | (e: MouseEvent) => { 22 | e.preventDefault() 23 | reReplayFn() 24 | }, 25 | [reReplayFn] 26 | ) 27 | 28 | useEffect(() => { 29 | setProgress(100) 30 | const elem = document.querySelector('.chakra-progress .chakra-progress__indicator')! 31 | elem.ontransitionend = function () { 32 | reReplayFn() 33 | } 34 | }, [reReplayFn]) 35 | 36 | return ( 37 | 47 | ) 48 | } 49 | -------------------------------------------------------------------------------- /src/components/MobileDesktop.tsx: -------------------------------------------------------------------------------- 1 | import { useAppStore } from '@/store' 2 | import { ReactNode } from 'react' 3 | 4 | export default function MobileDesktop(props: { 5 | mobile?: ReactNode 6 | pc?: ReactNode 7 | /** props:children is an shortcut of props:pc */ 8 | children?: ReactNode 9 | }) { 10 | return ( 11 | <> 12 | {props.pc ?? props.children} 13 | {props.mobile} 14 | 15 | ) 16 | } 17 | 18 | /** 19 | * chakra's `` is not react in time, so just use AppStore 20 | */ 21 | export function Desktop(props: { children: ReactNode }) { 22 | const isMobile = useAppStore((s) => s.isMobile) 23 | return isMobile ? null : <>{props.children} 24 | } 25 | 26 | /** 27 | * chakra's `` is not react in time, so just use AppStore 28 | */ 29 | export function Mobile(props: { children: ReactNode }) { 30 | const isMobile = useAppStore((s) => s.isMobile) 31 | return isMobile ? <>{props.children} : null 32 | } 33 | -------------------------------------------------------------------------------- /src/components/PageHeroTitle.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * used in main page hero part 3 | */ 4 | 5 | import { useAppStore } from '@/store' 6 | import { heroGridientColorCSSBlock } from '@/theme/cssBlocks' 7 | import { colors } from '@/theme/cssVariables' 8 | import { Text, VStack } from '@chakra-ui/react' 9 | 10 | export default function PageHeroTitle({ title, description }: { title: string; description?: string }) { 11 | const isMobile = useAppStore((s) => s.isMobile) 12 | return ( 13 | 14 | {isMobile ? null : {title}} 15 | {description && ( 16 | 17 | {description} 18 | 19 | )} 20 | 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /src/components/Pagination/index.tsx: -------------------------------------------------------------------------------- 1 | import Pagination from './Pagination' 2 | 3 | export default Pagination 4 | -------------------------------------------------------------------------------- /src/components/Pagination/interface.ts: -------------------------------------------------------------------------------- 1 | import { ReactNode } from 'react' 2 | 3 | export interface PaginationProps { 4 | current?: number 5 | pageSize?: number 6 | total?: number 7 | defaultCurrent?: number 8 | defaultPageSize?: number 9 | showTotal?: boolean | ((total: number, range: number[]) => ReactNode) 10 | bufferSize?: number 11 | onChange?: (pageNumber: number, pageSize: number) => void 12 | } 13 | -------------------------------------------------------------------------------- /src/components/PanelCard.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { panelCard } from '@/theme/cssBlocks' 3 | import { Box, BoxProps } from '@chakra-ui/react' 4 | 5 | export interface PanelCardProps extends BoxProps { 6 | variant?: 'light' | 'dark' 7 | } 8 | 9 | const PanelCard = React.forwardRef((props, ref) => { 10 | return 11 | }) 12 | 13 | PanelCard.displayName = 'PanelCard' 14 | 15 | /** @deprecated just use block:{@link panelCard} */ 16 | export default PanelCard 17 | -------------------------------------------------------------------------------- /src/components/SimpleList/interface.ts: -------------------------------------------------------------------------------- 1 | import { HTMLAttributes, MutableRefObject, ReactNode } from 'react' 2 | import { PaginationProps } from '../Pagination/interface' 3 | import { GridProps, GridItemProps } from '@chakra-ui/react' 4 | 5 | type ListGridProps = { 6 | column?: number 7 | } & Pick & 8 | Pick 9 | 10 | export type ListHandle = { 11 | dom: HTMLDivElement | null 12 | scrollIntoView: (index: number) => void 13 | } 14 | 15 | export interface ListProps { 16 | dataSource?: T[] 17 | render?: (item: T, index: number) => ReactNode 18 | children?: ReactNode 19 | pagination?: boolean | PaginationProps 20 | grid?: ListGridProps 21 | onReachBottom?: (currentPage: number) => void 22 | offsetBottom?: number 23 | defaultCurrent?: number 24 | throttleDelay?: number 25 | listRef?: MutableRefObject 26 | onListScroll?: (elem: Element) => void 27 | } 28 | 29 | export interface ListItemProps extends HTMLAttributes { 30 | children?: ReactNode 31 | } 32 | -------------------------------------------------------------------------------- /src/components/SimpleList/item.tsx: -------------------------------------------------------------------------------- 1 | import React, { forwardRef, ForwardedRef, ReactElement } from 'react' 2 | import { Box } from '@chakra-ui/react' 3 | import { ListItemProps } from './interface' 4 | 5 | const defaultProps: Partial = {} 6 | 7 | function Item(baseProps: ListItemProps, ref: ForwardedRef) { 8 | const props = { 9 | ...defaultProps, 10 | ...baseProps 11 | } 12 | const { children, ...rest } = props 13 | 14 | const mainContent: ReactElement[] = [] 15 | 16 | React.Children.forEach(children as ReactElement[], (element: ReactElement) => { 17 | mainContent.push(element) 18 | }) 19 | 20 | const content = mainContent.length ? mainContent : null 21 | 22 | return ( 23 | 24 | 25 | {content} 26 | 27 | 28 | ) 29 | } 30 | 31 | const ItemComponent = forwardRef(Item) 32 | 33 | ItemComponent.displayName = 'SimpleListItem' 34 | 35 | export default ItemComponent 36 | -------------------------------------------------------------------------------- /src/components/SortUpDownArrow.tsx: -------------------------------------------------------------------------------- 1 | import SortDownIcon from '@/icons/misc/SortDownIcon' 2 | import { SvgIcon } from '@/icons/type' 3 | import { Box } from '@chakra-ui/react' 4 | 5 | export default function SortUpDownArrow(props: SvgIcon & { isDown?: boolean }) { 6 | const { width = 6, height = 6, isDown, ...restProps } = props 7 | return ( 8 | 9 | 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/components/Tag.tsx: -------------------------------------------------------------------------------- 1 | import { colors, sizes } from '@/theme/cssVariables' 2 | import { Box, BoxProps } from '@chakra-ui/react' 3 | import { ReactNode } from 'react' 4 | 5 | export default function Tag(props: { children?: ReactNode } & BoxProps) { 6 | return ( 7 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /src/components/Toast/ToastTransaction.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Flex, Spacer } from '@chakra-ui/react' 2 | 3 | import CircleCheck from '@/icons/misc/CircleCheck' 4 | import ExternalLink from '@/icons/misc/ExternalLink' 5 | import { colors } from '@/theme/cssVariables' 6 | 7 | interface ToastTransactionProps { 8 | serialNum: number 9 | } 10 | 11 | export default function ToastTransaction({ serialNum }: ToastTransactionProps) { 12 | return ( 13 | 14 | 15 | 16 | 17 | Transaction {serialNum} 18 | 19 | 20 | 21 | View on  22 | 23 | solscan 24 | 25 | 26 | 27 | 28 | 29 | ) 30 | } 31 | -------------------------------------------------------------------------------- /src/components/Toast/toast.css: -------------------------------------------------------------------------------- 1 | @keyframes shrink { 2 | from { 3 | transform-origin: left center; 4 | transform: scaleX(1); 5 | } 6 | to { 7 | transform-origin: left center; 8 | transform: scaleX(0); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/TokenSelectDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './TokenSelectDialog' 2 | export type { TokenSelectDialogProps } from './TokenSelectDialog' 3 | -------------------------------------------------------------------------------- /src/features/Clmm/ClmmPosition/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './CreatePosition' 2 | -------------------------------------------------------------------------------- /src/features/Clmm/Lock/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './Lock' 2 | -------------------------------------------------------------------------------- /src/features/Clmm/MigrateClmmFromStandardDialog/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Dialog' 2 | -------------------------------------------------------------------------------- /src/features/Clmm/MigrateClmmFromStandardDialog/useValidateSchema.ts: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from 'react' 2 | import * as yup from 'yup' 3 | import Decimal from 'decimal.js' 4 | 5 | const numberTransform = yup.number().transform((value) => (isNaN(value) ? 0 : value)) 6 | const numberSchema = (errMsg: string) => numberTransform.moreThan(0, errMsg) 7 | 8 | export default function useValidateSchema(props: { priceUpper: string; priceLower: string }) { 9 | const [error, setError] = useState() 10 | 11 | const schema = yup.object().shape({ 12 | priceUpper: numberSchema('upperPrice').test('is-upper-valid', 'upperPrice', function (val) { 13 | return new Decimal(val || 0).gt(this.parent.priceLower) 14 | }), 15 | priceLower: numberSchema('lowerPrice').test('is-lower-valid', 'lowerPrice', function (val) { 16 | return new Decimal(val || 0).lt(this.parent.priceUpper) 17 | }) 18 | }) 19 | 20 | useEffect(() => { 21 | try { 22 | schema.validateSync(props) 23 | setError(undefined) 24 | } catch (e: any) { 25 | setError(e.message as string) 26 | } 27 | }, [props]) 28 | 29 | return error 30 | } 31 | -------------------------------------------------------------------------------- /src/features/Clmm/components/LiquidityChartRangeInput/AxisBottom.tsx: -------------------------------------------------------------------------------- 1 | import { Axis as d3Axis, axisBottom, NumberValue, ScaleLinear, select } from 'd3' 2 | import React, { useMemo } from 'react' 3 | import styled from '@emotion/styled' 4 | 5 | const StyledGroup = styled.g` 6 | line { 7 | display: none; 8 | } 9 | 10 | text { 11 | color: #7780a0; 12 | transform: translateY(5px); 13 | } 14 | ` 15 | 16 | const Axis = ({ axisGenerator }: { axisGenerator: d3Axis }) => { 17 | const axisRef = (axis: SVGGElement) => { 18 | axis && 19 | select(axis) 20 | .call(axisGenerator) 21 | .call((g) => g.select('.domain').remove()) 22 | } 23 | 24 | return 25 | } 26 | 27 | export const AxisBottom = ({ 28 | xScale, 29 | innerHeight, 30 | offset = 0 31 | }: { 32 | xScale: ScaleLinear 33 | innerHeight: number 34 | offset?: number 35 | }) => 36 | useMemo( 37 | () => ( 38 | 39 | 40 | 41 | ), 42 | [innerHeight, offset, xScale] 43 | ) 44 | -------------------------------------------------------------------------------- /src/features/Clmm/components/LiquidityChartRangeInput/Bound.ts: -------------------------------------------------------------------------------- 1 | export enum Bound { 2 | LOWER = 'LOWER', 3 | UPPER = 'UPPER' 4 | } 5 | -------------------------------------------------------------------------------- /src/features/Clmm/components/LiquidityChartRangeInput/FeeAmount.ts: -------------------------------------------------------------------------------- 1 | export enum FeeAmount { 2 | LOWEST = 100, 3 | LOW = 500, 4 | MEDIUM = 2500, 5 | HIGH = 10000 6 | } 7 | -------------------------------------------------------------------------------- /src/features/Clmm/components/LiquidityChartRangeInput/Line.tsx: -------------------------------------------------------------------------------- 1 | import { ScaleLinear } from 'd3' 2 | import React, { useMemo } from 'react' 3 | import styled from '@emotion/styled' 4 | 5 | const StyledLine = styled.line<{ color?: string }>` 6 | stroke-width: 2; 7 | stroke-dasharray: 4; 8 | stroke: ${({ color }) => color || '#ecf5ff'}; 9 | fill: none; 10 | ` 11 | 12 | export const Line = ({ 13 | value, 14 | xScale, 15 | innerHeight, 16 | y1 = 0, 17 | color 18 | }: { 19 | value: number 20 | xScale: ScaleLinear 21 | y1?: number 22 | color?: string 23 | innerHeight: number 24 | }) => 25 | useMemo( 26 | () => ( 27 | <> 28 | 34 | 35 | 36 | ), 37 | [value, xScale, innerHeight] 38 | ) 39 | -------------------------------------------------------------------------------- /src/features/Clmm/components/PriceSwitchButton.tsx: -------------------------------------------------------------------------------- 1 | import { useTranslation } from 'react-i18next' 2 | import { Button } from '@chakra-ui/react' 3 | import HorizontalSwitchSmallIcon from '@/icons/misc/HorizontalSwitchSmallIcon' 4 | import { colors } from '@/theme/cssVariables/colors' 5 | 6 | export default function PriceSwitchButton(props: { priceLabel: string; onClickSwitch: () => void }) { 7 | const { t } = useTranslation() 8 | return ( 9 | 28 | ) 29 | } 30 | -------------------------------------------------------------------------------- /src/features/Clmm/type.ts: -------------------------------------------------------------------------------- 1 | export enum FeeAmount { 2 | LOWEST = 'LOWEST', 3 | LOW = 'LOW', 4 | MEDIUM = 'MEDIUM', 5 | HIGH = 'HIGH' 6 | } 7 | -------------------------------------------------------------------------------- /src/features/Clmm/utils/duration.ts: -------------------------------------------------------------------------------- 1 | export const getDurationState = (openTime: number, endTime: number) => { 2 | if (Date.now() < openTime) return 'Upcoming' 3 | if (Date.now() > endTime) return 'Ended' 4 | return 'Ongoing' 5 | } 6 | -------------------------------------------------------------------------------- /src/features/Clmm/utils/math.ts: -------------------------------------------------------------------------------- 1 | import Decimal from 'decimal.js' 2 | 3 | export const calRatio = (props: { price: number | string; amountA: string; amountB: string }) => { 4 | const ratioA = new Decimal(props.amountA || 0) 5 | .mul(props.price || 0) 6 | .div(new Decimal(props.amountA || 0).mul(props.price || 0).add(props.amountB || 1)) 7 | .mul(100) 8 | .toDecimalPlaces(5, Decimal.ROUND_FLOOR) 9 | .toNumber() 10 | 11 | return { 12 | ratioA, 13 | ratioB: new Decimal(props.amountB || 0).isZero() ? 0 : 100 - ratioA 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/features/ComponentSpecification/components/ComponentExamplePanel.tsx: -------------------------------------------------------------------------------- 1 | import { Heading, Stack } from '@chakra-ui/react' 2 | import { ReactNode } from 'react' 3 | 4 | export function ComponentExamplePanel({ name, children }: { name: string; children?: ReactNode }) { 5 | return ( 6 | 7 | {name} 8 | {children} 9 | 10 | ) 11 | } 12 | export function ComponentExampleGroup({ name, children }: { name: string; children?: ReactNode }) { 13 | return ( 14 | 15 | 16 | {name} 17 | 18 | {children} 19 | 20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /src/features/Create/ClmmPool/components/Stepper.tsx: -------------------------------------------------------------------------------- 1 | import Steps, { StepsRef } from '@/components/Steps' 2 | import { useAppStore } from '@/store' 3 | import { RefObject } from 'react' 4 | import { useTranslation } from 'react-i18next' 5 | 6 | export default function Stepper({ stepRef, onChange }: { stepRef?: RefObject; onChange: (step: number) => void }) { 7 | const isMobile = useAppStore((s) => s.isMobile) 8 | const { t } = useTranslation() 9 | return ( 10 | 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /src/features/Create/ClmmPool/components/type.ts: -------------------------------------------------------------------------------- 1 | export interface TickData { 2 | tickLower?: number 3 | tickUpper?: number 4 | priceLower?: string 5 | priceUpper?: string 6 | } 7 | -------------------------------------------------------------------------------- /src/features/Create/ClmmPool/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './CreateClmmPool' 2 | -------------------------------------------------------------------------------- /src/features/Create/StandardPool/hooks/useMarketSchema.ts: -------------------------------------------------------------------------------- 1 | import { useTranslation } from 'react-i18next' 2 | import * as yup from 'yup' 3 | 4 | const numberTransform = yup.number().transform((value) => (isNaN(value) ? 0 : value)) 5 | const numberSchema = (errMsg: string) => numberTransform.moreThan(0, errMsg).required(errMsg) 6 | 7 | export default function useMarketSchema() { 8 | // prepare for i18n usage 9 | const { t } = useTranslation() 10 | return yup.object().shape({ 11 | baseToken: yup.mixed().required(t('error.select_base_token') ?? ''), 12 | quoteToken: yup.mixed().required(t('error.select_quote_token') ?? ''), 13 | orderSize: numberSchema(t('error.enter_order_size') ?? ''), 14 | priceTick: numberSchema(t('error.enter_price_tick') ?? '') 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /src/features/Debug/components/NonAtaItem.tsx: -------------------------------------------------------------------------------- 1 | import { Flex } from '@chakra-ui/react' 2 | import { TokenAccount } from '@raydium-io/raydium-sdk-v2' 3 | import { getAssociatedTokenAddressSync } from '@solana/spl-token' 4 | 5 | import useTokenInfo from '@/hooks/token/useTokenInfo' 6 | import { useAppStore } from '@/store' 7 | import Decimal from 'decimal.js' 8 | 9 | export default function NonAtaItem({ account }: { account: TokenAccount }) { 10 | const publicKey = useAppStore((s) => s.publicKey) 11 | const token = useTokenInfo({ 12 | mint: account.mint.toString(), 13 | programId: account.programId 14 | }).tokenInfo 15 | const symbol = token?.symbol || account.mint.toString().slice(0, 6) 16 | 17 | return ( 18 | 19 | token: {symbol}, amount: {new Decimal(account.amount.toString()).div(10 ** (token?.decimals || 0)).toString()}, publicKey:{' '} 20 | {account.publicKey?.toString()}, ata: {getAssociatedTokenAddressSync(account.mint, publicKey!).toString()} 21 | 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /src/features/Debug/index.tsx: -------------------------------------------------------------------------------- 1 | import { Box } from '@chakra-ui/react' 2 | import { useTokenAccountStore } from '@/store' 3 | import NonAtaItem from './components/NonAtaItem' 4 | 5 | export default function Debug() { 6 | const tokenAccounts = useTokenAccountStore((s) => s.tokenAccounts) 7 | const nonAtaList = tokenAccounts.filter((acc) => !acc.isNative && !acc.isAssociated) 8 | 9 | return ( 10 | 11 | {nonAtaList.map((acc) => ( 12 | 13 | ))} 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/features/Farm/Create/components/DetailReview/RewardTotalValue.tsx: -------------------------------------------------------------------------------- 1 | import { useTranslation } from 'react-i18next' 2 | import { HStack, Text } from '@chakra-ui/react' 3 | import { colors } from '@/theme/cssVariables' 4 | import { formatCurrency } from '@/utils/numberish/formatter' 5 | 6 | export function RewardTotalValue(props: { total: number | string }) { 7 | const { t } = useTranslation() 8 | return ( 9 | 10 | 11 | {t('field.total_value')} 12 | 13 | 14 | {formatCurrency(props.total, { symbol: '$', decimalPlaces: 2 })} 15 | 16 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /src/features/Farm/Create/type.ts: -------------------------------------------------------------------------------- 1 | import { ApiV3Token } from '@raydium-io/raydium-sdk-v2' 2 | 3 | export type NewRewardInfo = { 4 | id: string 5 | token?: ApiV3Token 6 | amount?: string 7 | farmStart?: number 8 | farmEnd?: number 9 | perWeek?: string 10 | error?: string 11 | isValid: boolean 12 | } 13 | -------------------------------------------------------------------------------- /src/features/Farm/Edit/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './Edit' 2 | -------------------------------------------------------------------------------- /src/features/Liquidity/Increase/components/StakeableHint.tsx: -------------------------------------------------------------------------------- 1 | import { Grid, Text } from '@chakra-ui/react' 2 | import { useTranslation } from 'react-i18next' 3 | 4 | import ExclaimationOctagon from '@/icons/misc/ExclaimationOctagon' 5 | import { colors } from '@/theme/cssVariables' 6 | import { panelCard } from '@/theme/cssBlocks' 7 | 8 | export default function StakeableHint() { 9 | const { t } = useTranslation() 10 | return ( 11 | 20 | 21 | 22 | {t('liquidity.stakeable_hint')} 23 | 24 | 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /src/features/Moonpay/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './Moonpay' 2 | -------------------------------------------------------------------------------- /src/features/Pools/components/PoolChart/const.ts: -------------------------------------------------------------------------------- 1 | export type TimeType = '15m' | '1H' | '4H' | '1D' | '1W' 2 | export const availableTimeType = ['15m', '1H', '4H', '1D', '1W'] as const 3 | -------------------------------------------------------------------------------- /src/features/Pools/components/PoolItemLoadingSkeleton.tsx: -------------------------------------------------------------------------------- 1 | import { Flex, Skeleton, SkeletonCircle } from '@chakra-ui/react' 2 | 3 | export default function PoolItemLoadingSkeleton({ isGrid }: { isGrid: boolean }) { 4 | const arr = new Array(isGrid ? 2 : 5).fill(0) 5 | return ( 6 |
7 | {isGrid 8 | ? arr.map((_, idx) => ( 9 | 16 | 17 | 18 | 19 | 20 | )) 21 | : arr.map((_, idx) => ( 22 | 23 | 24 | 25 | 26 | 27 | ))} 28 |
29 | ) 30 | } 31 | -------------------------------------------------------------------------------- /src/features/Pools/components/PoolTabList.tsx: -------------------------------------------------------------------------------- 1 | import { Tabs, TabList, Tab } from '@chakra-ui/react' 2 | import { sizes } from '@/theme/cssVariables' 3 | 4 | /** 5 | * just a wrapper for chakra-ui Tabs 6 | */ 7 | export function PoolTabList(props: { names: T[]; active?: T; onChange?: (active: string) => void }) { 8 | return ( 9 | props.onChange?.(props.names[index])}> 10 | 11 | {props.names.map((name) => ( 12 | 13 | {name} 14 | 15 | ))} 16 | 17 | 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /src/features/Pools/cssBlocks.ts: -------------------------------------------------------------------------------- 1 | import { SystemStyleObject } from '@chakra-ui/react' 2 | 3 | export const poolListGrid: SystemStyleObject = { 4 | display: 'grid', 5 | gridTemplateColumns: [ 6 | '1.4fr .7fr .8fr', 7 | 'minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(200px, 1fr)' 8 | ], 9 | columnGap: ['max(1rem, 2%)', 'max(1rem, 3%)'], 10 | alignItems: 'center' 11 | } 12 | -------------------------------------------------------------------------------- /src/features/Pools/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './Pools' 2 | -------------------------------------------------------------------------------- /src/features/Portfolio/components/SectionMyFarms/components/Tvl.tsx: -------------------------------------------------------------------------------- 1 | import { Flex, FlexProps, Text } from '@chakra-ui/react' 2 | import { colors } from '@/theme/cssVariables' 3 | import { formatCurrency } from '@/utils/numberish/formatter' 4 | 5 | type TvlProps = FlexProps & { 6 | tvl: string | number 7 | decimals: number 8 | } 9 | 10 | export default function Tvl({ tvl, decimals, ...rest }: TvlProps) { 11 | return ( 12 | 13 | 14 | TVL 15 | 16 | 17 | {formatCurrency(tvl, { symbol: '$', decimalPlaces: decimals })} 18 | 19 | 20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /src/features/Portfolio/components/SectionMyPositions/components/Staked/Apr.tsx: -------------------------------------------------------------------------------- 1 | import { Flex, Spacer, Text } from '@chakra-ui/react' 2 | import { formatToRawLocaleStr } from '@/utils/numberish/formatter' 3 | 4 | import { colors } from '@/theme/cssVariables' 5 | 6 | type AprProps = { 7 | apr: string 8 | } 9 | 10 | export default function Apr({ apr }: AprProps) { 11 | return ( 12 | 13 | 14 | APR 15 | 16 | 17 | {formatToRawLocaleStr(apr)} 18 | 19 | 20 | 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /src/features/Portfolio/components/SectionMyPositions/components/Staked/StakedValue.tsx: -------------------------------------------------------------------------------- 1 | import { Flex, Text } from '@chakra-ui/react' 2 | import { ApiV3Token } from '@raydium-io/raydium-sdk-v2' 3 | 4 | import { colors } from '@/theme/cssVariables' 5 | import { formatCurrency } from '@/utils/numberish/formatter' 6 | 7 | type StakedValueProps = { 8 | positionUsd: string 9 | staked: { 10 | token: ApiV3Token | undefined 11 | amount: string 12 | } 13 | } 14 | 15 | export default function StakedValue({ positionUsd, staked }: StakedValueProps) { 16 | return ( 17 | 18 | 19 | My Staked RAY 20 | 21 | 22 | {formatCurrency(staked.amount)} {staked.token?.symbol} 23 | 24 | 25 | {formatCurrency(positionUsd, { symbol: '$', decimalPlaces: 2 })} 26 | 27 | 28 | ) 29 | } 30 | -------------------------------------------------------------------------------- /src/features/Portfolio/components/SectionMyPositions/components/Staked/TokenBriefFace.tsx: -------------------------------------------------------------------------------- 1 | import { Text, VStack } from '@chakra-ui/react' 2 | import { ApiV3Token } from '@raydium-io/raydium-sdk-v2' 3 | 4 | import TokenAvatar from '@/components/TokenAvatar' 5 | import { colors } from '@/theme/cssVariables' 6 | 7 | type TokenBriefFaceProps = { 8 | token: ApiV3Token | undefined 9 | } 10 | 11 | export default function TokenBriefFace({ token }: TokenBriefFaceProps) { 12 | return ( 13 | 14 | 15 | 16 | {token?.symbol} 17 | 18 | 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /src/features/Portfolio/components/SectionMyPositions/components/Standard/ItemDetail/StandardMyPosition.tsx: -------------------------------------------------------------------------------- 1 | import { Flex, Text } from '@chakra-ui/react' 2 | 3 | import { colors } from '@/theme/cssVariables' 4 | import { formatCurrency } from '@/utils/numberish/formatter' 5 | import { useTranslation } from 'react-i18next' 6 | 7 | type MyPositionProps = { 8 | positionUsd: number | string 9 | center?: boolean 10 | } 11 | 12 | export default function StandardMyPosition({ positionUsd, center }: MyPositionProps) { 13 | const { t } = useTranslation() 14 | return ( 15 | 16 | 17 | {t('liquidity.my_position')} 18 | 19 | 20 | {formatCurrency(positionUsd, { symbol: '$', abbreviated: true, decimalPlaces: 2 })} 21 | 22 | 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /src/features/Portfolio/components/SectionMyPositions/components/Standard/ItemDetail/TokenPair.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Flex } from '@chakra-ui/react' 2 | import { TokenInfo } from '@raydium-io/raydium-sdk-v2' 3 | 4 | import TokenAvatarPair from '@/components/TokenAvatarPair' 5 | import { colors } from '@/theme/cssVariables' 6 | 7 | type TokenPairProps = { 8 | base: TokenInfo | undefined 9 | quote: TokenInfo | undefined 10 | poolName: string 11 | } 12 | 13 | export default function TokenPair({ base, quote, poolName }: TokenPairProps) { 14 | return ( 15 | 16 | 17 | 18 | 19 | {poolName} 20 | 21 | 22 | 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /src/features/Staking/Staking.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Skeleton } from '@chakra-ui/react' 2 | 3 | import PageHeroTitle from '@/components/PageHeroTitle' 4 | import useFetchStakePools from '@/hooks/pool/useFetchStakePools' 5 | import useFarmPositions from '@/hooks/portfolio/farm/useFarmPositions' 6 | import { useTranslation } from 'react-i18next' 7 | import StakingPoolItem from './components/StakingPoolItem' 8 | 9 | export type StakingPageQuery = { 10 | dialog?: 'unstake' | 'stake' 11 | open?: string // token mint 12 | } 13 | 14 | export default function Staking() { 15 | const { t } = useTranslation() 16 | const { activeStakePools, isLoading } = useFetchStakePools({}) 17 | const { lpBasedData } = useFarmPositions({}) 18 | 19 | return ( 20 | 21 | 22 | 23 | 24 | {isLoading ? ( 25 | 26 | ) : ( 27 | activeStakePools.map((pool) => ( 28 | 29 | )) 30 | )} 31 | 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /src/features/Staking/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './Staking' 2 | -------------------------------------------------------------------------------- /src/features/Swap/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './Swap' 2 | -------------------------------------------------------------------------------- /src/features/Swap/swapMeta.tsx: -------------------------------------------------------------------------------- 1 | import { Trans } from 'react-i18next' 2 | import { Text } from '@chakra-ui/react' 3 | import i18n from '@/i18n' 4 | import { colors } from '@/theme/cssVariables/colors' 5 | 6 | const SWAP_TX_MSG = { 7 | swap: { 8 | title: 'transaction_history.name_swap', 9 | desc: 'transaction_history.desc_swap', 10 | txHistoryTitle: 'transaction_history.name_swap', 11 | txHistoryDesc: 'transaction_history.desc_swap', 12 | components: { sub: } 13 | } 14 | } 15 | export const getTxMeta = ({ action, values = {} }: { action: keyof typeof SWAP_TX_MSG; values?: Record }) => { 16 | const meta = SWAP_TX_MSG[action] 17 | return { 18 | title: i18n.t(meta.title, values), 19 | description: , 20 | txHistoryTitle: meta.txHistoryTitle || meta.title, 21 | txHistoryDesc: meta.txHistoryDesc || meta.desc, 22 | txValues: values 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/features/Swap/type.ts: -------------------------------------------------------------------------------- 1 | export interface ApiSwapV1OutError { 2 | id: string 3 | success: false 4 | version: 'V0' | 'V1' 5 | msg: string 6 | openTime?: string 7 | data: undefined 8 | } 9 | export interface ApiSwapV1OutSuccess { 10 | id: string 11 | success: true 12 | version: 'V0' | 'V1' 13 | openTime?: undefined 14 | msg: undefined 15 | data: { 16 | swapType: 'BaseIn' | 'BaseOut' 17 | inputMint: string 18 | inputAmount: string 19 | outputMint: string 20 | outputAmount: string 21 | otherAmountThreshold: string 22 | slippageBps: number 23 | priceImpactPct: number 24 | routePlan: { 25 | poolId: string 26 | inputMint: string 27 | outputMint: string 28 | feeMint: string 29 | feeRate: number 30 | feeAmount: string 31 | }[] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/features/Swap/util.ts: -------------------------------------------------------------------------------- 1 | import { SOLMint, WSOLMint } from '@raydium-io/raydium-sdk-v2' 2 | import { isClient } from '@/utils/common' 3 | 4 | export const isSol = (mint: string) => mint === SOLMint.toBase58() 5 | export const isWSol = (mint: string) => mint === WSOLMint.toBase58() 6 | 7 | export const isSolWSol = (mint1: string, mint2: string) => (isSol(mint1) && isWSol(mint2)) || (isWSol(mint1) && isSol(mint2)) 8 | 9 | const CACHE_KEY = '_ray_swap_' 10 | 11 | export interface PairData { 12 | inputMint: string 13 | outputMint: string 14 | } 15 | export const getSwapPairCache = (): PairData => { 16 | if (!isClient()) return { inputMint: '', outputMint: '' } 17 | const cache = localStorage.getItem(CACHE_KEY) 18 | return cache ? JSON.parse(cache) : { inputMint: '', outputMint: '' } 19 | } 20 | 21 | export const setSwapPairCache = (params: Partial) => { 22 | if (!isClient()) return 23 | const currentCache = getSwapPairCache() 24 | localStorage.setItem( 25 | CACHE_KEY, 26 | JSON.stringify({ 27 | ...currentCache, 28 | ...params 29 | }) 30 | ) 31 | } 32 | -------------------------------------------------------------------------------- /src/features/Wormhole/index.tsx: -------------------------------------------------------------------------------- 1 | export { default } from './WormholeWidget' 2 | -------------------------------------------------------------------------------- /src/features/Wormhole/types.ts: -------------------------------------------------------------------------------- 1 | export type PaletteColor = { 2 | 50: string 3 | 100: string 4 | 200: string 5 | 300: string 6 | 400: string 7 | 500: string 8 | 600: string 9 | 700: string 10 | 800: string 11 | 900: string 12 | A100: string 13 | A200: string 14 | A400: string 15 | A700: string 16 | } 17 | 18 | export type Theme = { 19 | primary: PaletteColor 20 | secondary: PaletteColor 21 | divider: string 22 | background: { 23 | default: string 24 | } 25 | text: { 26 | primary: string 27 | secondary: string 28 | } 29 | error: PaletteColor 30 | info: PaletteColor 31 | success: PaletteColor 32 | warning: PaletteColor 33 | button: { 34 | primary: string 35 | primaryText: string 36 | disabled: string 37 | disabledText: string 38 | action: string 39 | actionText: string 40 | hover: string 41 | } 42 | options: { 43 | hover: string 44 | select: string 45 | } 46 | card: { 47 | background: string 48 | elevation: string 49 | secondary: string 50 | } 51 | popover: { 52 | background: string 53 | elevation: string 54 | secondary: string 55 | } 56 | modal: { 57 | background: string 58 | } 59 | font: { 60 | primary: string 61 | header: string 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/hooks/app/useInitMobileDetector.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | import { useDiviceInfoDetector } from '../useMobileDetector' 3 | import { useAppStore } from '@/store' 4 | 5 | export default function useInitMobileDetector() { 6 | const { isMobile, isLaptop } = useDiviceInfoDetector() 7 | useEffect(() => { 8 | useAppStore.setState({ isMobile }) 9 | }, [isMobile]) 10 | useEffect(() => { 11 | useAppStore.setState({ isLaptop }) 12 | }, [isLaptop]) 13 | } 14 | -------------------------------------------------------------------------------- /src/hooks/app/useRefreshChainTime.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | import { useAppStore } from '@/store/useAppStore' 3 | 4 | function useRefreshChainTime() { 5 | const [fetchChainTimeAct, fetchBlockSlotCountAct, raydium] = useAppStore((s) => [ 6 | s.fetchChainTimeAct, 7 | s.fetchBlockSlotCountAct, 8 | s.raydium 9 | ]) 10 | 11 | useEffect(() => { 12 | if (!raydium) return 13 | const interval = window.setInterval(() => { 14 | fetchChainTimeAct() 15 | }, 1000 * 60 * 5) 16 | return () => window.clearInterval(interval) 17 | }, [fetchChainTimeAct, raydium]) 18 | 19 | useEffect(() => { 20 | if (!raydium) return 21 | // fetchBlockSlotCountAct() 22 | const interval = window.setInterval(() => { 23 | fetchBlockSlotCountAct() 24 | }, 1000 * 60 * 1) 25 | 26 | return () => window.clearInterval(interval) 27 | }, [fetchBlockSlotCountAct, raydium]) 28 | return null 29 | } 30 | 31 | export default useRefreshChainTime 32 | -------------------------------------------------------------------------------- /src/hooks/app/useRefreshEpochInfo.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | import { useAppStore } from '@/store' 3 | import { retry } from '@/utils/common' 4 | 5 | export default function useRefreshEpochInfo() { 6 | const getEpochInfo = useAppStore((s) => s.getEpochInfo) 7 | 8 | useEffect(() => { 9 | if (!useAppStore.getState().epochInfo) { 10 | retry(getEpochInfo) 11 | } 12 | const interval = window.setInterval(getEpochInfo, 1000 * 60) 13 | return () => window.clearInterval(interval) 14 | }, [getEpochInfo]) 15 | 16 | return null 17 | } 18 | -------------------------------------------------------------------------------- /src/hooks/info/useFetchMainInfo.ts: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import shallow from 'zustand/shallow' 3 | import axios from '@/api/axios' 4 | import { useAppStore } from '@/store' 5 | 6 | const fetcher = (url: string) => axios.get<{ tvl: number; volume24: number }>(url, { skipError: true }) 7 | 8 | export default function useFetchMainInfo(props: { refreshInterval?: number }) { 9 | const { refreshInterval = 1000 * 60 * 15 } = props || {} 10 | 11 | const [host, infoUrl] = useAppStore((s) => [s.urlConfigs.BASE_HOST, s.urlConfigs.INFO], shallow) 12 | 13 | const { data, isLoading, error, ...rest } = useSWR(host + infoUrl, fetcher, { 14 | refreshInterval, 15 | dedupingInterval: refreshInterval, 16 | focusThrottleInterval: refreshInterval 17 | }) 18 | const isEmptyResult = !isLoading && !(data && !error) 19 | 20 | return { 21 | data: data?.data, 22 | isLoading, 23 | error, 24 | isEmptyResult, 25 | ...rest 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/hooks/token/useTokenSetting.ts: -------------------------------------------------------------------------------- 1 | import { useAppStore, useTokenStore } from '@/store' 2 | import { useEffect } from 'react' 3 | import shallow from 'zustand/shallow' 4 | 5 | export default function useTokenSetting() { 6 | const displayTokenSettings = useAppStore((s) => s.displayTokenSettings) 7 | const [setDisplayTokenListAct, loadTokensAct] = useTokenStore((s) => [s.setDisplayTokenListAct, s.loadTokensAct], shallow) 8 | 9 | useEffect(() => { 10 | setDisplayTokenListAct() 11 | }, [displayTokenSettings, setDisplayTokenListAct]) 12 | 13 | useEffect(() => { 14 | const intervalId = window.setInterval(() => { 15 | loadTokensAct(true) 16 | }, 60 * 1000 * 5) 17 | return () => clearInterval(intervalId) 18 | }, [loadTokensAct]) 19 | } 20 | -------------------------------------------------------------------------------- /src/hooks/useElementSizeRectDetector.ts: -------------------------------------------------------------------------------- 1 | import { ElementSingle, getSingleElement } from '@/utils/react/getElementsFromRef' 2 | import { useState } from 'react' 3 | import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect' 4 | import useResizeObserver from './useResizeObserver' 5 | 6 | /** 7 | * only itself(ref) 8 | * 9 | * this hooks build on assumption: resize of a child will resize his parent. so just observe it's parent node. 10 | * 11 | * @param ref 12 | * @param callback 13 | */ 14 | export default function useElementSizeRectDetector(ref: ElementSingle): { width: number | undefined; height: number | undefined } { 15 | const [width, setWidth] = useState(undefined) 16 | const [height, setHeight] = useState(undefined) 17 | 18 | const updateRect = () => { 19 | const el = getSingleElement(ref) 20 | if (!el) return 21 | const rect = el.getBoundingClientRect() 22 | setWidth(rect.width) 23 | setHeight(rect.height) 24 | } 25 | 26 | useIsomorphicLayoutEffect(updateRect, [ref]) 27 | useResizeObserver(ref, updateRect) 28 | return { width, height } 29 | } 30 | -------------------------------------------------------------------------------- /src/hooks/useEvent.ts: -------------------------------------------------------------------------------- 1 | import { useCallback, useRef } from 'react' 2 | import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect' 3 | 4 | /**@see https://github.com/facebook/react/issues/14099 */ 5 | export function useEvent(handler: T): T { 6 | const handlerRef = useRef(handler) 7 | 8 | useIsomorphicLayoutEffect(() => { 9 | handlerRef.current = handler 10 | }) 11 | 12 | // @ts-expect-error force 13 | return useCallback((...args) => { 14 | const fn = handlerRef.current 15 | // @ts-expect-error force 16 | return fn?.(...args) 17 | }, []) 18 | } 19 | -------------------------------------------------------------------------------- /src/hooks/useIsomorphicLayoutEffect.ts: -------------------------------------------------------------------------------- 1 | import { isClient } from '@/utils/common' 2 | import { useLayoutEffect, useEffect } from 'react' 3 | 4 | export const useIsomorphicLayoutEffect = isClient() ? useLayoutEffect : useEffect 5 | -------------------------------------------------------------------------------- /src/hooks/useMobileDetector.ts: -------------------------------------------------------------------------------- 1 | // import { useBreakpointValue } from '@chakra-ui/react' 2 | import { useEffect, useState } from 'react' 3 | import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect' 4 | import { isClient } from '@/utils/common' 5 | 6 | const maxMobileWidth = 768 7 | const maxLaptopWidth = 1440 8 | 9 | // you can see https://vscode.dev/github/chakra-ui/chakra-ui for more detail 10 | export function useDiviceInfoDetector() { 11 | const [isMobile, setIsMobile] = useState(false) 12 | const [isLaptop, setIsLaptop] = useState(false) 13 | const calcViewport = () => { 14 | if (isClient()) { 15 | const screenWidth = globalThis.innerWidth 16 | const isMobile = screenWidth < maxMobileWidth 17 | setIsMobile(isMobile) 18 | const isLaptop = screenWidth >= maxMobileWidth && screenWidth < maxLaptopWidth 19 | setIsLaptop(isLaptop) 20 | } 21 | } 22 | useEffect(() => { 23 | window.addEventListener('resize', calcViewport) 24 | return () => window.removeEventListener('resize', calcViewport) 25 | }, []) 26 | 27 | useIsomorphicLayoutEffect(() => { 28 | calcViewport() 29 | }, []) 30 | return { isMobile, isLaptop } 31 | } 32 | -------------------------------------------------------------------------------- /src/hooks/usePrevious.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef } from 'react' 2 | 3 | // modified from https://usehooks.com/usePrevious/ 4 | export default function usePrevious(value: T) { 5 | // The ref object is a generic container whose current property is mutable ... 6 | // ... and can hold any value, similar to an instance property on a class 7 | const ref = useRef() 8 | 9 | // Store current value in ref 10 | useEffect(() => { 11 | ref.current = value 12 | }, [value]) // Only re-run if value changes 13 | 14 | // Return previous value (happens before update in useEffect above) 15 | return ref.current 16 | } 17 | -------------------------------------------------------------------------------- /src/hooks/useRefreshEpochInfo.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | import { useAppStore } from '@/store/useAppStore' 3 | import shallow from 'zustand/shallow' 4 | 5 | export default function useRefreshEpochInfo() { 6 | const [getEpochInfo, epochInfo, connection] = useAppStore((s) => [s.getEpochInfo, s.epochInfo, s.connection], shallow) 7 | useEffect(() => { 8 | getEpochInfo() 9 | const id = window.setInterval(() => { 10 | getEpochInfo() 11 | }, 60 * 1000) 12 | return () => window.clearInterval(id) 13 | }, [connection]) 14 | 15 | return epochInfo 16 | } 17 | -------------------------------------------------------------------------------- /src/hooks/useResponsive.ts: -------------------------------------------------------------------------------- 1 | import { useState, useEffect, createContext, useContext } from 'react' 2 | import { useBreakpointValue } from '@chakra-ui/react' 3 | 4 | export const MatchBreakpointsContext = createContext({ 5 | isMobile: false, 6 | isTablet: false, 7 | isDesktop: false 8 | }) 9 | 10 | export type BreakpointChecks = { 11 | isMobile: boolean 12 | isTablet: boolean 13 | isDesktop: boolean 14 | } 15 | 16 | const useResponsive = (): BreakpointChecks => { 17 | const [isClient, setIsClient] = useState(false) 18 | const breakPoints = useContext(MatchBreakpointsContext) 19 | 20 | const isMobile = useBreakpointValue({ base: true, sm: false }) || false 21 | const isTablet = useBreakpointValue({ sm: true, md: false }) || false 22 | const isDesktop = useBreakpointValue({ md: true }) || false 23 | 24 | useEffect(() => { 25 | setIsClient(typeof window !== 'undefined') 26 | }, []) 27 | 28 | if (!isClient && breakPoints) { 29 | return breakPoints 30 | } 31 | 32 | return { isMobile, isTablet, isDesktop } 33 | } 34 | 35 | export default useResponsive 36 | -------------------------------------------------------------------------------- /src/hooks/useScroll.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react' 2 | 3 | import { throbounce } from '@/utils/functionMethods' 4 | 5 | function useScroll() { 6 | const [pageYOffset, setPageYOffset] = useState(0) 7 | const [isScrollup, setIsScrollup] = useState(false) 8 | 9 | const handleScroll = () => { 10 | setPageYOffset((p) => { 11 | p > window.pageYOffset ? setIsScrollup(true) : setIsScrollup(false) 12 | return window.pageYOffset 13 | }) 14 | } 15 | 16 | useEffect(() => { 17 | window.addEventListener('scroll', throbounce(handleScroll, 200), { passive: true }) 18 | 19 | return () => { 20 | window.removeEventListener('scroll', throbounce(handleScroll, 200)) 21 | } 22 | }, []) 23 | 24 | return { pageYOffset, isScrollup } 25 | } 26 | 27 | export default useScroll 28 | -------------------------------------------------------------------------------- /src/hooks/useScrollDegreeDetector.ts: -------------------------------------------------------------------------------- 1 | import { RefObject, useEffect, useRef } from 'react' 2 | import { useEvent } from './useEvent' 3 | 4 | export type UseScrollDegreeDetectorOptions = { 5 | onReachBottom?: () => void 6 | reachBottomMargin?: number 7 | } 8 | 9 | export function useScrollDegreeDetector(ref: RefObject, options?: UseScrollDegreeDetectorOptions) { 10 | const isReachedBottom = useRef(false) 11 | 12 | const onScroll = useEvent(() => { 13 | if (!ref.current) return 14 | const { scrollHeight, scrollTop, clientHeight } = ref.current 15 | const isNearlyReachBottom = scrollTop + clientHeight + (options?.reachBottomMargin ?? 0) >= scrollHeight 16 | 17 | if (isNearlyReachBottom && !isReachedBottom.current) { 18 | options?.onReachBottom?.() 19 | isReachedBottom.current = true 20 | } 21 | 22 | if (!isNearlyReachBottom && isReachedBottom.current) { 23 | isReachedBottom.current = false 24 | } 25 | }) 26 | 27 | useEffect(() => { 28 | onScroll() 29 | ref.current?.addEventListener('scroll', onScroll, { passive: true }) 30 | return () => ref.current?.removeEventListener('scroll', onScroll) 31 | }, [ref, onScroll]) 32 | } 33 | -------------------------------------------------------------------------------- /src/hooks/useSearch.ts: -------------------------------------------------------------------------------- 1 | import { isString } from '@/utils/judges/judgeType' 2 | import { searchItems, SearchOptions } from '@/utils/searchItems' 3 | import { useMemo } from 'react' 4 | 5 | /** 6 | * it will apply search text , every search inputs in App will apply this hook 7 | * it's a wrapper hook version of {@link searchItems} 8 | */ 9 | export function useSearch(items: T[], options: string | SearchOptions): T[] { 10 | const searched = useMemo(() => searchItems(items, isString(options) ? { searchText: options } : options), [options, items]) 11 | return searched 12 | } 13 | -------------------------------------------------------------------------------- /src/hooks/useTransitionEffect.ts: -------------------------------------------------------------------------------- 1 | import { startTransition, useEffect } from 'react' 2 | 3 | export default function useTransitionedEffect(effect: () => any, dependenceList?: any[]) { 4 | useEffect(() => { 5 | startTransition(() => { 6 | effect() 7 | }) 8 | }, dependenceList) 9 | } 10 | -------------------------------------------------------------------------------- /src/hooks/useViewportObserver.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | import { useEvent } from './useEvent' 3 | 4 | /** 5 | * only itself(ref) 6 | * 7 | * this hooks build on assumption: resize of a child will resize his parent. so just observe it's parent node. 8 | * 9 | * @param ref 10 | * @param callback 11 | */ 12 | export default function useViewportObserver(callback?: (utilities: { w: number; height: number }) => void) { 13 | const invokeCallback = useEvent(() => { 14 | callback?.({ w: window.innerWidth, height: window.innerHeight }) 15 | }) 16 | useEffect(() => { 17 | document.addEventListener('resize', invokeCallback) 18 | invokeCallback() 19 | return () => { 20 | document.removeEventListener('resize', invokeCallback) 21 | } 22 | }, []) 23 | } 24 | -------------------------------------------------------------------------------- /src/hooks/useWindowDimensions.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react' 2 | 3 | type WindowDimentions = { 4 | width: number | undefined 5 | height: number | undefined 6 | isMobile: boolean 7 | } 8 | 9 | const useWindowDimensions = (breakPoint?: number): WindowDimentions => { 10 | const mobileWidth = breakPoint ?? 768 11 | const [windowDimensions, setWindowDimensions] = useState({ 12 | width: undefined, 13 | height: undefined, 14 | isMobile: false 15 | }) 16 | useEffect(() => { 17 | function handleResize(): void { 18 | setWindowDimensions({ 19 | width: window.innerWidth, 20 | height: window.innerHeight, 21 | isMobile: window.innerWidth > mobileWidth ? false : true 22 | }) 23 | } 24 | handleResize() 25 | window.addEventListener('resize', handleResize) 26 | return (): void => window.removeEventListener('resize', handleResize) 27 | }, []) 28 | 29 | return windowDimensions 30 | } 31 | 32 | export default useWindowDimensions 33 | -------------------------------------------------------------------------------- /src/hooks/useWindowResize.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState, useMemo } from 'react' 2 | import { debounce } from '@/utils/functionMethods' 3 | 4 | export default function useWindowResize(delay?: number) { 5 | const [size, setSize] = useState([0, 0]) 6 | const debounceUpdate = useMemo(() => debounce(() => setSize([window.innerWidth, window.innerHeight]), delay || 100), [delay]) 7 | useEffect(() => { 8 | const getSize = () => { 9 | debounceUpdate() 10 | } 11 | getSize() 12 | window.addEventListener('resize', getSize) 13 | return () => window.removeEventListener('resize', getSize) 14 | }, [debounceUpdate]) 15 | 16 | return size 17 | } 18 | -------------------------------------------------------------------------------- /src/icons/media/TelegrameMediaIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | /** used in PC nav top bar */ 4 | export default function TelegrameMediaIcon(props: SvgIcon) { 5 | const { width = 32, height = 32, ...restProps } = props 6 | 7 | return ( 8 | 9 | 13 | 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /src/icons/media/TwitterMediaIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | /** used in PC nav top bar */ 4 | export default function TwitterMediaIcon(props: SvgIcon) { 5 | const { width = 32, height = 32, ...restProps } = props 6 | 7 | return ( 8 | 9 | 13 | 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /src/icons/misc/AddLiquidityPlus.tsx: -------------------------------------------------------------------------------- 1 | import { colors } from '@/theme/cssVariables' 2 | import { SvgIcon } from '../type' 3 | import { forwardRef } from '@chakra-ui/react' 4 | 5 | export default forwardRef(function AddLiquidityPlus(props: SvgIcon, ref) { 6 | return ( 7 | 8 | 9 | 13 | 14 | ) 15 | }) 16 | -------------------------------------------------------------------------------- /src/icons/misc/AddTokenIcon.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from 'react' 2 | import { SvgIcon } from '../type' 3 | 4 | export default forwardRef(function AddTokenIcon(props: SvgIcon, ref: any) { 5 | return ( 6 | 7 | 11 | 15 | 16 | ) 17 | }) 18 | -------------------------------------------------------------------------------- /src/icons/misc/ChartInfoIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function ChartInfoIcon(props: SvgIcon) { 4 | const { width = 16, height = 14 } = props 5 | 6 | return ( 7 | 8 | 15 | 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /src/icons/misc/ChevronDoubleDownIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function ChevronDownIcon(props: SvgIcon) { 4 | return ( 5 | 6 | 13 | 20 | 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /src/icons/misc/ChevronDownIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function ChevronDownIcon(props: SvgIcon) { 4 | return ( 5 | 6 | 7 | 8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/icons/misc/ChevronLeftIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function ChevronLeftIcon(props: SvgIcon) { 4 | const { width = '18px', height = '18px', ...restProps } = props 5 | return ( 6 | 7 | 8 | 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /src/icons/misc/ChevronRightIcon.tsx: -------------------------------------------------------------------------------- 1 | import { Box } from '@chakra-ui/react' 2 | import { SvgIcon } from '../type' 3 | 4 | export default function ChevronRightIcon(props: SvgIcon) { 5 | const { width = '18px', height = '18px' } = props 6 | return ( 7 | 8 | 9 | 10 | 11 | 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /src/icons/misc/ChevronUpIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function ChevronUpIcon(props: SvgIcon) { 4 | return ( 5 | 15 | 16 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /src/icons/misc/CircleArrowDown.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from '@chakra-ui/react' 2 | import { SvgIcon } from '../type' 3 | 4 | /** use currentColor */ 5 | export default forwardRef(function CircleArrowDown(props: SvgIcon, ref) { 6 | return ( 7 | 20 | 21 | 22 | 23 | 24 | ) 25 | }) 26 | -------------------------------------------------------------------------------- /src/icons/misc/CircleArrowRight.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from '@chakra-ui/react' 2 | import { SvgIcon } from '../type' 3 | 4 | /** use currentColor */ 5 | export default forwardRef(function CircleArrowRight(props: SvgIcon, ref) { 6 | return ( 7 | 20 | 21 | 22 | 23 | 24 | ) 25 | }) 26 | -------------------------------------------------------------------------------- /src/icons/misc/CircleCheck.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | /** use currentColor */ 4 | export default function CircleCheck(props: SvgIcon) { 5 | const { width = 16, height = 16, fill = 'currentColor' } = props 6 | 7 | return ( 8 | 9 | 13 | 17 | 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /src/icons/misc/CircleCheckBreaker.tsx: -------------------------------------------------------------------------------- 1 | import { colors } from '@/theme/cssVariables' 2 | import { SvgIcon } from '../type' 3 | import { forwardRef } from '@chakra-ui/react' 4 | 5 | export default forwardRef(function CircleCheckBreaker(props: SvgIcon, ref) { 6 | return ( 7 | 21 | 22 | 23 | 24 | ) 25 | }) 26 | -------------------------------------------------------------------------------- /src/icons/misc/CircleError.tsx: -------------------------------------------------------------------------------- 1 | import { colors } from '@/theme/cssVariables' 2 | import { SvgIcon } from '../type' 3 | 4 | export default function CircleError(props: SvgIcon) { 5 | const { width = 24, height = 24, color = colors.semanticError } = props 6 | 7 | return ( 8 | 9 | 16 | 17 | 18 | 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /src/icons/misc/CirclePlus.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | /** use currentColor */ 4 | export default function CirclePlus(props: SvgIcon) { 5 | return ( 6 | 18 | 19 | 20 | 21 | 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /src/icons/misc/Close.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function Close(props: SvgIcon) { 4 | const { width = 20, height = 20 } = props 5 | 6 | return ( 7 | 8 | 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/icons/misc/CopyIcon.tsx: -------------------------------------------------------------------------------- 1 | import { colors } from '@/theme/cssVariables' 2 | 3 | import { SvgIcon } from '../type' 4 | 5 | export default function CopyIcon(props: SvgIcon) { 6 | const { color = colors.secondary } = props 7 | 8 | return ( 9 | 10 | 11 | 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /src/icons/misc/DeleteIcon.tsx: -------------------------------------------------------------------------------- 1 | import { colors } from '@/theme/cssVariables' 2 | 3 | import { SvgIcon } from '../type' 4 | 5 | export default function DeleteIcon(props: SvgIcon) { 6 | const { width = 24, height = 24, fill = colors.primary } = props 7 | 8 | return ( 9 | 18 | 19 | 23 | 24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /src/icons/misc/ExclaimationOctagon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function ExclaimationOctagon(props: SvgIcon) { 4 | const { width = 20, height = 20 } = props 5 | 6 | return ( 7 | 8 | 9 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /src/icons/misc/ExpandDownIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function ExpandDownIcon(props: SvgIcon) { 4 | const { width = 14, height = 14, stroke = '#22D1F8' } = props 5 | 6 | return ( 7 | 8 | 15 | 22 | 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /src/icons/misc/ExpandLeftTopIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function ExpandLeftTopIcon(props: SvgIcon) { 4 | const { width = 10, height = 10 } = props 5 | 6 | return ( 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /src/icons/misc/ExpandUpIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function ExpandUpIcon(props: SvgIcon) { 4 | return ( 5 | 17 | 18 | 19 | 20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /src/icons/misc/ExternalLink.tsx: -------------------------------------------------------------------------------- 1 | import { colors } from '@/theme/cssVariables' 2 | import { SvgIcon } from '../type' 3 | 4 | export default function ExternalLink(props: SvgIcon) { 5 | const { width = 14, height = 14, color = colors.secondary } = props 6 | 7 | return ( 8 | 19 | 20 | 21 | 22 | 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /src/icons/misc/ExternalLinkLargeIcon.tsx: -------------------------------------------------------------------------------- 1 | import { colors } from '@/theme/cssVariables' 2 | 3 | import { SvgIcon } from '../type' 4 | 5 | export default function ExternalLinkLargeIcon(props: SvgIcon) { 6 | const { width = 14, height = 14, color = colors.priceFloatingUp } = props 7 | 8 | return ( 9 | 21 | 22 | 23 | 24 | 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /src/icons/misc/HorizontalSwitchIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function HorizontalSwitchIcon(props: SvgIcon) { 4 | return ( 5 | 6 | 7 | 8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/icons/misc/HorizontalSwitchSmallIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function HorizontalSwitchSmallIcon(props: SvgIcon) { 4 | return ( 5 | 6 | 7 | 8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/icons/misc/InfoCircleIcon.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from 'react' 2 | import { SvgIcon } from '../type' 3 | 4 | export default forwardRef(function InfoCircleIcon(props: SvgIcon, ref: any) { 5 | return ( 6 | 7 | 8 | 9 | 10 | ) 11 | }) 12 | -------------------------------------------------------------------------------- /src/icons/misc/InputLockIcon.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from '@chakra-ui/react' 2 | import { SvgIcon } from '../type' 3 | 4 | export default forwardRef(function InputLockIcon(props: SvgIcon, ref) { 5 | return ( 6 | 20 | 21 | 22 | ) 23 | }) 24 | -------------------------------------------------------------------------------- /src/icons/misc/LiquidityLockIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function LiquidityLockIcon(props: SvgIcon) { 4 | const { width = 12, height = 13 } = props 5 | 6 | return ( 7 | 16 | 22 | 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /src/icons/misc/ListIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function ListIcon(props: SvgIcon) { 4 | const { width = 20, height = 20 } = props 5 | 6 | return ( 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/icons/misc/LockIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function LockIcon(props: SvgIcon) { 4 | const { width = 12, height = 13 } = props 5 | 6 | return ( 7 | 16 | 17 | 23 | 29 | 30 | 31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /src/icons/misc/MenuHamburgerNavIcon.tsx: -------------------------------------------------------------------------------- 1 | import { colors } from '@/theme/cssVariables' 2 | import { SvgIcon } from '../type' 3 | 4 | export default function MenuHamburgerNavIcon(props: SvgIcon) { 5 | const { width = 40, height = 40, color = colors.textSecondary } = props 6 | 7 | return ( 8 | 20 | 21 | 22 | 23 | 24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /src/icons/misc/MinusIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function MinusIcon(props: SvgIcon) { 4 | return ( 5 | 6 | 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/icons/misc/OpenBookIcon.tsx: -------------------------------------------------------------------------------- 1 | import { colors } from '@/theme/cssVariables' 2 | 3 | import { SvgIcon } from '../type' 4 | 5 | export default function OpenBookIcon(props: SvgIcon) { 6 | const { width = 19, height = 12, fill = colors.textSecondary } = props 7 | 8 | return ( 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /src/icons/misc/Plus.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function Plus(props: SvgIcon) { 4 | return ( 5 | 6 | 7 | 8 | 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /src/icons/misc/PlusCircleIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function PlusCircleIcon(props: SvgIcon) { 4 | return ( 5 | 17 | 22 | 23 | 24 | 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /src/icons/misc/PlusIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function PlusIcon(props: SvgIcon) { 4 | const { width = 16, height = 16 } = props 5 | 6 | return ( 7 | 8 | 9 | 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/icons/misc/PriorityFastIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function PriorityFastIcon(props: SvgIcon) { 4 | const { width = 24, height = 24, color = 'currentColor' } = props 5 | 6 | return ( 7 | 8 | 9 | 10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /src/icons/misc/PriorityFixIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function PriorityFixIcon(props: SvgIcon) { 4 | const { width = 24, height = 24, color = 'currentColor' } = props 5 | 6 | return ( 7 | 8 | 9 | 16 | 23 | 24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /src/icons/misc/PriorityUltraIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function PriorityUltraIcon(props: SvgIcon) { 4 | const { width = 24, height = 24, color = 'currentColor' } = props 5 | 6 | return ( 7 | 8 | 9 | 10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /src/icons/misc/PulseIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function PulseIcon(props: SvgIcon) { 4 | return ( 5 | 17 | 18 | 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /src/icons/misc/RemoveTokenIcon.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from 'react' 2 | import { SvgIcon } from '../type' 3 | 4 | export default forwardRef(function RemoveTokenIcon(props: SvgIcon, ref: any) { 5 | return ( 6 | 7 | 11 | 12 | ) 13 | }) 14 | -------------------------------------------------------------------------------- /src/icons/misc/SliderThumb.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function SliderThumbIcon(props: SvgIcon) { 4 | const { width = 25, height = 24 } = props 5 | 6 | return ( 7 | 8 | 9 | 10 | 11 | 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /src/icons/misc/SortDownIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function SortDownIcon(props: SvgIcon) { 4 | return ( 5 | 6 | 7 | 8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/icons/misc/SubtractIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function SubtractIcon(props: SvgIcon) { 4 | const { width = 14, height = 14 } = props 5 | 6 | return ( 7 | 16 | 17 | 23 | 24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /src/icons/misc/SwapButtonOneTurnIcon.tsx: -------------------------------------------------------------------------------- 1 | import { colors } from '@/theme/cssVariables' 2 | import { SvgIcon } from '../type' 3 | 4 | export default function SwapButtonOneTurnIcon(props: SvgIcon) { 5 | return ( 6 | 7 | 8 | 16 | 24 | 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /src/icons/misc/SwapChatEmptyIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function SwapChatEmptyIcon(props: SvgIcon) { 4 | return ( 5 | 6 | 7 | 8 | 9 | 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/icons/misc/SwapChatIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function SwapChatIcon(props: SvgIcon) { 4 | return ( 5 | 6 | 7 | 8 | 9 | 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/icons/misc/SwapExchangeIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function SwapExchangeIcon(props: SvgIcon) { 4 | return ( 5 | 6 | 7 | 8 | 9 | 16 | 17 | 24 | 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /src/icons/misc/SwapHorizontalIcon.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from 'react' 2 | import { SvgIcon } from '../type' 3 | 4 | export default forwardRef(function SwapHorizontalIcon(props: SvgIcon, ref: any) { 5 | return ( 6 | 7 | 8 | 9 | ) 10 | }) 11 | -------------------------------------------------------------------------------- /src/icons/misc/SwapIcon.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from 'react' 2 | import { SvgIcon } from '../type' 3 | import { useColorMode } from '@chakra-ui/react' 4 | 5 | export default forwardRef(function SwapIcon(props: SvgIcon, ref: any) { 6 | const { width = 16, height = 16 } = props 7 | const { colorMode } = useColorMode() 8 | const isLight = colorMode === 'light' 9 | const colorFill = isLight ? '#474ABB' : '#ABC4FF' 10 | return ( 11 | 12 | 13 | 14 | ) 15 | }) 16 | -------------------------------------------------------------------------------- /src/icons/misc/SwapMobileIcon.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from 'react' 2 | import { SvgIcon } from '../type' 3 | import { useColorMode } from '@chakra-ui/react' 4 | 5 | export default forwardRef(function SwapMobileIcon(props: SvgIcon, ref: any) { 6 | const { colorMode } = useColorMode() 7 | const isLight = colorMode === 'light' 8 | const colorFill = isLight ? '#474ABB' : "#ABC4FF" 9 | return ( 10 | 11 | 12 | 13 | ) 14 | }) 15 | -------------------------------------------------------------------------------- /src/icons/misc/SwapPoolItemIcon.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from 'react' 2 | import { SvgIcon } from '../type' 3 | 4 | export default forwardRef(function SwapPoolItemIcon(props: SvgIcon, ref: any) { 5 | const { width = 14, height = 14 } = props 6 | return ( 7 | 8 | 9 | 10 | ) 11 | }) 12 | -------------------------------------------------------------------------------- /src/icons/misc/WalletSelectEggIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | import { Box } from '@chakra-ui/react' 3 | 4 | export default function WalletSelectEggIcon(props: SvgIcon) { 5 | const { width = '20px', height = '20px', color = 'currentColor' } = props 6 | 7 | return ( 8 | 9 | 20 | 21 | 22 | 23 | 24 | 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /src/icons/misc/WalletSelectWalletIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | import { Box } from '@chakra-ui/react' 3 | 4 | export default function WalletSelectWalletIcon(props: SvgIcon) { 5 | const { width = '20px', height = '20px', color = 'currentColor' } = props 6 | 7 | return ( 8 | 9 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | ) 27 | } 28 | -------------------------------------------------------------------------------- /src/icons/pageNavigation/AcceleraytorPageThumbnailIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | /** used in PC nav top bar */ 4 | export default function AcceleraytorPageThumbnailIcon(props: SvgIcon) { 5 | const { width = 16, height = 16, ...restProps } = props 6 | 7 | return ( 8 | 9 | 13 | 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /src/icons/pageNavigation/FeedbackThumbnailIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | /** used in PC nav top bar */ 4 | export default function FeedbackThumbnailIcon(props: SvgIcon) { 5 | const { width = 14, height = 14, ...restProps } = props 6 | 7 | return ( 8 | 9 | 13 | 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /src/icons/pageNavigation/StakingPageThumbnailIcon.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | /** used in PC nav top bar */ 4 | export default function StakingPageThumbnailIcon(props: SvgIcon) { 5 | const { width = 16, height = 16, ...restProps } = props 6 | 7 | return ( 8 | 9 | 15 | 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /src/icons/type.ts: -------------------------------------------------------------------------------- 1 | import { SVGProps } from 'react' 2 | import { BoxProps } from '@chakra-ui/react' 3 | 4 | export type SvgIcon = SVGProps & BoxProps & Omit, keyof BoxProps> 5 | -------------------------------------------------------------------------------- /src/icons/wallet/Binance.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function Binance(props: SvgIcon) { 4 | return ( 5 | 6 | 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/icons/wallet/Coinbase.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function Coinbase(props: SvgIcon) { 4 | return ( 5 | 18 | 23 | 29 | 30 | ) 31 | } 32 | -------------------------------------------------------------------------------- /src/icons/wallet/Safepal.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function Safepal(props: SvgIcon) { 4 | return ( 5 | 18 | 27 | 28 | ) 29 | } 30 | -------------------------------------------------------------------------------- /src/icons/wallet/Trustwallet.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function Trustwallet(props: SvgIcon) { 4 | return ( 5 | 6 | 7 | 11 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | ) 27 | } 28 | -------------------------------------------------------------------------------- /src/icons/wallet/Walletconnect.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon } from '../type' 2 | 3 | export default function Walletconnect(props: SvgIcon) { 4 | return ( 5 | 6 | 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/instrumentation.ts: -------------------------------------------------------------------------------- 1 | export async function register() { 2 | if (process.env.NEXT_RUNTIME === 'nodejs') { 3 | await import('../sentry.server.config'); 4 | } 5 | 6 | if (process.env.NEXT_RUNTIME === 'edge') { 7 | await import('../sentry.edge.config'); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/pages/404.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | import { useRouter } from 'next/router' 3 | 4 | export default function Page404() { 5 | const router = useRouter() 6 | 7 | useEffect(() => { 8 | router.push('/') 9 | }, []) 10 | 11 | return null 12 | } 13 | -------------------------------------------------------------------------------- /src/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { theme } from '@/theme' 2 | import { ColorModeScript } from '@chakra-ui/react' 3 | import NextDocument, { Html, Main, Head, NextScript } from 'next/document' 4 | 5 | /** 6 | * @see https://chakra-ui.com/docs/styled-system/color-mode#for-nextjs 7 | */ 8 | export default class Document extends NextDocument { 9 | render() { 10 | return ( 11 | 12 | 13 | 14 | {/* 👇 Here's the script */} 15 | 16 |
17 | 18 | 19 | 20 | ) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/pages/_error.jsx: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | import Error from "next/error"; 3 | 4 | const CustomErrorComponent = (props) => { 5 | return ; 6 | }; 7 | 8 | CustomErrorComponent.getInitialProps = async (contextData) => { 9 | // In case this is running in a serverless function, await this in order to give Sentry 10 | // time to send the error before the lambda exits 11 | await Sentry.captureUnderscoreErrorException(contextData); 12 | 13 | // This will contain the status code of the response 14 | return Error.getInitialProps(contextData); 15 | }; 16 | 17 | export default CustomErrorComponent; 18 | -------------------------------------------------------------------------------- /src/pages/bridge.tsx: -------------------------------------------------------------------------------- 1 | import dynamic from 'next/dynamic' 2 | const Wormhole = dynamic(() => import('@/features/Wormhole')) 3 | 4 | function Bridge() { 5 | return 6 | } 7 | 8 | export default Bridge 9 | 10 | export async function getStaticProps() { 11 | return { 12 | props: { title: 'Wormhole' } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/pages/clmm/create-pool.tsx: -------------------------------------------------------------------------------- 1 | import { useClmmStore, useAppStore } from '@/store' 2 | import { useEffect } from 'react' 3 | import dynamic from 'next/dynamic' 4 | 5 | const CreatePool = dynamic(() => import('@/features/Create/ClmmPool')) 6 | 7 | function CreatePoolPage() { 8 | const raydium = useAppStore((s) => s.raydium) 9 | const fetchAmmConfigsAct = useClmmStore((s) => s.fetchAmmConfigsAct) 10 | 11 | useEffect(() => { 12 | if (!raydium) return 13 | fetchAmmConfigsAct() 14 | }, [raydium, fetchAmmConfigsAct]) 15 | 16 | return 17 | } 18 | 19 | export default CreatePoolPage 20 | 21 | export async function getStaticProps() { 22 | return { 23 | props: { title: 'Create Clmm Pool' } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/pages/clmm/create-position.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | import dynamic from 'next/dynamic' 3 | import { useClmmStore } from '@/store' 4 | 5 | const CreatePosition = dynamic(() => import('@/features/Clmm/ClmmPosition')) 6 | 7 | const action = { type: 'CreatePositionPage' } 8 | 9 | function CreatePositionPage() { 10 | useEffect( 11 | () => () => { 12 | useClmmStore.setState( 13 | { 14 | currentPoolInfo: undefined 15 | }, 16 | false, 17 | action 18 | ) 19 | }, 20 | [] 21 | ) 22 | 23 | return 24 | } 25 | 26 | export default CreatePositionPage 27 | 28 | export async function getStaticProps() { 29 | return { 30 | props: { title: 'Create Clmm Position' } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/pages/clmm/lock.tsx: -------------------------------------------------------------------------------- 1 | import dynamic from 'next/dynamic' 2 | 3 | const Lock = dynamic(() => import('@/features/Clmm/Lock')) 4 | 5 | function LockPage() { 6 | return 7 | } 8 | 9 | export default LockPage 10 | 11 | export async function getStaticProps() { 12 | return { 13 | props: { title: 'Burn Clmm Pool' } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/pages/debug.tsx: -------------------------------------------------------------------------------- 1 | import Debug from '@/features/Debug' 2 | 3 | export default function DebugPage() { 4 | return 5 | } 6 | -------------------------------------------------------------------------------- /src/pages/farms/create.tsx: -------------------------------------------------------------------------------- 1 | import CreateFarm from '@/features/Farm/Create' 2 | 3 | function FarmCreatePage() { 4 | return 5 | } 6 | 7 | export default FarmCreatePage 8 | 9 | export async function getStaticProps() { 10 | return { 11 | props: { title: 'Create Farm' } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/pages/farms/edit.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | import EditFarm from '@/features/Farm/Edit' 3 | import { useAppStore, useClmmStore } from '@/store' 4 | 5 | function FarmEditPage() { 6 | const raydium = useAppStore((s) => s.raydium) 7 | const loadAddRewardWhiteListAct = useClmmStore((s) => s.loadAddRewardWhiteListAct) 8 | 9 | useEffect(() => { 10 | raydium && loadAddRewardWhiteListAct({ checkFetch: true }) 11 | }, [loadAddRewardWhiteListAct, raydium]) 12 | 13 | return 14 | } 15 | 16 | export default FarmEditPage 17 | 18 | export async function getStaticProps() { 19 | return { 20 | props: { title: 'Edit Farm' } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | import { Flex } from '@chakra-ui/react' 3 | import type { NextPage } from 'next' 4 | import { useRouter } from 'next/router' 5 | // import Entry from '@/components/LandingPage/Entry' 6 | // import Facilitate from '@/components/LandingPage/Facilitate' 7 | // import Feature from '@/components/LandingPage/Feature' 8 | // import Footer from '@/components/LandingPage/Footer' 9 | // import Header from '@/components/LandingPage/Header' 10 | // import Liquidity from '@/components/LandingPage/Liquidity' 11 | // import Partner from '@/components/LandingPage/Partner' 12 | // import ProtocolStat from '@/components/LandingPage/ProtocolStat' 13 | 14 | const Home: NextPage = () => { 15 | const router = useRouter() 16 | useEffect(() => { 17 | // no ssr 18 | router.replace('/swap') 19 | }, []) 20 | return ( 21 | 22 | {/*
23 | 24 | 25 | 26 | 27 | 28 | 29 |