diff --git a/dapp/src/assets/images/mezo-beehive-modal-illustration.svg b/dapp/src/assets/images/mezo-beehive-modal-illustration.svg deleted file mode 100644 index 18ee51bba..000000000 --- a/dapp/src/assets/images/mezo-beehive-modal-illustration.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/dapp/src/assets/images/season-section-background.png b/dapp/src/assets/images/season-section-background.png deleted file mode 100644 index a6f2dfbdc..000000000 Binary files a/dapp/src/assets/images/season-section-background.png and /dev/null differ diff --git a/dapp/src/assets/images/season-section-foreground.png b/dapp/src/assets/images/season-section-foreground.png deleted file mode 100644 index e8554ba51..000000000 Binary files a/dapp/src/assets/images/season-section-foreground.png and /dev/null differ diff --git a/dapp/src/assets/webps/confetti.webp b/dapp/src/assets/webps/confetti.webp deleted file mode 100644 index f99786801..000000000 Binary files a/dapp/src/assets/webps/confetti.webp and /dev/null differ diff --git a/dapp/src/components/TransactionModal/UnsupportedBitcoinAddressModal.tsx b/dapp/src/components/TransactionModal/UnsupportedBitcoinAddressModal.tsx deleted file mode 100644 index ffca86507..000000000 --- a/dapp/src/components/TransactionModal/UnsupportedBitcoinAddressModal.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import React from "react" -import { - Box, - Button, - ModalBody, - ModalCloseButton, - ModalFooter, - ModalHeader, - Tag, -} from "@chakra-ui/react" -import { TextMd, TextSm } from "#/components/shared/Typography" -import { logPromiseFailure } from "#/utils" -import { BitcoinIcon } from "#/assets/icons" -import { CurrencyBalance } from "../shared/CurrencyBalance" -import { Alert, AlertIcon } from "../shared/Alert" - -type UnsupportedBitcoinAddressModalProps = { - account?: { - name: string - balance: bigint - } - requestAccount: () => Promise -} - -export default function UnsupportedBitcoinAddressModal({ - account, - requestAccount, -}: UnsupportedBitcoinAddressModalProps) { - const handleClick = () => { - logPromiseFailure(requestAccount()) - } - - return ( - <> - - - Account not supported - - - - {account && ( - - - - - - {account.name} - - - - - - Unsupported - - - )} - - - We currently support Legacy,{" "} - Native SegWit and Nested SegWit{" "} - accounts only. - - - - - - - - ) -} diff --git a/dapp/src/components/shared/ButtonLink.tsx b/dapp/src/components/shared/ButtonLink.tsx deleted file mode 100644 index 3f8f13af0..000000000 --- a/dapp/src/components/shared/ButtonLink.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from "react" -import { Button, ButtonProps, Icon, Link, LinkProps } from "@chakra-ui/react" -import { IconArrowUpRight, TablerIcon } from "@tabler/icons-react" - -type ButtonLinkProps = ButtonProps & - LinkProps & { - icon?: TablerIcon - iconColor?: string - } - -export default function ButtonLink({ - children, - icon = IconArrowUpRight, - iconColor = "brand.400", - variant = "outline", - ...props -}: ButtonLinkProps) { - return ( - - ) -} diff --git a/dapp/src/components/shared/IconTag.tsx b/dapp/src/components/shared/IconTag.tsx deleted file mode 100644 index 7c2f8b51e..000000000 --- a/dapp/src/components/shared/IconTag.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { Tag, TagLeftIcon, TagLabel, TagProps, Icon } from "@chakra-ui/react" - -type IconTagProps = TagProps & { - icon: typeof Icon -} - -export default function IconTag(props: IconTagProps) { - const { children, icon, ...restProps } = props - - return ( - - - {children} - - ) -} diff --git a/dapp/src/components/shared/NavLink.tsx b/dapp/src/components/shared/NavLink.tsx deleted file mode 100644 index 305bbfe53..000000000 --- a/dapp/src/components/shared/NavLink.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react" -import { - Link as ChakraLink, - LinkProps as ChakraLinkProps, -} from "@chakra-ui/react" -import { - NavLink as RouterNavLink, - NavLinkProps as RouterNavLinkProps, -} from "react-router-dom" - -export type NavLinkProps = Omit & - Pick - -export function NavLink(props: NavLinkProps) { - const { children, ...restProps } = props - return ( - - {children as React.ReactNode} - - ) -} diff --git a/dapp/src/components/shared/SeasonSectionBackground.tsx b/dapp/src/components/shared/SeasonSectionBackground.tsx deleted file mode 100644 index 027775059..000000000 --- a/dapp/src/components/shared/SeasonSectionBackground.tsx +++ /dev/null @@ -1,125 +0,0 @@ -import React, { useRef } from "react" -import { Box, BoxProps } from "@chakra-ui/react" -import { useSize } from "@chakra-ui/react-use-size" -import { - MotionValue, - motion, - useScroll, - useSpring, - useTransform, - useTime, - wrap, -} from "framer-motion" -import seasonBackground from "#/assets/images/season-section-background.png" -import seasonForeground from "#/assets/images/season-section-foreground.png" - -export function SeasonSectionBackground(props: BoxProps) { - const containerRef = useRef(null) - const { scrollYProgress } = useScroll({ - target: containerRef, - offset: ["center start", "start end"], - }) - const smoothScrollYProgress = useSpring(scrollYProgress, { - damping: 10, - stiffness: 90, - mass: 0.75, - }) as MotionValue - const foregroundParallax = useTransform( - smoothScrollYProgress, - [0, 1], - ["45%", "65%"], - ) - const time = useTime() - // Seed value is wrapped to prevent infinite increment causing potential memory leaks - const seed = useTransform(time, (value) => wrap(0, 2137, Math.floor(value))) - - const size = useSize(containerRef) - - return ( - - - - - - - - - - - - - - - - - - ) -} diff --git a/dapp/src/constants/index.ts b/dapp/src/constants/index.ts index 33234115f..a5e49268c 100644 --- a/dapp/src/constants/index.ts +++ b/dapp/src/constants/index.ts @@ -6,7 +6,6 @@ export * from "./externalHref" export { default as featureFlags } from "./featureFlags" export { default as queryKeysFactory } from "./queryKeysFactory" export { default as screen } from "./screen" -export * from "./staking" export { default as tbtc } from "./tbtc" export * from "./time" export { default as wallets } from "./wallets" diff --git a/dapp/src/constants/staking.ts b/dapp/src/constants/staking.ts deleted file mode 100644 index 8b4bd6086..000000000 --- a/dapp/src/constants/staking.ts +++ /dev/null @@ -1,2 +0,0 @@ -// TODO: Read the value from the SDK, once we expose it -export const MINIMUM_BALANCE = BigInt(String(5e6)) // 0.05 BTC diff --git a/dapp/src/hooks/router/index.ts b/dapp/src/hooks/router/index.ts index 5b97eb715..c8edda5c3 100644 --- a/dapp/src/hooks/router/index.ts +++ b/dapp/src/hooks/router/index.ts @@ -1,2 +1 @@ -export * from "./useIsActiveRoute" export { default as useAppNavigate } from "./useAppNavigate" diff --git a/dapp/src/hooks/router/useIsActiveRoute.ts b/dapp/src/hooks/router/useIsActiveRoute.ts deleted file mode 100644 index 715c3702a..000000000 --- a/dapp/src/hooks/router/useIsActiveRoute.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { routerPath } from "#/router/path" -import { useLocation } from "react-router-dom" - -export const useIsActiveRoute = (route: string) => { - const location = useLocation() - - return location.pathname === route -} - -export const useIsHomeRouteActive = () => useIsActiveRoute(routerPath.home) diff --git a/dapp/src/pages/DashboardPage/PositionDetails.tsx b/dapp/src/pages/DashboardPage/PositionDetails.tsx index d403519f6..6b4f4267e 100644 --- a/dapp/src/pages/DashboardPage/PositionDetails.tsx +++ b/dapp/src/pages/DashboardPage/PositionDetails.tsx @@ -10,14 +10,7 @@ import { useActivities, } from "#/hooks" import { ACTION_FLOW_TYPES } from "#/types" -import { - Button, - ButtonProps, - Flex, - HStack, - // Tag, - VStack, -} from "@chakra-ui/react" +import { Button, ButtonProps, Flex, HStack, VStack } from "@chakra-ui/react" import ArrivingSoonTooltip from "#/components/ArrivingSoonTooltip" import UserDataSkeleton from "#/components/shared/UserDataSkeleton" import { featureFlags } from "#/constants" @@ -69,22 +62,6 @@ export default function PositionDetails() { placement="right" /> )} - {/* TODO: Uncomment when position will be implemented */} - {/* {positionPercentage && ( - - Top {positionPercentage}% - - )} */} diff --git a/dapp/src/pages/DashboardPage/UsefulLinks.tsx b/dapp/src/pages/DashboardPage/UsefulLinks.tsx deleted file mode 100644 index 6202c411f..000000000 --- a/dapp/src/pages/DashboardPage/UsefulLinks.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react" -import { StackProps, VStack } from "@chakra-ui/react" -import ButtonLink from "#/components/shared/ButtonLink" -import { EXTERNAL_HREF } from "#/constants" - -export default function UsefulLinks(props: StackProps) { - return ( - - {[ - { label: "Documentation", href: EXTERNAL_HREF.DOCS }, - { label: "Blog", href: EXTERNAL_HREF.BLOG }, - { label: "FAQ", href: EXTERNAL_HREF.FAQ }, - ].map(({ label, href }) => ( - - {label} - - ))} - - ) -} diff --git a/dapp/src/theme/modalTheme.ts b/dapp/src/theme/modalTheme.ts index 31c36fd29..d4cb15d5d 100644 --- a/dapp/src/theme/modalTheme.ts +++ b/dapp/src/theme/modalTheme.ts @@ -6,7 +6,10 @@ const baseStyleContainer = defineStyle({ }) const baseStyleDialog = defineStyle({ - marginTop: { base: 12, sm: "var(--chakra-space-modal_shift)" }, + marginTop: { + base: 12, + sm: "9.75rem", // 156px + }, marginBottom: 8, boxShadow: "none", borderRadius: "xl", diff --git a/dapp/src/theme/utils/semanticTokens.ts b/dapp/src/theme/utils/semanticTokens.ts index 90801b7b3..8fb5ba562 100644 --- a/dapp/src/theme/utils/semanticTokens.ts +++ b/dapp/src/theme/utils/semanticTokens.ts @@ -1,6 +1,5 @@ export const semanticTokens = { space: { - modal_shift: "9.75rem", // 156px dashboard_card_padding: 5, }, } diff --git a/dapp/src/types/core.ts b/dapp/src/types/core.ts index 2fce09a01..9dcdb75b8 100644 --- a/dapp/src/types/core.ts +++ b/dapp/src/types/core.ts @@ -1,5 +1 @@ -export type Tuple = [T, T] - -export type WithRequired = T & { [P in K]-?: T[P] } - export type Optional = Pick, K> & Omit diff --git a/dapp/src/types/index.ts b/dapp/src/types/index.ts index aa1e0e3b0..7b39c9288 100644 --- a/dapp/src/types/index.ts +++ b/dapp/src/types/index.ts @@ -12,5 +12,4 @@ export * from "./form" export * from "./eip1193" export * from "./status" export * from "./orangekit" -export * from "./ledgerLive" export * from "./dapp-mode" diff --git a/dapp/src/types/ledgerLive.ts b/dapp/src/types/ledgerLive.ts deleted file mode 100644 index 6cd4aea65..000000000 --- a/dapp/src/types/ledgerLive.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type LedgerLiveError = { - message?: string - name?: string - stack?: string -} diff --git a/dapp/src/utils/index.ts b/dapp/src/utils/index.ts index c79d332b7..64e1ffc9b 100644 --- a/dapp/src/utils/index.ts +++ b/dapp/src/utils/index.ts @@ -3,7 +3,6 @@ export * from "./address" export * from "./forms" export * from "./currency" export * from "./chain" -export * from "./text" export * from "./time" export * from "./promise" export * from "./verifyDepositAddress" diff --git a/dapp/src/utils/router.ts b/dapp/src/utils/router.ts index 868ab3a0c..059f2872a 100644 --- a/dapp/src/utils/router.ts +++ b/dapp/src/utils/router.ts @@ -1,7 +1,4 @@ -import { To, redirect } from "react-router-dom" -import { isString } from "./type-check" - -const getURLPath = (to: To) => (isString(to) ? to : to.pathname) +import { redirect } from "react-router-dom" const getURLParamFromHref = (href: string, paramName: string) => { const { searchParams } = new URL(href) @@ -19,7 +16,6 @@ const redirectWithSearchParams = (url: string, to: string) => { } export default { - getURLPath, getURLParam, getURLParamFromHref, redirectWithSearchParams, diff --git a/dapp/src/utils/text.ts b/dapp/src/utils/text.ts deleted file mode 100644 index 36e034408..000000000 --- a/dapp/src/utils/text.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const capitalizeFirstLetter = (text: string): string => - text[0].toUpperCase() + text.slice(1)