From d7291dba90d5dfe7b6873ae0781b10c44297bb81 Mon Sep 17 00:00:00 2001 From: Hugo Montenegro Date: Thu, 16 Oct 2025 01:55:33 -0300 Subject: [PATCH 1/5] various fixes --- next.config.js | 29 +++++- src/app/(mobile-ui)/dev/shake-test/page.tsx | 61 ++++++++++-- src/app/(mobile-ui)/points/page.tsx | 86 ++++++++++------- src/app/(mobile-ui)/qr-pay/page.tsx | 66 +++++++++---- src/app/api/health/route.ts | 2 +- src/app/api/og/route.tsx | 2 +- src/app/request/[...username]/layout.tsx | 5 +- src/app/send/[...username]/layout.tsx | 5 +- src/app/send/[...username]/page.tsx | 5 +- .../Global/NavigationArrow/index.tsx | 17 ++++ src/components/Global/ShareButton/index.tsx | 2 +- .../Components/NetworkListItem.tsx | 4 +- src/components/Payment/PaymentInfoRow.tsx | 6 +- .../Profile/components/ProfileMenuItem.tsx | 10 +- src/components/Profile/index.tsx | 2 +- src/components/Setup/Setup.consts.tsx | 20 +++- src/components/Setup/Setup.types.ts | 2 + src/components/Setup/Views/JoinWaitlist.tsx | 30 +++--- src/components/Setup/Views/Landing.tsx | 96 +++++++++++++++++++ src/components/Setup/Views/index.ts | 1 + .../TransactionDetailsReceipt.tsx | 1 + src/config/wagmi.config.tsx | 4 +- src/hooks/useBanners.tsx | 2 +- src/lib/og/build-og-metadata.ts | 2 +- src/utils/general.utils.ts | 2 +- tsconfig.json | 6 +- 26 files changed, 363 insertions(+), 105 deletions(-) create mode 100644 src/components/Global/NavigationArrow/index.tsx create mode 100644 src/components/Setup/Views/Landing.tsx diff --git a/next.config.js b/next.config.js index 38b337a2e..26bc2d3a8 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,7 @@ const os = require('os') const withBundleAnalyzer = require('@next/bundle-analyzer')({ - enabled: process.env.ANALYZE === 'true', + // Only enable in production builds when explicitly requested + enabled: process.env.ANALYZE === 'true' && process.env.NODE_ENV !== 'development', }) const redirectsConfig = require('./redirects.json') @@ -36,6 +37,32 @@ let nextConfig = { }, ], }, + + // Turbopack configuration for faster dev builds + turbopack: { + resolveAlias: { + // Optimize common aliases + '@': './src', + }, + }, + + // External packages that shouldn't be bundled (server-side only) + serverExternalPackages: [], + + // Disable source maps in production (already handled by Sentry) + productionBrowserSourceMaps: false, + + // Transpile packages for better compatibility + transpilePackages: ['@squirrel-labs/peanut-sdk'], + + // Experimental features for optimization + experimental: { + // Optimize package imports for tree-shaking + optimizePackageImports: ['@chakra-ui/react', 'framer-motion', '@headlessui/react'], + // Speed up webpack builds (fallback mode when not using --turbo) + webpackBuildWorker: true, + }, + webpack: (config, { isServer, dev }) => { if (!dev || !process.env.NEXT_TURBO) { if (isServer) { diff --git a/src/app/(mobile-ui)/dev/shake-test/page.tsx b/src/app/(mobile-ui)/dev/shake-test/page.tsx index 6dc060b1a..63ac9aaef 100644 --- a/src/app/(mobile-ui)/dev/shake-test/page.tsx +++ b/src/app/(mobile-ui)/dev/shake-test/page.tsx @@ -15,6 +15,7 @@ export default function DevShakeTestPage() { const [holdTimer, setHoldTimer] = useState(null) const [progressInterval, setProgressInterval] = useState(null) const [showSuccess, setShowSuccess] = useState(false) + const [holdStartTime, setHoldStartTime] = useState(null) const startHold = useCallback(() => { setHoldProgress(0) @@ -22,6 +23,7 @@ export default function DevShakeTestPage() { setShowSuccess(false) const startTime = Date.now() + setHoldStartTime(startTime) let lastIntensity: 'weak' | 'medium' | 'strong' | 'intense' = 'weak' // Update progress and shake intensity @@ -94,6 +96,51 @@ export default function DevShakeTestPage() { }, []) const cancelHold = useCallback(() => { + const PREVIEW_DURATION_MS = 500 + + // Calculate how long the user held + const elapsed = holdStartTime ? Date.now() - holdStartTime : 0 + + // Clear the completion timer (we'll never complete on release) + if (holdTimer) clearTimeout(holdTimer) + setHoldTimer(null) + + // If it was a quick tap, let the preview animation continue for 500ms before resetting + if (elapsed > 0 && elapsed < PREVIEW_DURATION_MS) { + const remainingPreviewTime = PREVIEW_DURATION_MS - elapsed + + // Let animations continue for the preview duration + const resetTimer = setTimeout(() => { + // Clean up after preview + if (progressInterval) clearInterval(progressInterval) + setProgressInterval(null) + setHoldProgress(0) + setIsShaking(false) + setShakeIntensity('none') + setHoldStartTime(null) + + if ('vibrate' in navigator) { + navigator.vibrate(0) + } + }, remainingPreviewTime) + + setHoldTimer(resetTimer) + } else { + // Released after preview duration - reset immediately + if (progressInterval) clearInterval(progressInterval) + setProgressInterval(null) + setHoldProgress(0) + setIsShaking(false) + setShakeIntensity('none') + setHoldStartTime(null) + + if ('vibrate' in navigator) { + navigator.vibrate(0) + } + } + }, [holdTimer, progressInterval, holdStartTime]) + + const reset = useCallback(() => { if (holdTimer) clearTimeout(holdTimer) if (progressInterval) clearInterval(progressInterval) setHoldTimer(null) @@ -101,18 +148,13 @@ export default function DevShakeTestPage() { setHoldProgress(0) setIsShaking(false) setShakeIntensity('none') - - // Stop any ongoing vibration when user releases early + setHoldStartTime(null) + setShowSuccess(false) if ('vibrate' in navigator) { navigator.vibrate(0) } }, [holdTimer, progressInterval]) - const reset = useCallback(() => { - cancelHold() - setShowSuccess(false) - }, [cancelHold]) - return (
@@ -191,7 +233,7 @@ export default function DevShakeTestPage() {
- Press and hold the button to test the progressive shake + Hold the button for the full duration (quick taps show 500ms preview)
) : ( @@ -216,7 +258,8 @@ export default function DevShakeTestPage() {
  • βœ“ Button fills with black as you hold
  • βœ“ Shake starts weak and gets progressively stronger
  • βœ“ Haptic feedback intensifies with shake (PWA only)
  • -
  • βœ“ Shake stops when you release early
  • +
  • βœ“ Quick tap shows preview but resets (must hold full duration)
  • +
  • βœ“ Release early cancels the action
  • βœ“ After full hold: shake stops, confetti appears, final haptic
  • βœ“ Works on mobile touch and desktop mouse
  • diff --git a/src/app/(mobile-ui)/points/page.tsx b/src/app/(mobile-ui)/points/page.tsx index 5b28006de..1b96ad84a 100644 --- a/src/app/(mobile-ui)/points/page.tsx +++ b/src/app/(mobile-ui)/points/page.tsx @@ -5,6 +5,7 @@ import Card, { getCardPosition } from '@/components/Global/Card' import CopyToClipboard from '@/components/Global/CopyToClipboard' import { Icon } from '@/components/Global/Icons/Icon' import NavHeader from '@/components/Global/NavHeader' +import NavigationArrow from '@/components/Global/NavigationArrow' import PeanutLoading from '@/components/Global/PeanutLoading' import ShareButton from '@/components/Global/ShareButton' import TransactionAvatarBadge from '@/components/TransactionDetails/TransactionAvatarBadge' @@ -80,55 +81,66 @@ const PointsPage = () => { router.back()} />
    - -

    TIER {tierInfo?.data.currentTier}

    - - star - {tierInfo.data.totalPoints} {tierInfo.data.totalPoints === 1 ? 'Point' : 'Points'} - + +
    + star +

    + {tierInfo.data.totalPoints} {tierInfo.data.totalPoints === 1 ? 'Point' : 'Points'} +

    +
    + {/* Progressive progress bar */} -
    +
    {`Tier -
    +
    0 - ? tierInfo.data.totalPoints / tierInfo.data.nextTierThreshold - : 1 - ), - 0.6 - ) * 100 + tierInfo?.data.currentTier >= 3 + ? 100 + : Math.pow( + Math.min( + 1, + tierInfo.data.nextTierThreshold > 0 + ? tierInfo.data.totalPoints / tierInfo.data.nextTierThreshold + : 0 + ), + 0.6 + ) * 100 }%`, }} />
    - {`Tier + {tierInfo?.data.currentTier < 3 && ( + {`Tier + )}
    -

    - {tierInfo.data.pointsToNextTier} {tierInfo.data.pointsToNextTier === 1 ? 'point' : 'points'}{' '} - needed for the next tier -

    +
    +

    You're at tier {tierInfo?.data.currentTier}.

    + {tierInfo?.data.currentTier < 3 ? ( +

    + {tierInfo.data.pointsToNextTier}{' '} + {tierInfo.data.pointsToNextTier === 1 ? 'point' : 'points'} needed to level up +

    + ) : ( +

    You've reached the max tier!

    + )} +
    {user?.invitedBy ? ( -

    +

    router.push(`/${user.invitedBy}`)} className="inline-flex cursor-pointer items-center gap-1 font-bold" @@ -138,8 +150,8 @@ const PointsPage = () => { invited you and earned points. Now it's your turn! Invite friends and get 20% of their points.

    ) : ( -
    - +
    +

    Do stuff on Peanut and get points. Invite friends and pocket 20% of their points, too.

    @@ -150,7 +162,7 @@ const PointsPage = () => {

    {`${inviteCode}`}

    - +
    @@ -167,7 +179,7 @@ const PointsPage = () => { onClick={() => router.push('/points/invites')} >

    People you invited

    - +
    {invites.invitees?.map((invite: PointsInvite, i: number) => { diff --git a/src/app/(mobile-ui)/qr-pay/page.tsx b/src/app/(mobile-ui)/qr-pay/page.tsx index bbee3979f..7a17be8e2 100644 --- a/src/app/(mobile-ui)/qr-pay/page.tsx +++ b/src/app/(mobile-ui)/qr-pay/page.tsx @@ -79,6 +79,7 @@ export default function QRPayPage() { const [holdProgress, setHoldProgress] = useState(0) const holdTimerRef = useRef(null) const progressIntervalRef = useRef(null) + const holdStartTimeRef = useRef(null) const { user } = useAuth() const [pendingSimpleFiPaymentId, setPendingSimpleFiPaymentId] = useState(null) const [isWaitingForWebSocket, setIsWaitingForWebSocket] = useState(false) @@ -115,6 +116,7 @@ export default function QRPayPage() { setLoadingState('Idle') if (holdTimerRef.current) clearTimeout(holdTimerRef.current) if (progressIntervalRef.current) clearInterval(progressIntervalRef.current) + holdStartTimeRef.current = null setHoldProgress(0) setIsShaking(false) setShakeIntensity('none') @@ -125,6 +127,7 @@ export default function QRPayPage() { return () => { if (holdTimerRef.current) clearTimeout(holdTimerRef.current) if (progressIntervalRef.current) clearInterval(progressIntervalRef.current) + holdStartTimeRef.current = null } }, []) @@ -495,22 +498,6 @@ export default function QRPayPage() { } }, [paymentProcessor, handleSimpleFiPayment, handleMantecaPayment]) - // Hold-to-claim mechanics - const cancelHold = useCallback(() => { - if (holdTimerRef.current) clearTimeout(holdTimerRef.current) - if (progressIntervalRef.current) clearInterval(progressIntervalRef.current) - holdTimerRef.current = null - progressIntervalRef.current = null - setHoldProgress(0) - setIsShaking(false) - setShakeIntensity('none') - - // Stop any ongoing vibration when user releases early - if ('vibrate' in navigator) { - navigator.vibrate(0) - } - }, []) - // DEV NOTE: This is an OPTIMISTIC claim flow for better UX // We immediately show success UI and trigger confetti, then claim in background // If claim fails, we show error post-factum but keep the user in success state @@ -562,11 +549,58 @@ export default function QRPayPage() { } }, [qrPayment]) + // Hold-to-claim mechanics + const cancelHold = useCallback(() => { + const PREVIEW_DURATION_MS = 500 + + // Calculate how long the user held + const elapsed = holdStartTimeRef.current ? Date.now() - holdStartTimeRef.current : 0 + + // Clear the completion timer (we'll never complete on release) + if (holdTimerRef.current) clearTimeout(holdTimerRef.current) + holdTimerRef.current = null + + // If it was a quick tap, let the preview animation continue for 500ms before resetting + if (elapsed > 0 && elapsed < PREVIEW_DURATION_MS) { + const remainingPreviewTime = PREVIEW_DURATION_MS - elapsed + + // Let animations continue for the preview duration + const resetTimer = setTimeout(() => { + // Clean up after preview + if (progressIntervalRef.current) clearInterval(progressIntervalRef.current) + progressIntervalRef.current = null + setHoldProgress(0) + setIsShaking(false) + setShakeIntensity('none') + holdStartTimeRef.current = null + + if ('vibrate' in navigator) { + navigator.vibrate(0) + } + }, remainingPreviewTime) + + holdTimerRef.current = resetTimer + } else { + // Released after preview duration - reset immediately + if (progressIntervalRef.current) clearInterval(progressIntervalRef.current) + progressIntervalRef.current = null + setHoldProgress(0) + setIsShaking(false) + setShakeIntensity('none') + holdStartTimeRef.current = null + + if ('vibrate' in navigator) { + navigator.vibrate(0) + } + } + }, []) + const startHold = useCallback(() => { setHoldProgress(0) setIsShaking(true) const startTime = Date.now() + holdStartTimeRef.current = startTime let lastIntensity: 'weak' | 'medium' | 'strong' | 'intense' = 'weak' // Update progress and shake intensity diff --git a/src/app/api/health/route.ts b/src/app/api/health/route.ts index 6218ca0f1..fba4ef5f6 100644 --- a/src/app/api/health/route.ts +++ b/src/app/api/health/route.ts @@ -38,7 +38,7 @@ async function sendDiscordNotification(healthData: any) { const roleMention = shouldMentionRole ? '<@&1187109195389083739> ' : '' - const message = `${roleMention}🚨 **Peanut Protocol Health Alert** 🚨 + const message = `${roleMention}🚨 **Peanut Health Alert** 🚨 System Status: **${healthData.status.toUpperCase()}** Health Score: ${healthData.healthScore}% diff --git a/src/app/api/og/route.tsx b/src/app/api/og/route.tsx index 100b4ccae..a5146d651 100644 --- a/src/app/api/og/route.tsx +++ b/src/app/api/og/route.tsx @@ -103,7 +103,7 @@ export async function GET(req: NextRequest) { } if (type === 'generic') { - return new ImageResponse(
    Peanut Protocol
    , { + return new ImageResponse(
    Peanut
    , { width: 1200, height: 630, fonts: [{ name: 'Montserrat', data: montserratMedium, style: 'normal' }], diff --git a/src/app/request/[...username]/layout.tsx b/src/app/request/[...username]/layout.tsx index 3494aabc1..0f7108971 100644 --- a/src/app/request/[...username]/layout.tsx +++ b/src/app/request/[...username]/layout.tsx @@ -2,8 +2,9 @@ import PaymentLayoutWrapper from '@/app/[...recipient]/payment-layout-wrapper' import { generateMetadata as generateBaseMetadata } from '@/app/metadata' import { Metadata } from 'next' -export async function generateMetadata({ params }: { params: { username: string[] } }): Promise { - const username = params.username?.[0] ? decodeURIComponent(params.username[0]) : 'user' +export async function generateMetadata({ params }: { params: Promise<{ username: string[] }> }): Promise { + const { username: usernameArray } = await params + const username = usernameArray?.[0] ? decodeURIComponent(usernameArray[0]) : 'user' const defaultTitle = `Request Money from ${username} | Peanut` const defaultDescription = `Request digital dollars from ${username} using Peanut. Create and share P2P payment requests easily.` diff --git a/src/app/send/[...username]/layout.tsx b/src/app/send/[...username]/layout.tsx index 8166ba05f..a75b9155d 100644 --- a/src/app/send/[...username]/layout.tsx +++ b/src/app/send/[...username]/layout.tsx @@ -2,8 +2,9 @@ import PaymentLayoutWrapper from '@/app/[...recipient]/payment-layout-wrapper' import { generateMetadata as generateBaseMetadata } from '@/app/metadata' import { Metadata } from 'next' -export async function generateMetadata({ params }: { params: { username: string[] } }): Promise { - const username = params.username?.[0] ? decodeURIComponent(params.username[0]) : 'user' +export async function generateMetadata({ params }: { params: Promise<{ username: string[] }> }): Promise { + const { username: usernameArray } = await params + const username = usernameArray?.[0] ? decodeURIComponent(usernameArray[0]) : 'user' const defaultTitle = `Send Money to ${username} | Peanut` const defaultDescription = `Send digital dollars to ${username} using Peanut. Create and share P2P payment requests easily.` diff --git a/src/app/send/[...username]/page.tsx b/src/app/send/[...username]/page.tsx index 1e7f78168..284f9d577 100644 --- a/src/app/send/[...username]/page.tsx +++ b/src/app/send/[...username]/page.tsx @@ -21,8 +21,9 @@ export default function DirectPaymentPage(props: PageProps) { ) } -export async function generateMetadata({ params }: { params: { username: string[] } }): Promise { - const username = params.username?.[0] ? decodeURIComponent(params.username[0]) : 'user' +export async function generateMetadata({ params }: { params: Promise<{ username: string[] }> }): Promise { + const { username: usernameArray } = await params + const username = usernameArray?.[0] ? decodeURIComponent(usernameArray[0]) : 'user' const defaultTitle = `Send Money to ${username} | Peanut` const defaultDescription = `Send digital dollars to ${username} quickly and securely with Peanut.` diff --git a/src/components/Global/NavigationArrow/index.tsx b/src/components/Global/NavigationArrow/index.tsx new file mode 100644 index 000000000..492005a2e --- /dev/null +++ b/src/components/Global/NavigationArrow/index.tsx @@ -0,0 +1,17 @@ +import { Icon } from '@/components/Global/Icons/Icon' +import { twMerge } from 'tailwind-merge' + +interface NavigationArrowProps { + size?: number + className?: string +} + +/** + * Standard navigation arrow component (chevron pointing right) + * Used consistently across the app for navigable list items + */ +const NavigationArrow: React.FC = ({ size = 24, className }) => { + return +} + +export default NavigationArrow diff --git a/src/components/Global/ShareButton/index.tsx b/src/components/Global/ShareButton/index.tsx index 024bbd999..812349782 100644 --- a/src/components/Global/ShareButton/index.tsx +++ b/src/components/Global/ShareButton/index.tsx @@ -29,7 +29,7 @@ const ShareButton = ({ url, generateUrl, generateText, - title = 'Peanut Protocol', + title = 'Peanut', text, onSuccess, onError, diff --git a/src/components/Global/TokenSelector/Components/NetworkListItem.tsx b/src/components/Global/TokenSelector/Components/NetworkListItem.tsx index 61fa84fc6..177ae3346 100644 --- a/src/components/Global/TokenSelector/Components/NetworkListItem.tsx +++ b/src/components/Global/TokenSelector/Components/NetworkListItem.tsx @@ -4,9 +4,9 @@ import { twMerge } from 'tailwind-merge' import { Button } from '@/components/0_Bruddle' import Card from '@/components/Global/Card' +import NavigationArrow from '@/components/Global/NavigationArrow' import AvatarWithBadge from '@/components/Profile/AvatarWithBadge' import StatusBadge from '../../Badges/StatusBadge' -import { Icon } from '../../Icons/Icon' interface NetworkListItemProps { chainId: string @@ -81,7 +81,7 @@ const NetworkListItem: React.FC = ({ ) : rightContent ? ( rightContent ) : ( - + )}
    diff --git a/src/components/Payment/PaymentInfoRow.tsx b/src/components/Payment/PaymentInfoRow.tsx index be0dc2d6e..1321ec48c 100644 --- a/src/components/Payment/PaymentInfoRow.tsx +++ b/src/components/Payment/PaymentInfoRow.tsx @@ -12,6 +12,7 @@ export interface PaymentInfoRowProps { hideBottomBorder?: boolean allowCopy?: boolean copyValue?: string + onClick?: () => void } export const PaymentInfoRow = ({ @@ -22,6 +23,7 @@ export const PaymentInfoRow = ({ hideBottomBorder, allowCopy, copyValue, + onClick, }: PaymentInfoRowProps) => { const [showMoreInfo, setShowMoreInfo] = useState(false) const tooltipId = useId() @@ -30,8 +32,10 @@ export const PaymentInfoRow = ({
    diff --git a/src/components/Profile/components/ProfileMenuItem.tsx b/src/components/Profile/components/ProfileMenuItem.tsx index 862864320..8379b4f86 100644 --- a/src/components/Profile/components/ProfileMenuItem.tsx +++ b/src/components/Profile/components/ProfileMenuItem.tsx @@ -1,6 +1,7 @@ import StatusBadge from '@/components/Global/Badges/StatusBadge' import Card, { CardPosition } from '@/components/Global/Card' import { Icon, IconName } from '@/components/Global/Icons/Icon' +import NavigationArrow from '@/components/Global/NavigationArrow' import { Tooltip } from '@/components/Tooltip' import Link from 'next/link' import React from 'react' @@ -48,13 +49,10 @@ const ProfileMenuItem: React.FC = ({
    {comingSoon ? ( + ) : endIcon ? ( + ) : ( - + )}
    diff --git a/src/components/Profile/index.tsx b/src/components/Profile/index.tsx index aa831928d..93b486871 100644 --- a/src/components/Profile/index.tsx +++ b/src/components/Profile/index.tsx @@ -150,7 +150,7 @@ export const Profile = () => {

    {`${inviteData.inviteCode}`}

    - +
    {
    { 'rounded-sm' )} /> +
    {error && ( @@ -92,23 +103,20 @@ const JoinWaitlist = () => {
    )} +
    +
    + or +
    +
    + - -
    ) } diff --git a/src/components/Setup/Views/Landing.tsx b/src/components/Setup/Views/Landing.tsx new file mode 100644 index 000000000..aa2ff8e99 --- /dev/null +++ b/src/components/Setup/Views/Landing.tsx @@ -0,0 +1,96 @@ +'use client' + +import { Button, Card } from '@/components/0_Bruddle' +import { useToast } from '@/components/0_Bruddle/Toast' +import { useAuth } from '@/context/authContext' +import { useSetupFlow } from '@/hooks/useSetupFlow' +import { useLogin } from '@/hooks/useLogin' +import { getFromLocalStorage, sanitizeRedirectURL } from '@/utils' +import * as Sentry from '@sentry/nextjs' +import { useRouter, useSearchParams } from 'next/navigation' +import { useEffect } from 'react' +import Link from 'next/link' + +const LandingStep = () => { + const { handleNext } = useSetupFlow() + const { handleLoginClick, isLoggingIn } = useLogin() + const { user } = useAuth() + const { push } = useRouter() + const toast = useToast() + const searchParams = useSearchParams() + + useEffect(() => { + if (!!user) { + const localStorageRedirect = getFromLocalStorage('redirect') + const redirect_uri = searchParams.get('redirect_uri') + if (redirect_uri) { + const sanitizedRedirectUrl = sanitizeRedirectURL(redirect_uri) + // Only redirect if the URL is safe (same-origin) + if (sanitizedRedirectUrl) { + push(sanitizedRedirectUrl) + } else { + // Reject external redirects, go to home instead + push('/home') + } + } else if (localStorageRedirect) { + localStorage.removeItem('redirect') + const sanitizedLocalRedirect = sanitizeRedirectURL(localStorageRedirect) + // Only redirect if the URL is safe (same-origin) + if (sanitizedLocalRedirect) { + push(sanitizedLocalRedirect) + } else { + // Reject external redirects, go to home instead + push('/home') + } + } else { + push('/home') + } + } + }, [user, push, searchParams]) + + const handleError = (error: any) => { + const errorMessage = + error.code === 'LOGIN_CANCELED' + ? 'Login was canceled. Please try again.' + : error.code === 'NO_PASSKEY' + ? 'No passkey found. Please create a wallet first.' + : 'An unexpected error occurred during login.' + toast.error(errorMessage) + Sentry.captureException(error, { extra: { errorCode: error.code } }) + } + + const onLoginClick = async () => { + try { + await handleLoginClick() + } catch (e) { + handleError(e) + } + } + + return ( + + + + +
    + + Need to recover your Peanut wallet? + +
    +
    +
    + ) +} + +export default LandingStep diff --git a/src/components/Setup/Views/index.ts b/src/components/Setup/Views/index.ts index 5b551debc..82cb898de 100644 --- a/src/components/Setup/Views/index.ts +++ b/src/components/Setup/Views/index.ts @@ -2,5 +2,6 @@ export { default as InstallPWA } from './InstallPWA' export { default as SetupPasskey } from './SetupPasskey' export { default as SignupStep } from './Signup' export { default as WelcomeStep } from './Welcome' +export { default as LandingStep } from './Landing' export { default as JoinBetaStep } from './JoinBeta' export { default as CollectEmail } from './CollectEmail' diff --git a/src/components/TransactionDetails/TransactionDetailsReceipt.tsx b/src/components/TransactionDetails/TransactionDetailsReceipt.tsx index 37e6f59ec..72907357d 100644 --- a/src/components/TransactionDetails/TransactionDetailsReceipt.tsx +++ b/src/components/TransactionDetails/TransactionDetailsReceipt.tsx @@ -863,6 +863,7 @@ export const TransactionDetailsReceipt = ({
    } hideBottomBorder={shouldHideBorder('points')} + onClick={() => router.push('/points')} /> )} {rowVisibilityConfig.comment && ( diff --git a/src/config/wagmi.config.tsx b/src/config/wagmi.config.tsx index 97f18f244..3c2b24041 100644 --- a/src/config/wagmi.config.tsx +++ b/src/config/wagmi.config.tsx @@ -30,8 +30,8 @@ const projectId = process.env.NEXT_PUBLIC_WC_PROJECT_ID ?? '' // 2. Create wagmiConfig const metadata = { - name: 'Peanut Protocol', - description: 'Peanut protocol - send crypto with links', + name: 'Peanut', + description: 'Peanut - global instant money', url: process.env.NEXT_PUBLIC_BASE_URL || 'https://peanut.me', // origin must match your domain & subdomain icons: [`${process.env.NEXT_PUBLIC_BASE_URL}/favicon.ico`], } diff --git a/src/hooks/useBanners.tsx b/src/hooks/useBanners.tsx index 0307a6fd6..2691bcfd2 100644 --- a/src/hooks/useBanners.tsx +++ b/src/hooks/useBanners.tsx @@ -52,7 +52,7 @@ export const useBanners = () => { _banners.push({ id: 'kyc-banner', title: 'Unlock bank & local payments', - description: 'Complete verification to add, withdraw or pay using Mercado Pago.', + description: 'Complete verification to add, withdraw or pay using Banks, Mercado Pago, and more.', icon: 'shield', onClick: () => { router.push('/profile/identity-verification') diff --git a/src/lib/og/build-og-metadata.ts b/src/lib/og/build-og-metadata.ts index 0b288b5a1..586da3024 100644 --- a/src/lib/og/build-og-metadata.ts +++ b/src/lib/og/build-og-metadata.ts @@ -31,7 +31,7 @@ export function buildOgMetadata({ siteUrl, type, username, amount }: BuildArgs): return { title, description: - 'Peanut Protocol | Payment Infrastructure – Seamless payment infrastructure for sending and receiving digital assets.', + 'Peanut | Payment Infrastructure – Seamless payment infrastructure for sending and receiving digital assets.', openGraph: { title, description: 'Seamless payment infrastructure for sending and receiving digital assets.', diff --git a/src/utils/general.utils.ts b/src/utils/general.utils.ts index 79a411b48..fd72799e4 100644 --- a/src/utils/general.utils.ts +++ b/src/utils/general.utils.ts @@ -1070,7 +1070,7 @@ export function getChainName(chainId: string): string | undefined { } export const getHeaderTitle = (pathname: string) => { - return consts.pathTitles[pathname] || 'Peanut Protocol' // default title if path not found + return consts.pathTitles[pathname] || 'Peanut' // default title if path not found } /** diff --git a/tsconfig.json b/tsconfig.json index c598702ee..a10f070e6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,11 +9,12 @@ "noEmit": true, "esModuleInterop": true, "module": "esnext", - "moduleResolution": "node", + "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", "incremental": true, + "tsBuildInfoFile": ".next/.tsbuildinfo", "plugins": [ { "name": "next" @@ -23,7 +24,8 @@ "@/*": ["./src/*"], "@/animations/*": ["./src/assets/animations/*"] }, - "types": ["@serwist/next/typings", "jest"] + "types": ["@serwist/next/typings", "jest"], + "verbatimModuleSyntax": true }, "include": [ "next-env.d.ts", From a5951ca2f487a34193fcccf8ce4dcad68068500c Mon Sep 17 00:00:00 2001 From: Hugo Montenegro Date: Thu, 16 Oct 2025 02:14:03 -0300 Subject: [PATCH 2/5] test fixes --- jest.setup.ts | 7 +++++ package.json | 5 +++- src/utils/__mocks__/justaname.ts | 22 +++++++++++++++ src/utils/__mocks__/reown-appkit.ts | 43 +++++++++++++++++++++++++++++ src/utils/__mocks__/web-push.ts | 19 +++++++++++++ 5 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 src/utils/__mocks__/justaname.ts create mode 100644 src/utils/__mocks__/reown-appkit.ts create mode 100644 src/utils/__mocks__/web-push.ts diff --git a/jest.setup.ts b/jest.setup.ts index fb4a7aa97..ea8d35d82 100644 --- a/jest.setup.ts +++ b/jest.setup.ts @@ -7,6 +7,13 @@ global.TextDecoder = TextDecoder require('dotenv').config({ path: '.env.test' }) +// Setup minimal environment variables for tests +process.env.NEXT_PUBLIC_ALCHEMY_API_KEY = process.env.NEXT_PUBLIC_ALCHEMY_API_KEY || 'test-key' +process.env.NEXT_PUBLIC_INFURA_API_KEY = process.env.NEXT_PUBLIC_INFURA_API_KEY || 'test-key' +process.env.VAPID_PUBLIC_KEY = process.env.VAPID_PUBLIC_KEY || 'test-vapid-public' +process.env.VAPID_PRIVATE_KEY = process.env.VAPID_PRIVATE_KEY || 'test-vapid-private' +process.env.VAPID_SUBJECT = process.env.VAPID_SUBJECT || 'mailto:test@example.com' + // Add any global test setup here global.console = { ...console, diff --git a/package.json b/package.json index 6a032b606..c44daa271 100644 --- a/package.json +++ b/package.json @@ -137,13 +137,16 @@ ] }, "transformIgnorePatterns": [ - "node_modules/(?!(@wagmi|wagmi|viem|@viem|@squirrel-labs)/)" + "node_modules/(?!(@wagmi|wagmi|viem|@viem|@squirrel-labs|@reown|@walletconnect|@justaname\\.id|@zerodev)/)" ], "moduleNameMapper": { "\\.(svg|png|jpg|jpeg|gif)$": "jest-transform-stub", "^@/(.*)$": "/src/$1", "^wagmi/chains$": "/src/utils/__mocks__/wagmi.ts", "^@squirrel-labs/peanut-sdk$": "/src/utils/__mocks__/peanut-sdk.ts", + "^@reown/appkit/react$": "/src/utils/__mocks__/reown-appkit.ts", + "^@justaname\\.id/react$": "/src/utils/__mocks__/justaname.ts", + "^web-push$": "/src/utils/__mocks__/web-push.ts", "^next/cache$": "/src/utils/__mocks__/next-cache.ts" }, "setupFilesAfterEnv": [ diff --git a/src/utils/__mocks__/justaname.ts b/src/utils/__mocks__/justaname.ts new file mode 100644 index 000000000..185a8b526 --- /dev/null +++ b/src/utils/__mocks__/justaname.ts @@ -0,0 +1,22 @@ +/** + * Mock for @justaname.id/react + * Used in Jest tests to avoid ESM import issues + */ + +export const usePrimaryName = jest.fn(() => ({ + primaryName: undefined, + isLoading: false, + error: null, +})) + +export const useRecords = jest.fn(() => ({ + records: {}, + isLoading: false, + error: null, +})) + +export const useAddresses = jest.fn(() => ({ + addresses: [], + isLoading: false, + error: null, +})) diff --git a/src/utils/__mocks__/reown-appkit.ts b/src/utils/__mocks__/reown-appkit.ts new file mode 100644 index 000000000..835fb6280 --- /dev/null +++ b/src/utils/__mocks__/reown-appkit.ts @@ -0,0 +1,43 @@ +/** + * Mock for @reown/appkit/react + * Used in Jest tests to avoid ESM import issues + */ + +export const useAppKit = jest.fn(() => ({ + open: jest.fn(), + close: jest.fn(), +})) + +export const useAppKitTheme = jest.fn(() => ({ + themeMode: 'light', + themeVariables: {}, + setThemeMode: jest.fn(), + setThemeVariables: jest.fn(), +})) + +export const useAppKitState = jest.fn(() => ({ + open: false, + selectedNetworkId: undefined, +})) + +export const useAppKitAccount = jest.fn(() => ({ + address: undefined, + isConnected: false, + caipAddress: undefined, + status: 'disconnected', +})) + +export const useAppKitNetwork = jest.fn(() => ({ + chainId: undefined, + caipNetworkId: undefined, + switchNetwork: jest.fn(), +})) + +export const useDisconnect = jest.fn(() => ({ + disconnect: jest.fn(), +})) + +export const useAppKitProvider = jest.fn(() => ({ + walletProvider: undefined, + walletProviderType: undefined, +})) diff --git a/src/utils/__mocks__/web-push.ts b/src/utils/__mocks__/web-push.ts new file mode 100644 index 000000000..b0c44b7a0 --- /dev/null +++ b/src/utils/__mocks__/web-push.ts @@ -0,0 +1,19 @@ +/** + * Mock for web-push + * Used in Jest tests to avoid VAPID key validation issues + */ + +export const setVapidDetails = jest.fn() +export const sendNotification = jest.fn(() => Promise.resolve()) +export const generateVAPIDKeys = jest.fn(() => ({ + publicKey: 'mock-public-key', + privateKey: 'mock-private-key', +})) + +const webpush = { + setVapidDetails, + sendNotification, + generateVAPIDKeys, +} + +export default webpush From dad7a083c4134496b8c15733b1d61e8175a8569b Mon Sep 17 00:00:00 2001 From: Hugo Montenegro Date: Thu, 16 Oct 2025 02:30:11 -0300 Subject: [PATCH 3/5] lol. --- fix-type-imports.js | 1 + .../add-money/[country]/[regional-method]/page.tsx | 2 +- .../(mobile-ui)/add-money/[country]/bank/page.tsx | 2 +- src/app/(mobile-ui)/add-money/crypto/page.tsx | 6 +++--- src/app/(mobile-ui)/claim/page.tsx | 2 +- src/app/(mobile-ui)/history/page.tsx | 2 +- src/app/(mobile-ui)/home/page.tsx | 2 +- src/app/(mobile-ui)/notifications/page.tsx | 2 +- src/app/(mobile-ui)/points/invites/page.tsx | 2 +- src/app/(mobile-ui)/points/page.tsx | 3 +-- src/app/(mobile-ui)/recover-funds/page.tsx | 6 +++--- src/app/(mobile-ui)/request/pay/page.tsx | 2 +- .../(mobile-ui)/withdraw/[country]/bank/page.tsx | 2 +- src/app/(mobile-ui)/withdraw/crypto/page.tsx | 14 +++++++------- src/app/(mobile-ui)/withdraw/manteca/page.tsx | 2 +- src/app/(setup)/setup/page.tsx | 2 +- src/app/[...recipient]/client.tsx | 10 +++++----- src/app/actions/external-accounts.ts | 4 ++-- src/app/actions/offramp.ts | 2 +- src/app/actions/onramp.ts | 2 +- src/app/actions/tokens.ts | 2 +- src/app/actions/users.ts | 6 +++--- src/app/api/og/route.tsx | 2 +- src/app/api/peanut/user/update-user/route.ts | 2 +- src/app/invite/page.tsx | 2 +- src/app/layout.tsx | 2 +- src/app/metadata.ts | 2 +- src/app/receipt/[entryId]/page.tsx | 4 ++-- src/app/request/[...username]/layout.tsx | 2 +- src/app/send/[...username]/layout.tsx | 2 +- src/app/send/[...username]/page.tsx | 2 +- src/app/sitemap.ts | 2 +- src/components/0_Bruddle/Button.tsx | 2 +- src/components/0_Bruddle/PageContainer.tsx | 2 +- .../AddMoney/components/AddMoneyBankDetails.tsx | 4 ++-- .../AddMoney/components/CryptoMethodDrawer.tsx | 2 +- .../AddMoney/components/CryptoSourceListCard.tsx | 4 ++-- .../AddMoney/components/DepositMethodList.tsx | 2 +- .../AddMoney/components/MantecaAddMoney.tsx | 6 +++--- .../components/MantecaDepositShareDetails.tsx | 2 +- src/components/AddMoney/consts/index.ts | 4 ++-- .../AddMoney/views/CryptoDepositQR.view.tsx | 2 +- .../AddMoney/views/NetworkSelection.view.tsx | 2 +- .../AddMoney/views/TokenSelection.view.tsx | 2 +- .../AddWithdraw/AddWithdrawCountriesList.tsx | 14 +++++++------- .../AddWithdraw/AddWithdrawRouterView.tsx | 8 ++++---- .../AddWithdraw/DynamicBankAccountForm.tsx | 4 ++-- src/components/Claim/Claim.consts.ts | 4 ++-- src/components/Claim/Claim.tsx | 4 ++-- src/components/Claim/Generic/Claimed.view.tsx | 2 +- src/components/Claim/Link/FlowManager.tsx | 4 ++-- src/components/Claim/Link/Initial.view.tsx | 4 ++-- src/components/Claim/Link/MantecaFlowManager.tsx | 6 +++--- src/components/Claim/Link/Onchain/Confirm.view.tsx | 2 +- .../Claim/Link/views/BankFlowManager.view.tsx | 12 ++++++------ .../Claim/Link/views/Confirm.bank-claim.view.tsx | 4 ++-- .../Claim/Link/views/MantecaDetailsStep.view.tsx | 2 +- .../Claim/Link/views/MantecaReviewStep.tsx | 4 ++-- src/components/Common/ActionList.tsx | 6 +++--- src/components/Common/ActionListDaimoPayButton.tsx | 2 +- src/components/Common/CountryList.tsx | 2 +- src/components/Common/CountryListRouter.tsx | 10 +++++----- src/components/Common/SavedAccountsView.tsx | 2 +- src/components/Create/Create.utils.ts | 2 +- src/components/ExchangeRate/index.tsx | 2 +- src/components/Global/ActionModal/index.tsx | 4 ++-- src/components/Global/ChainSelector/index.tsx | 2 +- src/components/Global/ConfirmInviteModal/index.tsx | 2 +- src/components/Global/CopyField/index.tsx | 2 +- src/components/Global/CopyToClipboard/index.tsx | 2 +- src/components/Global/DaimoPayButton/index.tsx | 2 +- src/components/Global/DirectSendQR/index.tsx | 2 +- src/components/Global/EmptyStates/EmptyState.tsx | 2 +- src/components/Global/ExchangeRateWidget/index.tsx | 4 ++-- src/components/Global/FlowHeader/index.tsx | 2 +- .../Global/GeneralRecipientInput/index.tsx | 2 +- src/components/Global/IOSInstallPWAModal/index.tsx | 2 +- src/components/Global/Icons/Icon.tsx | 2 +- src/components/Global/Icons/Info.tsx | 2 +- src/components/Global/Icons/achievements.tsx | 2 +- src/components/Global/Icons/alert.tsx | 2 +- src/components/Global/Icons/arrow-down-left.tsx | 2 +- src/components/Global/Icons/arrow-down.tsx | 2 +- src/components/Global/Icons/arrow-up-right.tsx | 2 +- src/components/Global/Icons/arrow-up.tsx | 2 +- src/components/Global/Icons/badge.tsx | 2 +- src/components/Global/Icons/bank.tsx | 2 +- src/components/Global/Icons/bell.tsx | 2 +- src/components/Global/Icons/camera.tsx | 2 +- src/components/Global/Icons/cancel.tsx | 2 +- src/components/Global/Icons/check-circle.tsx | 2 +- src/components/Global/Icons/check.tsx | 2 +- src/components/Global/Icons/chevron-down.tsx | 2 +- src/components/Global/Icons/chevron-up.tsx | 2 +- src/components/Global/Icons/clip.tsx | 2 +- src/components/Global/Icons/clock.tsx | 2 +- src/components/Global/Icons/copy.tsx | 2 +- src/components/Global/Icons/currency.tsx | 2 +- src/components/Global/Icons/docs.tsx | 2 +- src/components/Global/Icons/dollar.tsx | 2 +- src/components/Global/Icons/double-check.tsx | 2 +- src/components/Global/Icons/download.tsx | 2 +- src/components/Global/Icons/error.tsx | 2 +- src/components/Global/Icons/exchange-arrows.tsx | 2 +- src/components/Global/Icons/exchange.tsx | 2 +- src/components/Global/Icons/external-link.tsx | 2 +- src/components/Global/Icons/eye-slash.tsx | 2 +- src/components/Global/Icons/eye.tsx | 2 +- src/components/Global/Icons/failed.tsx | 2 +- src/components/Global/Icons/fees.tsx | 2 +- src/components/Global/Icons/gift.tsx | 2 +- src/components/Global/Icons/history.tsx | 2 +- src/components/Global/Icons/home.tsx | 2 +- src/components/Global/Icons/invite-heart.tsx | 2 +- src/components/Global/Icons/link-slash.tsx | 2 +- src/components/Global/Icons/link.tsx | 2 +- src/components/Global/Icons/lock.tsx | 2 +- src/components/Global/Icons/logout.tsx | 2 +- src/components/Global/Icons/mobile-install.tsx | 2 +- src/components/Global/Icons/paper-clip.tsx | 2 +- src/components/Global/Icons/peanut-support.tsx | 2 +- src/components/Global/Icons/pending.tsx | 2 +- src/components/Global/Icons/plus.tsx | 2 +- src/components/Global/Icons/processing.tsx | 2 +- src/components/Global/Icons/qr-code.tsx | 2 +- src/components/Global/Icons/question-mark.tsx | 2 +- src/components/Global/Icons/retry.tsx | 2 +- src/components/Global/Icons/search.tsx | 2 +- src/components/Global/Icons/share.tsx | 2 +- src/components/Global/Icons/shield.tsx | 2 +- src/components/Global/Icons/smile.tsx | 2 +- src/components/Global/Icons/star.tsx | 2 +- src/components/Global/Icons/success.tsx | 2 +- src/components/Global/Icons/switch.tsx | 2 +- src/components/Global/Icons/trophy.tsx | 2 +- src/components/Global/Icons/txn-off.tsx | 2 +- src/components/Global/Icons/user-id.tsx | 2 +- src/components/Global/Icons/user-plus.tsx | 2 +- src/components/Global/Icons/user.tsx | 2 +- src/components/Global/Icons/wallet-cancel.tsx | 2 +- src/components/Global/Icons/wallet-outline.tsx | 2 +- src/components/Global/Icons/wallet.tsx | 2 +- src/components/Global/IframeWrapper/index.tsx | 4 ++-- src/components/Global/Image/index.tsx | 2 +- src/components/Global/MantecaDetailsCard/index.tsx | 4 ++-- src/components/Global/NavHeader/index.tsx | 2 +- src/components/Global/NoMoreJailModal/index.tsx | 2 +- .../Global/PeanutActionDetailsCard/index.tsx | 6 +++--- .../Global/PostSignupActionManager/index.tsx | 2 +- .../post-signup-action.consts.ts | 2 +- src/components/Global/RewardsModal/index.tsx | 2 +- src/components/Global/StatusPill/index.tsx | 4 ++-- .../SuccessViewDetailsCard.tsx | 2 +- .../TokenAndNetworkConfirmationModal/index.tsx | 4 ++-- .../TokenSelector/Components/NetworkListView.tsx | 2 +- .../TokenSelector/Components/ScrollableList.tsx | 2 +- .../TokenSelector/Components/TokenListItem.tsx | 4 ++-- .../Global/TokenSelector/TokenSelector.tsx | 6 +++--- src/components/Global/USBankAccountInput/index.tsx | 2 +- .../Global/UnsupportedBrowserModal/index.tsx | 4 ++-- src/components/Global/ValidatedInput/index.tsx | 2 +- src/components/Global/WalletNavigation/index.tsx | 2 +- src/components/Home/AddMoneyPromptModal/index.tsx | 2 +- src/components/Home/HomeBanners/BannerCard.tsx | 2 +- src/components/Home/HomeBanners/index.tsx | 2 +- src/components/Home/HomeHistory.tsx | 6 +++--- .../Home/ReferralCampaignModal/index.tsx | 2 +- src/components/Kyc/InitiateBridgeKYCModal.tsx | 2 +- src/components/Kyc/InitiateMantecaKYCModal.tsx | 4 ++-- src/components/Kyc/KycFlow.tsx | 2 +- src/components/Kyc/KycStatusDrawer.tsx | 6 +++--- src/components/Kyc/KycStatusItem.tsx | 10 +++++----- .../Kyc/KycVerificationInProgressModal.tsx | 2 +- src/components/LandingPage/faq.tsx | 2 +- src/components/Payment/PaymentForm/index.tsx | 8 ++++---- .../Payment/Views/Confirm.payment.view.tsx | 2 +- .../Payment/Views/Initial.payment.view.tsx | 2 +- .../Payment/Views/MantecaFulfillment.view.tsx | 2 +- .../Payment/Views/Status.payment.view.tsx | 10 +++++----- src/components/Profile/AvatarWithBadge.tsx | 4 ++-- .../Profile/components/ProfileMenuItem.tsx | 4 ++-- .../Profile/views/IdentityVerification.view.tsx | 2 +- .../views/Initial.direct.request.view.tsx | 6 +++--- .../link/views/Create.request.link.view.tsx | 4 ++-- .../Request/views/ExternalWalletFulfilManager.tsx | 2 +- .../Request/views/ExternalWalletFulfilMethods.tsx | 4 ++-- .../Request/views/ReqFulfillBankFlowManager.tsx | 4 ++-- src/components/SearchUsers/SearchResultCard.tsx | 2 +- src/components/SearchUsers/SearchResults.tsx | 2 +- src/components/Setup/Views/InstallPWA.tsx | 2 +- src/components/Setup/components/SetupWrapper.tsx | 4 ++-- src/components/Setup/context/SetupFlowContext.tsx | 4 ++-- src/components/Tooltip/index.tsx | 2 +- .../TransactionDetails/TransactionAvatarBadge.tsx | 8 ++++---- .../TransactionDetails/TransactionCard.tsx | 12 ++++++------ .../TransactionDetailsDrawer.tsx | 2 +- .../TransactionDetailsHeaderCard.tsx | 6 +++--- .../TransactionDetailsReceipt.tsx | 4 ++-- .../TransactionDetails/transactionTransformer.ts | 12 ++++++------ src/components/User/UserCard.tsx | 6 +++--- .../Withdraw/views/Confirm.withdraw.view.tsx | 2 +- .../Withdraw/views/Initial.withdraw.view.tsx | 4 ++-- src/components/og/PaymentCardOG.tsx | 2 +- src/components/og/ReceiptCardOG.tsx | 2 +- src/config/wagmi.config.tsx | 2 +- src/context/ClaimBankFlowContext.tsx | 12 ++++++------ src/context/OnrampFlowContext.tsx | 2 +- src/context/RequestFulfillmentFlowContext.tsx | 8 ++++---- src/context/SupportModalContext.tsx | 2 +- src/context/WithdrawFlowContext.tsx | 4 ++-- src/context/authContext.tsx | 2 +- src/context/footerVisibility.tsx | 2 +- src/context/kernelClient.context.tsx | 6 +++--- src/hooks/query/user.ts | 2 +- src/hooks/useBanners.tsx | 2 +- src/hooks/useBridgeKycFlow.ts | 8 ++++---- src/hooks/useCarouselDotButton.ts | 2 +- src/hooks/useCreateOnramp.ts | 2 +- src/hooks/useMantecaKycFlow.ts | 2 +- src/hooks/usePaymentInitiator.ts | 14 +++++++------- src/hooks/useRecentUsers.ts | 4 ++-- src/hooks/useSetupFlow.ts | 2 +- src/hooks/useTransactionDetailsDrawer.ts | 2 +- src/hooks/useUserByUsername.ts | 2 +- src/hooks/useUserSearch.ts | 2 +- src/hooks/useWebSocket.ts | 2 +- src/interfaces/interfaces.ts | 2 +- src/lib/url-parser/parser.ts | 2 +- src/lib/url-parser/types/payment.ts | 2 +- src/lib/validation/recipient.ts | 2 +- src/redux/hooks.ts | 4 ++-- src/redux/slices/bank-form-slice.ts | 6 +++--- src/redux/slices/payment-slice.ts | 10 +++++----- src/redux/slices/send-flow-slice.ts | 12 ++++++------ src/redux/slices/setup-slice.ts | 6 +++--- src/redux/slices/user-slice.ts | 6 +++--- src/redux/slices/wallet-slice.ts | 4 ++-- src/redux/slices/zerodev-slice.ts | 4 ++-- src/redux/types/bank-form.types.ts | 2 +- src/redux/types/payment.types.ts | 6 +++--- src/redux/types/setup.types.ts | 2 +- src/redux/types/user.types.ts | 2 +- src/services/charges.ts | 2 +- src/services/invites.ts | 2 +- src/services/manteca.ts | 8 ++++---- src/services/points.ts | 2 +- src/services/requests.ts | 2 +- src/services/rewards.ts | 2 +- src/services/services.types.ts | 2 +- src/services/users.ts | 6 +++--- src/services/websocket.ts | 2 +- src/utils/balance.utils.ts | 2 +- src/utils/bridge.utils.ts | 4 ++-- src/utils/history.utils.ts | 4 ++-- src/utils/metrics.utils.ts | 2 +- src/utils/sentry.utils.ts | 2 +- 256 files changed, 412 insertions(+), 412 deletions(-) create mode 100644 fix-type-imports.js diff --git a/fix-type-imports.js b/fix-type-imports.js new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/fix-type-imports.js @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/(mobile-ui)/add-money/[country]/[regional-method]/page.tsx b/src/app/(mobile-ui)/add-money/[country]/[regional-method]/page.tsx index d7d070ebc..448cbb6e3 100644 --- a/src/app/(mobile-ui)/add-money/[country]/[regional-method]/page.tsx +++ b/src/app/(mobile-ui)/add-money/[country]/[regional-method]/page.tsx @@ -1,6 +1,6 @@ 'use client' import MantecaAddMoney from '@/components/AddMoney/components/MantecaAddMoney' -import { CountryData, countryData } from '@/components/AddMoney/consts' +import { type CountryData, countryData } from '@/components/AddMoney/consts' import { MantecaSupportedExchanges } from '@/components/AddMoney/consts' import { useParams } from 'next/navigation' diff --git a/src/app/(mobile-ui)/add-money/[country]/bank/page.tsx b/src/app/(mobile-ui)/add-money/[country]/bank/page.tsx index 655eaf931..008c88951 100644 --- a/src/app/(mobile-ui)/add-money/[country]/bank/page.tsx +++ b/src/app/(mobile-ui)/add-money/[country]/bank/page.tsx @@ -9,7 +9,7 @@ import { useOnrampFlow } from '@/context/OnrampFlowContext' import { useWallet } from '@/hooks/wallet/useWallet' import { formatAmount } from '@/utils' import { countryData } from '@/components/AddMoney/consts' -import { BridgeKycStatus } from '@/utils/bridge-accounts.utils' +import { type BridgeKycStatus } from '@/utils/bridge-accounts.utils' import { useWebSocket } from '@/hooks/useWebSocket' import { useAuth } from '@/context/authContext' import { useCreateOnramp } from '@/hooks/useCreateOnramp' diff --git a/src/app/(mobile-ui)/add-money/crypto/page.tsx b/src/app/(mobile-ui)/add-money/crypto/page.tsx index 3bb0b3e9b..a48c05905 100644 --- a/src/app/(mobile-ui)/add-money/crypto/page.tsx +++ b/src/app/(mobile-ui)/add-money/crypto/page.tsx @@ -4,12 +4,12 @@ import { CryptoSourceListCard } from '@/components/AddMoney/components/CryptoSou import { CRYPTO_EXCHANGES, CRYPTO_WALLETS, - CryptoSource, - CryptoToken, + type CryptoSource, + type CryptoToken, DEPOSIT_CRYPTO_TOKENS, } from '@/components/AddMoney/consts' import { CryptoDepositQR } from '@/components/AddMoney/views/CryptoDepositQR.view' -import NetworkSelectionView, { SelectedNetwork } from '@/components/AddMoney/views/NetworkSelection.view' +import NetworkSelectionView, { type SelectedNetwork } from '@/components/AddMoney/views/NetworkSelection.view' import TokenSelectionView from '@/components/AddMoney/views/TokenSelection.view' import NavHeader from '@/components/Global/NavHeader' import PeanutLoading from '@/components/Global/PeanutLoading' diff --git a/src/app/(mobile-ui)/claim/page.tsx b/src/app/(mobile-ui)/claim/page.tsx index ddfe5dacc..58ac16685 100644 --- a/src/app/(mobile-ui)/claim/page.tsx +++ b/src/app/(mobile-ui)/claim/page.tsx @@ -2,7 +2,7 @@ import { getLinkDetails } from '@/app/actions/claimLinks' import { Claim } from '@/components' import { BASE_URL } from '@/constants' import { formatAmount, resolveAddressToUsername } from '@/utils' -import { Metadata } from 'next' +import { type Metadata } from 'next' import getOrigin from '@/lib/hosting/get-origin' export const dynamic = 'force-dynamic' diff --git a/src/app/(mobile-ui)/history/page.tsx b/src/app/(mobile-ui)/history/page.tsx index a4ebca5ad..4b0c521a1 100644 --- a/src/app/(mobile-ui)/history/page.tsx +++ b/src/app/(mobile-ui)/history/page.tsx @@ -1,6 +1,6 @@ 'use client' -import { CardPosition } from '@/components/Global/Card' +import { type CardPosition } from '@/components/Global/Card' import EmptyState from '@/components/Global/EmptyStates/EmptyState' import NoDataEmptyState from '@/components/Global/EmptyStates/NoDataEmptyState' import NavHeader from '@/components/Global/NavHeader' diff --git a/src/app/(mobile-ui)/home/page.tsx b/src/app/(mobile-ui)/home/page.tsx index 31bc7f688..7d03bb6ea 100644 --- a/src/app/(mobile-ui)/home/page.tsx +++ b/src/app/(mobile-ui)/home/page.tsx @@ -1,6 +1,6 @@ 'use client' -import { Button, ButtonSize, ButtonVariant } from '@/components/0_Bruddle' +import { Button, type ButtonSize, type ButtonVariant } from '@/components/0_Bruddle' import PageContainer from '@/components/0_Bruddle/PageContainer' import { Icon } from '@/components/Global/Icons/Icon' import IOSInstallPWAModal from '@/components/Global/IOSInstallPWAModal' diff --git a/src/app/(mobile-ui)/notifications/page.tsx b/src/app/(mobile-ui)/notifications/page.tsx index 7cd3641a9..d82a15962 100644 --- a/src/app/(mobile-ui)/notifications/page.tsx +++ b/src/app/(mobile-ui)/notifications/page.tsx @@ -1,7 +1,7 @@ 'use client' import PageContainer from '@/components/0_Bruddle/PageContainer' -import Card, { CardPosition } from '@/components/Global/Card' +import Card, { type CardPosition } from '@/components/Global/Card' import NavHeader from '@/components/Global/NavHeader' import PeanutLoading from '@/components/Global/PeanutLoading' import { notificationsApi, type InAppItem } from '@/services/notifications' diff --git a/src/app/(mobile-ui)/points/invites/page.tsx b/src/app/(mobile-ui)/points/invites/page.tsx index 46bc849ec..146fe49af 100644 --- a/src/app/(mobile-ui)/points/invites/page.tsx +++ b/src/app/(mobile-ui)/points/invites/page.tsx @@ -14,7 +14,7 @@ import { STAR_STRAIGHT_ICON } from '@/assets' import Image from 'next/image' import EmptyState from '@/components/Global/EmptyStates/EmptyState' import { getInitialsFromName } from '@/utils' -import { PointsInvite } from '@/services/services.types' +import { type PointsInvite } from '@/services/services.types' const InvitesPage = () => { const router = useRouter() diff --git a/src/app/(mobile-ui)/points/page.tsx b/src/app/(mobile-ui)/points/page.tsx index 1b96ad84a..f3ccb818e 100644 --- a/src/app/(mobile-ui)/points/page.tsx +++ b/src/app/(mobile-ui)/points/page.tsx @@ -12,7 +12,6 @@ import TransactionAvatarBadge from '@/components/TransactionDetails/TransactionA import { VerifiedUserLabel } from '@/components/UserHeader' import { useAuth } from '@/context/authContext' import { invitesApi } from '@/services/invites' -import { Invite } from '@/services/services.types' import { generateInvitesShareText } from '@/utils' import { useQuery } from '@tanstack/react-query' import { useRouter } from 'next/navigation' @@ -21,7 +20,7 @@ import Image from 'next/image' import { pointsApi } from '@/services/points' import EmptyState from '@/components/Global/EmptyStates/EmptyState' import { getInitialsFromName } from '@/utils' -import { PointsInvite } from '@/services/services.types' +import { type PointsInvite } from '@/services/services.types' import { useEffect } from 'react' const PointsPage = () => { diff --git a/src/app/(mobile-ui)/recover-funds/page.tsx b/src/app/(mobile-ui)/recover-funds/page.tsx index f5479ca0a..944280447 100644 --- a/src/app/(mobile-ui)/recover-funds/page.tsx +++ b/src/app/(mobile-ui)/recover-funds/page.tsx @@ -3,14 +3,14 @@ import NavHeader from '@/components/Global/NavHeader' import ScrollableList from '@/components/Global/TokenSelector/Components/ScrollableList' import TokenListItem from '@/components/Global/TokenSelector/Components/TokenListItem' -import { IUserBalance } from '@/interfaces' +import { type IUserBalance } from '@/interfaces' import { useState, useEffect, useMemo, useCallback, useContext } from 'react' import { useWallet } from '@/hooks/wallet/useWallet' import { fetchWalletBalances } from '@/app/actions/tokens' import { PEANUT_WALLET_CHAIN, PEANUT_WALLET_TOKEN } from '@/constants' import { areEvmAddressesEqual, isTxReverted, getExplorerUrl } from '@/utils' -import { RecipientState } from '@/context/WithdrawFlowContext' -import GeneralRecipientInput, { GeneralRecipientUpdate } from '@/components/Global/GeneralRecipientInput' +import { type RecipientState } from '@/context/WithdrawFlowContext' +import GeneralRecipientInput, { type GeneralRecipientUpdate } from '@/components/Global/GeneralRecipientInput' import { Button } from '@/components/0_Bruddle' import ErrorAlert from '@/components/Global/ErrorAlert' import Card from '@/components/Global/Card' diff --git a/src/app/(mobile-ui)/request/pay/page.tsx b/src/app/(mobile-ui)/request/pay/page.tsx index 531c60630..d2adc3f10 100644 --- a/src/app/(mobile-ui)/request/pay/page.tsx +++ b/src/app/(mobile-ui)/request/pay/page.tsx @@ -1,7 +1,7 @@ import { PayRequestLink } from '@/components/Request/Pay/Pay' import { chargesApi } from '@/services/charges' import { formatAmount, printableAddress } from '@/utils' -import { Metadata } from 'next' +import { type Metadata } from 'next' export const dynamic = 'force-dynamic' diff --git a/src/app/(mobile-ui)/withdraw/[country]/bank/page.tsx b/src/app/(mobile-ui)/withdraw/[country]/bank/page.tsx index 443705785..30023a41f 100644 --- a/src/app/(mobile-ui)/withdraw/[country]/bank/page.tsx +++ b/src/app/(mobile-ui)/withdraw/[country]/bank/page.tsx @@ -10,7 +10,7 @@ import { PaymentInfoRow } from '@/components/Payment/PaymentInfoRow' import { PEANUT_WALLET_CHAIN, PEANUT_WALLET_TOKEN_SYMBOL } from '@/constants' import { useWithdrawFlow } from '@/context/WithdrawFlowContext' import { useWallet } from '@/hooks/wallet/useWallet' -import { AccountType, Account } from '@/interfaces' +import { AccountType, type Account } from '@/interfaces' import { formatIban, shortenStringLong, isTxReverted } from '@/utils/general.utils' import { useParams, useRouter } from 'next/navigation' import { useEffect, useMemo, useState } from 'react' diff --git a/src/app/(mobile-ui)/withdraw/crypto/page.tsx b/src/app/(mobile-ui)/withdraw/crypto/page.tsx index a43b13417..96de2e37d 100644 --- a/src/app/(mobile-ui)/withdraw/crypto/page.tsx +++ b/src/app/(mobile-ui)/withdraw/crypto/page.tsx @@ -6,19 +6,19 @@ import PeanutLoading from '@/components/Global/PeanutLoading' import DirectSuccessView from '@/components/Payment/Views/Status.payment.view' import ConfirmWithdrawView from '@/components/Withdraw/views/Confirm.withdraw.view' import InitialWithdrawView from '@/components/Withdraw/views/Initial.withdraw.view' -import { useWithdrawFlow, WithdrawData } from '@/context/WithdrawFlowContext' -import { InitiatePaymentPayload, usePaymentInitiator } from '@/hooks/usePaymentInitiator' +import { useWithdrawFlow, type WithdrawData } from '@/context/WithdrawFlowContext' +import { type InitiatePaymentPayload, usePaymentInitiator } from '@/hooks/usePaymentInitiator' import { useWallet } from '@/hooks/wallet/useWallet' import { useAppDispatch, usePaymentStore } from '@/redux/hooks' import { paymentActions } from '@/redux/slices/payment-slice' import { chargesApi } from '@/services/charges' import { requestsApi } from '@/services/requests' import { - CreateChargeRequest, - CreateRequestRequest as CreateRequestPayloadServices, - TCharge, - TRequestChargeResponse, - TRequestResponse, + type CreateChargeRequest, + type CreateRequestRequest as CreateRequestPayloadServices, + type TCharge, + type TRequestChargeResponse, + type TRequestResponse, } from '@/services/services.types' import { NATIVE_TOKEN_ADDRESS } from '@/utils/token.utils' import { interfaces as peanutInterfaces } from '@squirrel-labs/peanut-sdk' diff --git a/src/app/(mobile-ui)/withdraw/manteca/page.tsx b/src/app/(mobile-ui)/withdraw/manteca/page.tsx index 5ac86bd98..665be99f7 100644 --- a/src/app/(mobile-ui)/withdraw/manteca/page.tsx +++ b/src/app/(mobile-ui)/withdraw/manteca/page.tsx @@ -31,7 +31,7 @@ import { useSupportModalContext } from '@/context/SupportModalContext' import { MantecaAccountType, MANTECA_COUNTRIES_CONFIG, - MantecaBankCode, + type MantecaBankCode, MANTECA_DEPOSIT_ADDRESS, TRANSACTIONS, } from '@/constants' diff --git a/src/app/(setup)/setup/page.tsx b/src/app/(setup)/setup/page.tsx index 71443935c..a3c767c9b 100644 --- a/src/app/(setup)/setup/page.tsx +++ b/src/app/(setup)/setup/page.tsx @@ -2,7 +2,7 @@ import PeanutLoading from '@/components/Global/PeanutLoading' import { SetupWrapper } from '@/components/Setup/components/SetupWrapper' -import { BeforeInstallPromptEvent, ScreenId, ISetupStep } from '@/components/Setup/Setup.types' +import { type BeforeInstallPromptEvent, type ScreenId, type ISetupStep } from '@/components/Setup/Setup.types' import { useSetupFlow } from '@/hooks/useSetupFlow' import { useAppDispatch, useSetupStore } from '@/redux/hooks' import { setupActions } from '@/redux/slices/setup-slice' diff --git a/src/app/[...recipient]/client.tsx b/src/app/[...recipient]/client.tsx index cc71ed87a..d1055ea25 100644 --- a/src/app/[...recipient]/client.tsx +++ b/src/app/[...recipient]/client.tsx @@ -1,21 +1,21 @@ 'use client' -import { StatusType } from '@/components/Global/Badges/StatusBadge' +import { type StatusType } from '@/components/Global/Badges/StatusBadge' import PeanutLoading from '@/components/Global/PeanutLoading' import ConfirmPaymentView from '@/components/Payment/Views/Confirm.payment.view' -import ValidationErrorView, { ValidationErrorViewProps } from '@/components/Payment/Views/Error.validation.view' +import ValidationErrorView, { type ValidationErrorViewProps } from '@/components/Payment/Views/Error.validation.view' import InitialPaymentView from '@/components/Payment/Views/Initial.payment.view' import DirectSuccessView from '@/components/Payment/Views/Status.payment.view' import PublicProfile from '@/components/Profile/components/PublicProfile' import { TransactionDetailsReceipt } from '@/components/TransactionDetails/TransactionDetailsReceipt' -import { TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' +import { type TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' import { useAuth } from '@/context/authContext' import { useCurrency } from '@/hooks/useCurrency' import { useTransactionDetailsDrawer } from '@/hooks/useTransactionDetailsDrawer' import { EHistoryEntryType, EHistoryUserRole } from '@/hooks/useTransactionHistory' import { useUserInteractions } from '@/hooks/useUserInteractions' -import { EParseUrlError, parsePaymentURL, ParseUrlError } from '@/lib/url-parser/parser' -import { ParsedURL } from '@/lib/url-parser/types/payment' +import { EParseUrlError, parsePaymentURL, type ParseUrlError } from '@/lib/url-parser/parser' +import { type ParsedURL } from '@/lib/url-parser/types/payment' import { useAppDispatch, usePaymentStore } from '@/redux/hooks' import { paymentActions } from '@/redux/slices/payment-slice' import { chargesApi } from '@/services/charges' diff --git a/src/app/actions/external-accounts.ts b/src/app/actions/external-accounts.ts index 3ea368f88..c210a6f30 100644 --- a/src/app/actions/external-accounts.ts +++ b/src/app/actions/external-accounts.ts @@ -1,8 +1,8 @@ 'use server' import { fetchWithSentry } from '@/utils' -import { AddBankAccountPayload } from './types/users.types' -import { IBridgeAccount } from '@/interfaces' +import { type AddBankAccountPayload } from './types/users.types' +import { type IBridgeAccount } from '@/interfaces' const API_KEY = process.env.PEANUT_API_KEY! const API_URL = process.env.PEANUT_API_URL! diff --git a/src/app/actions/offramp.ts b/src/app/actions/offramp.ts index e34958716..ed81a42b0 100644 --- a/src/app/actions/offramp.ts +++ b/src/app/actions/offramp.ts @@ -1,7 +1,7 @@ 'use server' import { cookies } from 'next/headers' -import { TCreateOfframpRequest } from '../../services/services.types' +import { type TCreateOfframpRequest } from '../../services/services.types' import { fetchWithSentry } from '@/utils' const API_KEY = process.env.PEANUT_API_KEY! diff --git a/src/app/actions/onramp.ts b/src/app/actions/onramp.ts index 053e3f2e3..5c28ffab8 100644 --- a/src/app/actions/onramp.ts +++ b/src/app/actions/onramp.ts @@ -2,7 +2,7 @@ import { cookies } from 'next/headers' import { fetchWithSentry } from '@/utils' -import { CountryData } from '@/components/AddMoney/consts' +import { type CountryData } from '@/components/AddMoney/consts' import { getCurrencyConfig } from '@/utils/bridge.utils' import { getCurrencyPrice } from '@/app/actions/currency' diff --git a/src/app/actions/tokens.ts b/src/app/actions/tokens.ts index d7c1678d1..90f51b0fe 100644 --- a/src/app/actions/tokens.ts +++ b/src/app/actions/tokens.ts @@ -6,7 +6,7 @@ import { parseAbi, formatUnits } from 'viem' import { type ChainId, getPublicClient } from '@/app/actions/clients' import type { Address, Hex } from 'viem' import { getTokenDetails, isStableCoin, areEvmAddressesEqual, NATIVE_TOKEN_ADDRESS } from '@/utils' -import { IUserBalance } from '@/interfaces' +import { type IUserBalance } from '@/interfaces' type IMobulaMarketData = { id: number diff --git a/src/app/actions/users.ts b/src/app/actions/users.ts index 13a2f0ca5..01254e54d 100644 --- a/src/app/actions/users.ts +++ b/src/app/actions/users.ts @@ -1,11 +1,11 @@ 'use server' import { PEANUT_API_URL } from '@/constants' -import { ApiUser } from '@/services/users' +import { type ApiUser } from '@/services/users' import { fetchWithSentry } from '@/utils' import { cookies } from 'next/headers' -import { AddBankAccountPayload, BridgeEndorsementType, InitiateKycResponse } from './types/users.types' -import { User } from '@/interfaces' +import { type AddBankAccountPayload, BridgeEndorsementType, type InitiateKycResponse } from './types/users.types' +import { type User } from '@/interfaces' const API_KEY = process.env.PEANUT_API_KEY! diff --git a/src/app/api/og/route.tsx b/src/app/api/og/route.tsx index a5146d651..8d67c6076 100644 --- a/src/app/api/og/route.tsx +++ b/src/app/api/og/route.tsx @@ -1,7 +1,7 @@ import { ImageResponse } from 'next/og' import { PaymentCardOG } from '@/components/og/PaymentCardOG' import { NextResponse, type NextRequest } from 'next/server' -import { PaymentLink } from '@/interfaces' +import { type PaymentLink } from '@/interfaces' import { promises as fs } from 'fs' import path from 'path' import { BASE_URL } from '@/constants' diff --git a/src/app/api/peanut/user/update-user/route.ts b/src/app/api/peanut/user/update-user/route.ts index 99abbd366..a112ef6b1 100644 --- a/src/app/api/peanut/user/update-user/route.ts +++ b/src/app/api/peanut/user/update-user/route.ts @@ -1,5 +1,5 @@ import * as consts from '@/constants' -import { fetchWithSentry, BridgeKycStatus } from '@/utils' +import { fetchWithSentry, type BridgeKycStatus } from '@/utils' import { cookies } from 'next/headers' import { NextRequest, NextResponse } from 'next/server' diff --git a/src/app/invite/page.tsx b/src/app/invite/page.tsx index c150dfffb..6a6fa124f 100644 --- a/src/app/invite/page.tsx +++ b/src/app/invite/page.tsx @@ -1,7 +1,7 @@ import InvitesPage from '@/components/Invites/InvitesPage' import { BASE_URL } from '@/constants' import getOrigin from '@/lib/hosting/get-origin' -import { Metadata } from 'next' +import { type Metadata } from 'next' import { validateInviteCode } from '../actions/invites' export const dynamic = 'force-dynamic' diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 04ffe12b6..d060e79e7 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -3,7 +3,7 @@ import { TranslationSafeWrapper } from '@/components/Global/TranslationSafeWrapp import { PeanutProvider } from '@/config' import { ContextProvider } from '@/context' import { FooterVisibilityProvider } from '@/context/footerVisibility' -import { Viewport } from 'next' +import { type Viewport } from 'next' import { Londrina_Solid, Roboto_Flex, Sniglet } from 'next/font/google' import localFont from 'next/font/local' import Script from 'next/script' diff --git a/src/app/metadata.ts b/src/app/metadata.ts index 3ba9f14e7..4832b7d44 100644 --- a/src/app/metadata.ts +++ b/src/app/metadata.ts @@ -1,5 +1,5 @@ import { BASE_URL } from '@/constants' -import { Metadata } from 'next' +import { type Metadata } from 'next' export function generateMetadata({ title, diff --git a/src/app/receipt/[entryId]/page.tsx b/src/app/receipt/[entryId]/page.tsx index ba9f38468..3014b751e 100644 --- a/src/app/receipt/[entryId]/page.tsx +++ b/src/app/receipt/[entryId]/page.tsx @@ -2,11 +2,11 @@ import { connection } from 'next/server' import { notFound } from 'next/navigation' import { isFinalState, historyTypeFromNumber } from '@/utils/history.utils' import { getHistoryEntry } from '@/app/actions/history' -import { mapTransactionDataForDrawer, TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' +import { mapTransactionDataForDrawer, type TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' import { TransactionDetailsReceipt } from '@/components/TransactionDetails/TransactionDetailsReceipt' import NavHeader from '@/components/Global/NavHeader' import { generateMetadata as generateBaseMetadata } from '@/app/metadata' -import { Metadata } from 'next' +import { type Metadata } from 'next' import { BASE_URL } from '@/constants' import { formatAmount, formatCurrency, isStableCoin } from '@/utils' import getOrigin from '@/lib/hosting/get-origin' diff --git a/src/app/request/[...username]/layout.tsx b/src/app/request/[...username]/layout.tsx index 0f7108971..9fa7cfe01 100644 --- a/src/app/request/[...username]/layout.tsx +++ b/src/app/request/[...username]/layout.tsx @@ -1,6 +1,6 @@ import PaymentLayoutWrapper from '@/app/[...recipient]/payment-layout-wrapper' import { generateMetadata as generateBaseMetadata } from '@/app/metadata' -import { Metadata } from 'next' +import { type Metadata } from 'next' export async function generateMetadata({ params }: { params: Promise<{ username: string[] }> }): Promise { const { username: usernameArray } = await params diff --git a/src/app/send/[...username]/layout.tsx b/src/app/send/[...username]/layout.tsx index a75b9155d..e654ae1ce 100644 --- a/src/app/send/[...username]/layout.tsx +++ b/src/app/send/[...username]/layout.tsx @@ -1,6 +1,6 @@ import PaymentLayoutWrapper from '@/app/[...recipient]/payment-layout-wrapper' import { generateMetadata as generateBaseMetadata } from '@/app/metadata' -import { Metadata } from 'next' +import { type Metadata } from 'next' export async function generateMetadata({ params }: { params: Promise<{ username: string[] }> }): Promise { const { username: usernameArray } = await params diff --git a/src/app/send/[...username]/page.tsx b/src/app/send/[...username]/page.tsx index 284f9d577..ebb8fbcf8 100644 --- a/src/app/send/[...username]/page.tsx +++ b/src/app/send/[...username]/page.tsx @@ -1,7 +1,7 @@ import PaymentPage from '@/app/[...recipient]/client' import { generateMetadata as generateBaseMetadata } from '@/app/metadata' import PageContainer from '@/components/0_Bruddle/PageContainer' -import { Metadata } from 'next' +import { type Metadata } from 'next' import { use } from 'react' type PageProps = { diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts index 37794e2d4..22b241b80 100644 --- a/src/app/sitemap.ts +++ b/src/app/sitemap.ts @@ -1,4 +1,4 @@ -import { MetadataRoute } from 'next' +import { type MetadataRoute } from 'next' async function generateSitemap(): Promise { const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || 'https://peanut.me' diff --git a/src/components/0_Bruddle/Button.tsx b/src/components/0_Bruddle/Button.tsx index 52c83e931..17ad01570 100644 --- a/src/components/0_Bruddle/Button.tsx +++ b/src/components/0_Bruddle/Button.tsx @@ -1,7 +1,7 @@ 'use client' import React, { forwardRef, useEffect, useRef, useState, useCallback } from 'react' import { twMerge } from 'tailwind-merge' -import { Icon, IconName } from '../Global/Icons/Icon' +import { Icon, type IconName } from '../Global/Icons/Icon' import Loading from '../Global/Loading' export type ButtonVariant = diff --git a/src/components/0_Bruddle/PageContainer.tsx b/src/components/0_Bruddle/PageContainer.tsx index c3fad1b34..d35383e6a 100644 --- a/src/components/0_Bruddle/PageContainer.tsx +++ b/src/components/0_Bruddle/PageContainer.tsx @@ -1,4 +1,4 @@ -import { HTMLAttributes } from 'react' +import { type HTMLAttributes } from 'react' import { twMerge } from 'tailwind-merge' interface PageContainerProps extends HTMLAttributes { diff --git a/src/components/AddMoney/components/AddMoneyBankDetails.tsx b/src/components/AddMoney/components/AddMoneyBankDetails.tsx index 3677f3236..157a1258c 100644 --- a/src/components/AddMoney/components/AddMoneyBankDetails.tsx +++ b/src/components/AddMoney/components/AddMoneyBankDetails.tsx @@ -2,14 +2,14 @@ import Card from '@/components/Global/Card' import NavHeader from '@/components/Global/NavHeader' -import PeanutActionDetailsCard, { PeanutActionDetailsCardProps } from '@/components/Global/PeanutActionDetailsCard' +import PeanutActionDetailsCard, { type PeanutActionDetailsCardProps } from '@/components/Global/PeanutActionDetailsCard' import ShareButton from '@/components/Global/ShareButton' import { PaymentInfoRow } from '@/components/Payment/PaymentInfoRow' import { PEANUT_WALLET_TOKEN_SYMBOL } from '@/constants' import { useOnrampFlow } from '@/context/OnrampFlowContext' import { useRouter, useParams } from 'next/navigation' import { useCallback, useEffect, useMemo } from 'react' -import { ALL_COUNTRIES_ALPHA3_TO_ALPHA2, CountryData, countryData } from '@/components/AddMoney/consts' +import { ALL_COUNTRIES_ALPHA3_TO_ALPHA2, type CountryData, countryData } from '@/components/AddMoney/consts' import { formatCurrencyAmount } from '@/utils/currency' import { formatBankAccountDisplay } from '@/utils/format.utils' import Icon from '@/components/Global/Icon' diff --git a/src/components/AddMoney/components/CryptoMethodDrawer.tsx b/src/components/AddMoney/components/CryptoMethodDrawer.tsx index e009a0b7e..276a4f9c0 100644 --- a/src/components/AddMoney/components/CryptoMethodDrawer.tsx +++ b/src/components/AddMoney/components/CryptoMethodDrawer.tsx @@ -5,7 +5,7 @@ import { Card } from '@/components/0_Bruddle' import { Drawer, DrawerContent, DrawerTitle } from '@/components/Global/Drawer' import Image from 'next/image' import { useRouter } from 'next/navigation' -import React, { Dispatch, SetStateAction, useState } from 'react' +import React, { type Dispatch, type SetStateAction, useState } from 'react' import TokenAndNetworkConfirmationModal from '@/components/Global/TokenAndNetworkConfirmationModal' const CryptoMethodDrawer = ({ diff --git a/src/components/AddMoney/components/CryptoSourceListCard.tsx b/src/components/AddMoney/components/CryptoSourceListCard.tsx index 50f58ba80..991457348 100644 --- a/src/components/AddMoney/components/CryptoSourceListCard.tsx +++ b/src/components/AddMoney/components/CryptoSourceListCard.tsx @@ -1,9 +1,9 @@ 'use client' import AvatarWithBadge from '@/components/Profile/AvatarWithBadge' import { SearchResultCard } from '@/components/SearchUsers/SearchResultCard' -import Image, { StaticImageData } from 'next/image' +import Image, { type StaticImageData } from 'next/image' import { twMerge } from 'tailwind-merge' -import { CryptoSource } from '../consts' +import { type CryptoSource } from '../consts' interface CryptoSourceListCardProps { sources: CryptoSource[] diff --git a/src/components/AddMoney/components/DepositMethodList.tsx b/src/components/AddMoney/components/DepositMethodList.tsx index 9cd6679f4..48973b3ef 100644 --- a/src/components/AddMoney/components/DepositMethodList.tsx +++ b/src/components/AddMoney/components/DepositMethodList.tsx @@ -1,5 +1,5 @@ 'use client' -import { CardPosition } from '@/components/Global/Card' +import { type CardPosition } from '@/components/Global/Card' import AvatarWithBadge from '@/components/Profile/AvatarWithBadge' import { SearchResultCard } from '@/components/SearchUsers/SearchResultCard' import Image from 'next/image' diff --git a/src/components/AddMoney/components/MantecaAddMoney.tsx b/src/components/AddMoney/components/MantecaAddMoney.tsx index e50f7c370..a372926c5 100644 --- a/src/components/AddMoney/components/MantecaAddMoney.tsx +++ b/src/components/AddMoney/components/MantecaAddMoney.tsx @@ -1,10 +1,10 @@ 'use client' -import { FC, useEffect, useMemo, useState } from 'react' +import { type FC, useEffect, useMemo, useState } from 'react' import MantecaDepositShareDetails from '@/components/AddMoney/components/MantecaDepositShareDetails' import InputAmountStep from '@/components/AddMoney/components/InputAmountStep' import { useParams, useRouter } from 'next/navigation' -import { CountryData, countryData } from '@/components/AddMoney/consts' -import { MantecaDepositResponseData } from '@/types/manteca.types' +import { type CountryData, countryData } from '@/components/AddMoney/consts' +import { type MantecaDepositResponseData } from '@/types/manteca.types' import { MantecaGeoSpecificKycModal } from '@/components/Kyc/InitiateMantecaKYCModal' import { useMantecaKycFlow } from '@/hooks/useMantecaKycFlow' import { useCurrency } from '@/hooks/useCurrency' diff --git a/src/components/AddMoney/components/MantecaDepositShareDetails.tsx b/src/components/AddMoney/components/MantecaDepositShareDetails.tsx index 794b2a118..12fe80c3c 100644 --- a/src/components/AddMoney/components/MantecaDepositShareDetails.tsx +++ b/src/components/AddMoney/components/MantecaDepositShareDetails.tsx @@ -5,7 +5,7 @@ import { useParams, useRouter } from 'next/navigation' import React, { useMemo } from 'react' import { countryData } from '@/components/AddMoney/consts' import ShareButton from '@/components/Global/ShareButton' -import { MantecaDepositResponseData } from '@/types/manteca.types' +import { type MantecaDepositResponseData } from '@/types/manteca.types' import { PaymentInfoRow } from '@/components/Payment/PaymentInfoRow' import { Icon } from '@/components/Global/Icons/Icon' import Image from 'next/image' diff --git a/src/components/AddMoney/consts/index.ts b/src/components/AddMoney/consts/index.ts index afb8ebb3c..7998cb512 100644 --- a/src/components/AddMoney/consts/index.ts +++ b/src/components/AddMoney/consts/index.ts @@ -1,8 +1,8 @@ import { APPLE_PAY, GOOGLE_PAY, MERCADO_PAGO, SOLANA_ICON, TRON_ICON, PIX } from '@/assets' import { BINANCE_LOGO, LEMON_LOGO, RIPIO_LOGO } from '@/assets/exchanges' import { METAMASK_LOGO, RAINBOW_LOGO, TRUST_WALLET_LOGO } from '@/assets/wallets' -import { IconName } from '@/components/Global/Icons/Icon' -import { StaticImageData } from 'next/image' +import { type IconName } from '@/components/Global/Icons/Icon' +import { type StaticImageData } from 'next/image' // ref: https://docs.manteca.dev/cripto/key-concepts/exchanges-multi-country#Available-Exchanges export const MantecaSupportedExchanges = { diff --git a/src/components/AddMoney/views/CryptoDepositQR.view.tsx b/src/components/AddMoney/views/CryptoDepositQR.view.tsx index 3fc71300f..abedd6374 100644 --- a/src/components/AddMoney/views/CryptoDepositQR.view.tsx +++ b/src/components/AddMoney/views/CryptoDepositQR.view.tsx @@ -5,7 +5,7 @@ import CopyToClipboard from '@/components/Global/CopyToClipboard' import NavHeader from '@/components/Global/NavHeader' import QRCodeWrapper from '@/components/Global/QRCodeWrapper' import AvatarWithBadge from '@/components/Profile/AvatarWithBadge' -import Image, { StaticImageData } from 'next/image' +import Image, { type StaticImageData } from 'next/image' import { useRouter } from 'next/navigation' interface CryptoDepositQRProps { diff --git a/src/components/AddMoney/views/NetworkSelection.view.tsx b/src/components/AddMoney/views/NetworkSelection.view.tsx index b3c77baa5..141e97f78 100644 --- a/src/components/AddMoney/views/NetworkSelection.view.tsx +++ b/src/components/AddMoney/views/NetworkSelection.view.tsx @@ -3,7 +3,7 @@ import { Icon } from '@/components/Global/Icons/Icon' import NavHeader from '@/components/Global/NavHeader' import NetworkListItem from '@/components/Global/TokenSelector/Components/NetworkListItem' import { - NetworkConfig, + type NetworkConfig, TOKEN_SELECTOR_COMING_SOON_NETWORKS, TOKEN_SELECTOR_POPULAR_NETWORK_IDS, } from '@/components/Global/TokenSelector/TokenSelector.consts' diff --git a/src/components/AddMoney/views/TokenSelection.view.tsx b/src/components/AddMoney/views/TokenSelection.view.tsx index c6fdad44a..bc94d47d1 100644 --- a/src/components/AddMoney/views/TokenSelection.view.tsx +++ b/src/components/AddMoney/views/TokenSelection.view.tsx @@ -5,7 +5,7 @@ import { SearchResultCard } from '@/components/SearchUsers/SearchResultCard' import { PEANUT_WALLET_TOKEN_SYMBOL } from '@/constants' import Image from 'next/image' import React from 'react' -import { CryptoToken, DEPOSIT_CRYPTO_TOKENS } from '../consts' +import { type CryptoToken, DEPOSIT_CRYPTO_TOKENS } from '../consts' interface TokenSelectionViewProps { headerTitle?: string diff --git a/src/components/AddWithdraw/AddWithdrawCountriesList.tsx b/src/components/AddWithdraw/AddWithdrawCountriesList.tsx index 8ed11f6fb..23fbcca10 100644 --- a/src/components/AddWithdraw/AddWithdrawCountriesList.tsx +++ b/src/components/AddWithdraw/AddWithdrawCountriesList.tsx @@ -1,24 +1,24 @@ 'use client' -import { COUNTRY_SPECIFIC_METHODS, countryData, SpecificPaymentMethod } from '@/components/AddMoney/consts' +import { COUNTRY_SPECIFIC_METHODS, countryData, type SpecificPaymentMethod } from '@/components/AddMoney/consts' import StatusBadge from '@/components/Global/Badges/StatusBadge' -import { IconName } from '@/components/Global/Icons/Icon' +import { type IconName } from '@/components/Global/Icons/Icon' import NavHeader from '@/components/Global/NavHeader' import AvatarWithBadge from '@/components/Profile/AvatarWithBadge' import { SearchResultCard } from '@/components/SearchUsers/SearchResultCard' import { getColorForUsername } from '@/utils/color.utils' -import Image, { StaticImageData } from 'next/image' +import Image, { type StaticImageData } from 'next/image' import { useParams, useRouter } from 'next/navigation' import EmptyState from '../Global/EmptyStates/EmptyState' import { useAuth } from '@/context/authContext' import { useEffect, useMemo, useRef, useState } from 'react' -import { DynamicBankAccountForm, IBankAccountDetails } from './DynamicBankAccountForm' +import { DynamicBankAccountForm, type IBankAccountDetails } from './DynamicBankAccountForm' import { addBankAccount, updateUserById } from '@/app/actions/users' -import { BridgeKycStatus } from '@/utils/bridge-accounts.utils' -import { AddBankAccountPayload } from '@/app/actions/types/users.types' +import { type BridgeKycStatus } from '@/utils/bridge-accounts.utils' +import { type AddBankAccountPayload } from '@/app/actions/types/users.types' import { useWebSocket } from '@/hooks/useWebSocket' import { useWithdrawFlow } from '@/context/WithdrawFlowContext' -import { Account } from '@/interfaces' +import { type Account } from '@/interfaces' import PeanutLoading from '../Global/PeanutLoading' import { getCountryCodeForWithdraw } from '@/utils/withdraw.utils' import { isMantecaCountry } from '@/constants/manteca.consts' diff --git a/src/components/AddWithdraw/AddWithdrawRouterView.tsx b/src/components/AddWithdraw/AddWithdrawRouterView.tsx index 5e528a987..659d4cc6c 100644 --- a/src/components/AddWithdraw/AddWithdrawRouterView.tsx +++ b/src/components/AddWithdraw/AddWithdrawRouterView.tsx @@ -1,12 +1,12 @@ 'use client' import { Button } from '@/components/0_Bruddle' -import { DepositMethod, DepositMethodList } from '@/components/AddMoney/components/DepositMethodList' +import { type DepositMethod, DepositMethodList } from '@/components/AddMoney/components/DepositMethodList' import NavHeader from '@/components/Global/NavHeader' -import { RecentMethod, getUserPreferences, updateUserPreferences } from '@/utils/general.utils' +import { type RecentMethod, getUserPreferences, updateUserPreferences } from '@/utils/general.utils' import { useRouter, useSearchParams } from 'next/navigation' -import { FC, useEffect, useState, useTransition, useCallback } from 'react' +import { type FC, useEffect, useState, useTransition, useCallback } from 'react' import { useUserStore } from '@/redux/hooks' -import { AccountType, Account } from '@/interfaces' +import { AccountType, type Account } from '@/interfaces' import { useWithdrawFlow } from '@/context/WithdrawFlowContext' import { useOnrampFlow } from '@/context/OnrampFlowContext' import { isMantecaCountry } from '@/constants/manteca.consts' diff --git a/src/components/AddWithdraw/DynamicBankAccountForm.tsx b/src/components/AddWithdraw/DynamicBankAccountForm.tsx index e5dd623c5..64cfd71d5 100644 --- a/src/components/AddWithdraw/DynamicBankAccountForm.tsx +++ b/src/components/AddWithdraw/DynamicBankAccountForm.tsx @@ -3,14 +3,14 @@ import { forwardRef, useEffect, useImperativeHandle, useMemo, useState } from 'r import { useForm, Controller } from 'react-hook-form' import { useAuth } from '@/context/authContext' import { Button } from '@/components/0_Bruddle/Button' -import { AddBankAccountPayload, BridgeAccountOwnerType, BridgeAccountType } from '@/app/actions/types/users.types' +import { type AddBankAccountPayload, BridgeAccountOwnerType, BridgeAccountType } from '@/app/actions/types/users.types' import BaseInput from '@/components/0_Bruddle/BaseInput' import { BRIDGE_ALPHA3_TO_ALPHA2, ALL_COUNTRIES_ALPHA3_TO_ALPHA2 } from '@/components/AddMoney/consts' import { useParams, useRouter } from 'next/navigation' import { validateIban, validateBic, isValidRoutingNumber } from '@/utils/bridge-accounts.utils' import ErrorAlert from '@/components/Global/ErrorAlert' import { getBicFromIban } from '@/app/actions/ibanToBic' -import PeanutActionDetailsCard, { PeanutActionDetailsCardProps } from '../Global/PeanutActionDetailsCard' +import PeanutActionDetailsCard, { type PeanutActionDetailsCardProps } from '../Global/PeanutActionDetailsCard' import { PEANUT_WALLET_TOKEN_SYMBOL } from '@/constants' import { useWithdrawFlow } from '@/context/WithdrawFlowContext' import { getCountryFromIban, validateMXCLabeAccount, validateUSBankAccount } from '@/utils/withdraw.utils' diff --git a/src/components/Claim/Claim.consts.ts b/src/components/Claim/Claim.consts.ts index 5afc2090b..d41a91ec1 100644 --- a/src/components/Claim/Claim.consts.ts +++ b/src/components/Claim/Claim.consts.ts @@ -1,7 +1,7 @@ import * as consts from '@/constants' import * as interfaces from '@/interfaces' -import { IOfframpSuccessScreenProps, IOfframpConfirmScreenProps } from '../Offramp/Offramp.consts' -import { ClaimLinkData } from '@/services/sendLinks' +import { type IOfframpSuccessScreenProps, type IOfframpConfirmScreenProps } from '../Offramp/Offramp.consts' +import { type ClaimLinkData } from '@/services/sendLinks' import { type PeanutCrossChainRoute } from '@/services/swap' export type ClaimType = 'claim' | 'claimxchain' diff --git a/src/components/Claim/Claim.tsx b/src/components/Claim/Claim.tsx index 1e4bbb46a..e5eec487a 100644 --- a/src/components/Claim/Claim.tsx +++ b/src/components/Claim/Claim.tsx @@ -3,9 +3,9 @@ import peanut from '@squirrel-labs/peanut-sdk' import { useCallback, useContext, useEffect, useMemo, useState } from 'react' import { fetchTokenDetails, fetchTokenPrice } from '@/app/actions/tokens' -import { StatusType } from '@/components/Global/Badges/StatusBadge' +import { type StatusType } from '@/components/Global/Badges/StatusBadge' import { TransactionDetailsReceipt } from '@/components/TransactionDetails/TransactionDetailsReceipt' -import { TransactionDetails, REWARD_TOKENS } from '@/components/TransactionDetails/transactionTransformer' +import { type TransactionDetails, REWARD_TOKENS } from '@/components/TransactionDetails/transactionTransformer' import * as consts from '@/constants' import { tokenSelectorContext } from '@/context' import { useAuth } from '@/context/authContext' diff --git a/src/components/Claim/Generic/Claimed.view.tsx b/src/components/Claim/Generic/Claimed.view.tsx index 1396dcc8c..a4ce7a845 100644 --- a/src/components/Claim/Generic/Claimed.view.tsx +++ b/src/components/Claim/Generic/Claimed.view.tsx @@ -3,7 +3,7 @@ import { Button, Card } from '@/components/0_Bruddle' import { Icon } from '@/components/Global/Icons/Icon' import { useAuth } from '@/context/authContext' import { useRouter } from 'next/navigation' -import { FC } from 'react' +import { type FC } from 'react' interface ClaimedViewProps { amount: number | bigint diff --git a/src/components/Claim/Link/FlowManager.tsx b/src/components/Claim/Link/FlowManager.tsx index a0b845fc8..6dcec133d 100644 --- a/src/components/Claim/Link/FlowManager.tsx +++ b/src/components/Claim/Link/FlowManager.tsx @@ -4,9 +4,9 @@ import { InitialClaimLinkView } from './Initial.view' import * as _consts from '../Claim.consts' import * as interfaces from '@/interfaces' import { - IOfframpSuccessScreenProps, + type IOfframpSuccessScreenProps, OfframpType, - IOfframpConfirmScreenProps, + type IOfframpConfirmScreenProps, } from '@/components/Offramp/Offramp.consts' type ClaimPropsType = _consts.IClaimScreenProps | IOfframpSuccessScreenProps | IOfframpConfirmScreenProps diff --git a/src/components/Claim/Link/Initial.view.tsx b/src/components/Claim/Link/Initial.view.tsx index 253ff5847..ae8a26255 100644 --- a/src/components/Claim/Link/Initial.view.tsx +++ b/src/components/Claim/Link/Initial.view.tsx @@ -1,6 +1,6 @@ 'use client' -import GeneralRecipientInput, { GeneralRecipientUpdate } from '@/components/Global/GeneralRecipientInput' +import GeneralRecipientInput, { type GeneralRecipientUpdate } from '@/components/Global/GeneralRecipientInput' import NavHeader from '@/components/Global/NavHeader' import PeanutActionDetailsCard from '@/components/Global/PeanutActionDetailsCard' import TokenSelector from '@/components/Global/TokenSelector/TokenSelector' @@ -33,7 +33,7 @@ import { useRouter, useSearchParams } from 'next/navigation' import { useCallback, useContext, useEffect, useMemo, useState, useRef } from 'react' import { formatUnits } from 'viem' import type { Address } from 'viem' -import { IClaimScreenProps } from '../Claim.consts' +import { type IClaimScreenProps } from '../Claim.consts' import ActionList from '@/components/Common/ActionList' import { ClaimBankFlowStep, useClaimBankFlow } from '@/context/ClaimBankFlowContext' import useClaimLink from '../useClaimLink' diff --git a/src/components/Claim/Link/MantecaFlowManager.tsx b/src/components/Claim/Link/MantecaFlowManager.tsx index febf851c5..2b866bdfa 100644 --- a/src/components/Claim/Link/MantecaFlowManager.tsx +++ b/src/components/Claim/Link/MantecaFlowManager.tsx @@ -4,8 +4,8 @@ import { MERCADO_PAGO, PIX } from '@/assets' import NavHeader from '@/components/Global/NavHeader' import PeanutActionDetailsCard from '@/components/Global/PeanutActionDetailsCard' import { useClaimBankFlow } from '@/context/ClaimBankFlowContext' -import { ClaimLinkData } from '@/services/sendLinks' -import { FC, useEffect, useState } from 'react' +import { type ClaimLinkData } from '@/services/sendLinks' +import { type FC, useEffect, useState } from 'react' import MantecaDetailsStep from './views/MantecaDetailsStep.view' import { MercadoPagoStep } from '@/types/manteca.types' import MantecaReviewStep from './views/MantecaReviewStep' @@ -14,7 +14,7 @@ import { useRouter } from 'next/navigation' import useKycStatus from '@/hooks/useKycStatus' import { MantecaGeoSpecificKycModal } from '@/components/Kyc/InitiateMantecaKYCModal' import { useAuth } from '@/context/authContext' -import { CountryData } from '@/components/AddMoney/consts' +import { type CountryData } from '@/components/AddMoney/consts' interface MantecaFlowManagerProps { claimLinkData: ClaimLinkData diff --git a/src/components/Claim/Link/Onchain/Confirm.view.tsx b/src/components/Claim/Link/Onchain/Confirm.view.tsx index 60b08b72b..4bd25cd2e 100644 --- a/src/components/Claim/Link/Onchain/Confirm.view.tsx +++ b/src/components/Claim/Link/Onchain/Confirm.view.tsx @@ -9,7 +9,7 @@ import { PaymentInfoRow } from '@/components/Payment/PaymentInfoRow' import { loadingStateContext, tokenSelectorContext } from '@/context' import { useTokenChainIcons } from '@/hooks/useTokenChainIcons' import { useWallet } from '@/hooks/wallet/useWallet' -import { IExtendedLinkDetails } from '@/interfaces' +import { type IExtendedLinkDetails } from '@/interfaces' import { ErrorHandler, formatTokenAmount, saveClaimedLinkToLocalStorage, printableAddress, isStableCoin } from '@/utils' import * as Sentry from '@sentry/nextjs' import { useContext, useState, useMemo } from 'react' diff --git a/src/components/Claim/Link/views/BankFlowManager.view.tsx b/src/components/Claim/Link/views/BankFlowManager.view.tsx index 15a6ff156..2998cf7ad 100644 --- a/src/components/Claim/Link/views/BankFlowManager.view.tsx +++ b/src/components/Claim/Link/views/BankFlowManager.view.tsx @@ -1,19 +1,19 @@ 'use client' -import { IClaimScreenProps } from '../../Claim.consts' -import { DynamicBankAccountForm, IBankAccountDetails } from '@/components/AddWithdraw/DynamicBankAccountForm' +import { type IClaimScreenProps } from '../../Claim.consts' +import { DynamicBankAccountForm, type IBankAccountDetails } from '@/components/AddWithdraw/DynamicBankAccountForm' import { ClaimBankFlowStep, useClaimBankFlow } from '@/context/ClaimBankFlowContext' import { useCallback, useContext, useState, useRef, useEffect } from 'react' import { loadingStateContext } from '@/context' import { createBridgeExternalAccountForGuest } from '@/app/actions/external-accounts' import { confirmOfframp, createOfframp, createOfframpForGuest } from '@/app/actions/offramp' -import { Address, formatUnits } from 'viem' +import { type Address, formatUnits } from 'viem' import { ErrorHandler, formatTokenAmount } from '@/utils' import * as Sentry from '@sentry/nextjs' import useClaimLink from '../../useClaimLink' -import { AddBankAccountPayload } from '@/app/actions/types/users.types' +import { type AddBankAccountPayload } from '@/app/actions/types/users.types' import { useAuth } from '@/context/authContext' -import { TCreateOfframpRequest, TCreateOfframpResponse } from '@/services/services.types' +import { type TCreateOfframpRequest, type TCreateOfframpResponse } from '@/services/services.types' import { getOfframpCurrencyConfig } from '@/utils/bridge.utils' import { getBridgeChainName, getBridgeTokenName } from '@/utils/bridge-accounts.utils' import peanut from '@squirrel-labs/peanut-sdk' @@ -25,7 +25,7 @@ import { ConfirmBankClaimView } from './Confirm.bank-claim.view' import { CountryListRouter } from '@/components/Common/CountryListRouter' import NavHeader from '@/components/Global/NavHeader' import { useWebSocket } from '@/hooks/useWebSocket' -import { BridgeKycStatus } from '@/utils/bridge-accounts.utils' +import { type BridgeKycStatus } from '@/utils/bridge-accounts.utils' import { getCountryCodeForWithdraw } from '@/utils/withdraw.utils' import { useAppDispatch } from '@/redux/hooks' import { bankFormActions } from '@/redux/slices/bank-form-slice' diff --git a/src/components/Claim/Link/views/Confirm.bank-claim.view.tsx b/src/components/Claim/Link/views/Confirm.bank-claim.view.tsx index 12ea4596c..e14d12e99 100644 --- a/src/components/Claim/Link/views/Confirm.bank-claim.view.tsx +++ b/src/components/Claim/Link/views/Confirm.bank-claim.view.tsx @@ -7,9 +7,9 @@ import ErrorAlert from '@/components/Global/ErrorAlert' import NavHeader from '@/components/Global/NavHeader' import PeanutActionDetailsCard from '@/components/Global/PeanutActionDetailsCard' import { PaymentInfoRow } from '@/components/Payment/PaymentInfoRow' -import { IBankAccountDetails } from '@/components/AddWithdraw/DynamicBankAccountForm' +import { type IBankAccountDetails } from '@/components/AddWithdraw/DynamicBankAccountForm' import { useMemo } from 'react' -import { ClaimLinkData } from '@/services/sendLinks' +import { type ClaimLinkData } from '@/services/sendLinks' import { formatUnits } from 'viem' import ExchangeRate from '@/components/ExchangeRate' import { AccountType } from '@/interfaces' diff --git a/src/components/Claim/Link/views/MantecaDetailsStep.view.tsx b/src/components/Claim/Link/views/MantecaDetailsStep.view.tsx index 5233cb391..988053c44 100644 --- a/src/components/Claim/Link/views/MantecaDetailsStep.view.tsx +++ b/src/components/Claim/Link/views/MantecaDetailsStep.view.tsx @@ -3,7 +3,7 @@ import { Button } from '@/components/0_Bruddle' import { Icon } from '@/components/Global/Icons/Icon' import { MercadoPagoStep } from '@/types/manteca.types' -import { Dispatch, FC, SetStateAction, useState } from 'react' +import { type Dispatch, type FC, type SetStateAction, useState } from 'react' import { MANTECA_COUNTRIES_CONFIG } from '@/constants' import ValidatedInput from '@/components/Global/ValidatedInput' import { validateCbuCvuAlias } from '@/utils/withdraw.utils' diff --git a/src/components/Claim/Link/views/MantecaReviewStep.tsx b/src/components/Claim/Link/views/MantecaReviewStep.tsx index fb24a2897..1e50f91be 100644 --- a/src/components/Claim/Link/views/MantecaReviewStep.tsx +++ b/src/components/Claim/Link/views/MantecaReviewStep.tsx @@ -1,13 +1,13 @@ import { Button } from '@/components/0_Bruddle' import ErrorAlert from '@/components/Global/ErrorAlert' -import MantecaDetailsCard, { MantecaCardRow } from '@/components/Global/MantecaDetailsCard' +import MantecaDetailsCard, { type MantecaCardRow } from '@/components/Global/MantecaDetailsCard' import PeanutLoading from '@/components/Global/PeanutLoading' import { MANTECA_DEPOSIT_ADDRESS } from '@/constants' import { useCurrency } from '@/hooks/useCurrency' import { mantecaApi } from '@/services/manteca' import { sendLinksApi } from '@/services/sendLinks' import { MercadoPagoStep } from '@/types/manteca.types' -import { Dispatch, FC, SetStateAction, useState } from 'react' +import { type Dispatch, type FC, type SetStateAction, useState } from 'react' interface MantecaReviewStepProps { setCurrentStep: Dispatch> diff --git a/src/components/Common/ActionList.tsx b/src/components/Common/ActionList.tsx index 9acf53dd4..2ed6c897a 100644 --- a/src/components/Common/ActionList.tsx +++ b/src/components/Common/ActionList.tsx @@ -4,7 +4,7 @@ import { SearchResultCard } from '../SearchUsers/SearchResultCard' import StatusBadge from '../Global/Badges/StatusBadge' import IconStack from '../Global/IconStack' import { ClaimBankFlowStep, useClaimBankFlow } from '@/context/ClaimBankFlowContext' -import { ClaimLinkData } from '@/services/sendLinks' +import { type ClaimLinkData } from '@/services/sendLinks' import { formatUnits } from 'viem' import { useMemo, useState } from 'react' import ActionModal from '@/components/Global/ActionModal' @@ -17,12 +17,12 @@ import { PEANUTMAN_LOGO } from '@/assets/peanut' import { BankClaimType, useDetermineBankClaimType } from '@/hooks/useDetermineBankClaimType' import useSavedAccounts from '@/hooks/useSavedAccounts' import { RequestFulfillmentBankFlowStep, useRequestFulfillmentFlow } from '@/context/RequestFulfillmentFlowContext' -import { ParsedURL } from '@/lib/url-parser/types/payment' +import { type ParsedURL } from '@/lib/url-parser/types/payment' import { useAppDispatch, usePaymentStore } from '@/redux/hooks' import { BankRequestType, useDetermineBankRequestType } from '@/hooks/useDetermineBankRequestType' import { GuestVerificationModal } from '../Global/GuestVerificationModal' import ActionListDaimoPayButton from './ActionListDaimoPayButton' -import { ACTION_METHODS, PaymentMethod } from '@/constants/actionlist.consts' +import { ACTION_METHODS, type PaymentMethod } from '@/constants/actionlist.consts' import useClaimLink from '../Claim/useClaimLink' import { setupActions } from '@/redux/slices/setup-slice' import starStraightImage from '@/assets/icons/starStraight.svg' diff --git a/src/components/Common/ActionListDaimoPayButton.tsx b/src/components/Common/ActionListDaimoPayButton.tsx index a26fdc561..57127fe99 100644 --- a/src/components/Common/ActionListDaimoPayButton.tsx +++ b/src/components/Common/ActionListDaimoPayButton.tsx @@ -5,7 +5,7 @@ import { useAppDispatch, usePaymentStore } from '@/redux/hooks' import { paymentActions } from '@/redux/slices/payment-slice' import { useCurrency } from '@/hooks/useCurrency' import { useSearchParams } from 'next/navigation' -import { InitiatePaymentPayload, usePaymentInitiator } from '@/hooks/usePaymentInitiator' +import { type InitiatePaymentPayload, usePaymentInitiator } from '@/hooks/usePaymentInitiator' import DaimoPayButton from '../Global/DaimoPayButton' import { ACTION_METHODS } from '@/constants/actionlist.consts' import { useWallet } from '@/hooks/wallet/useWallet' diff --git a/src/components/Common/CountryList.tsx b/src/components/Common/CountryList.tsx index 4a44b702c..e7efc6813 100644 --- a/src/components/Common/CountryList.tsx +++ b/src/components/Common/CountryList.tsx @@ -1,7 +1,7 @@ 'use client' import { BRIDGE_ALPHA3_TO_ALPHA2, - CountryData, + type CountryData, countryData, MantecaSupportedExchanges, ALL_COUNTRIES_ALPHA3_TO_ALPHA2, diff --git a/src/components/Common/CountryListRouter.tsx b/src/components/Common/CountryListRouter.tsx index 70fe8903b..bc4e3a0c2 100644 --- a/src/components/Common/CountryListRouter.tsx +++ b/src/components/Common/CountryListRouter.tsx @@ -1,17 +1,17 @@ 'use client' import NavHeader from '@/components/Global/NavHeader' import PeanutActionDetailsCard, { - PeanutActionDetailsCardRecipientType, - PeanutActionDetailsCardTransactionType, + type PeanutActionDetailsCardRecipientType, + type PeanutActionDetailsCardTransactionType, } from '@/components/Global/PeanutActionDetailsCard' import { ClaimBankFlowStep, useClaimBankFlow } from '@/context/ClaimBankFlowContext' import { formatUnits } from 'viem' import { formatTokenAmount, printableAddress } from '@/utils/general.utils' import { CountryList } from '@/components/Common/CountryList' -import { ClaimLinkData } from '@/services/sendLinks' -import { CountryData, MantecaSupportedExchanges } from '@/components/AddMoney/consts' +import { type ClaimLinkData } from '@/services/sendLinks' +import { type CountryData, MantecaSupportedExchanges } from '@/components/AddMoney/consts' import useSavedAccounts from '@/hooks/useSavedAccounts' -import { ParsedURL } from '@/lib/url-parser/types/payment' +import { type ParsedURL } from '@/lib/url-parser/types/payment' import { useCallback, useMemo } from 'react' import { RequestFulfillmentBankFlowStep, useRequestFulfillmentFlow } from '@/context/RequestFulfillmentFlowContext' import { usePaymentStore } from '@/redux/hooks' diff --git a/src/components/Common/SavedAccountsView.tsx b/src/components/Common/SavedAccountsView.tsx index 474eb31c3..ff3bf68cb 100644 --- a/src/components/Common/SavedAccountsView.tsx +++ b/src/components/Common/SavedAccountsView.tsx @@ -1,7 +1,7 @@ 'use client' import { countryData as ALL_METHODS_DATA, ALL_COUNTRIES_ALPHA3_TO_ALPHA2 } from '@/components/AddMoney/consts' import { shortenStringLong, formatIban } from '@/utils/general.utils' -import { AccountType, Account } from '@/interfaces' +import { AccountType, type Account } from '@/interfaces' import Image from 'next/image' import { Icon } from '@/components/Global/Icons/Icon' import { SearchResultCard } from '@/components/SearchUsers/SearchResultCard' diff --git a/src/components/Create/Create.utils.ts b/src/components/Create/Create.utils.ts index 1bd90f66b..6e9b6d517 100644 --- a/src/components/Create/Create.utils.ts +++ b/src/components/Create/Create.utils.ts @@ -1,7 +1,7 @@ import peanut from '@squirrel-labs/peanut-sdk' import { peanutTokenDetails } from '@/constants' -import { IUserBalance } from '@/interfaces' +import { type IUserBalance } from '@/interfaces' import { areEvmAddressesEqual, isNativeCurrency } from '@/utils' export const isGaslessDepositPossible = ({ diff --git a/src/components/ExchangeRate/index.tsx b/src/components/ExchangeRate/index.tsx index 761cc5c6a..2eb53001c 100644 --- a/src/components/ExchangeRate/index.tsx +++ b/src/components/ExchangeRate/index.tsx @@ -1,6 +1,6 @@ import { AccountType } from '@/interfaces' import { PaymentInfoRow } from '@/components/Payment/PaymentInfoRow' -import useGetExchangeRate, { IExchangeRate } from '@/hooks/useGetExchangeRate' +import useGetExchangeRate, { type IExchangeRate } from '@/hooks/useGetExchangeRate' import { useExchangeRate } from '@/hooks/useExchangeRate' interface IExchangeRateProps extends Omit { diff --git a/src/components/Global/ActionModal/index.tsx b/src/components/Global/ActionModal/index.tsx index 18a80de27..4b1880d8d 100644 --- a/src/components/Global/ActionModal/index.tsx +++ b/src/components/Global/ActionModal/index.tsx @@ -1,5 +1,5 @@ -import { Button, ButtonProps } from '@/components/0_Bruddle/Button' -import { IconProps as GlobalIconProps, Icon, IconName } from '@/components/Global/Icons/Icon' +import { Button, type ButtonProps } from '@/components/0_Bruddle/Button' +import { type IconProps as GlobalIconProps, Icon, type IconName } from '@/components/Global/Icons/Icon' import Loading from '@/components/Global/Loading' import BaseModal from '@/components/Global/Modal' import React from 'react' diff --git a/src/components/Global/ChainSelector/index.tsx b/src/components/Global/ChainSelector/index.tsx index cc6e931f1..919e4bf34 100644 --- a/src/components/Global/ChainSelector/index.tsx +++ b/src/components/Global/ChainSelector/index.tsx @@ -2,7 +2,7 @@ import { supportedPeanutChains } from '@/constants' import { tokenSelectorContext } from '@/context' -import { IPeanutChainDetails, IUserBalance } from '@/interfaces' +import { type IPeanutChainDetails, type IUserBalance } from '@/interfaces' import { calculateValuePerChain, formatTokenAmount } from '@/utils' import { Menu, Transition } from '@headlessui/react' import { useContext, useMemo, useState } from 'react' diff --git a/src/components/Global/ConfirmInviteModal/index.tsx b/src/components/Global/ConfirmInviteModal/index.tsx index 33ab6b126..57f4f16bc 100644 --- a/src/components/Global/ConfirmInviteModal/index.tsx +++ b/src/components/Global/ConfirmInviteModal/index.tsx @@ -1,5 +1,5 @@ 'use client' -import React, { FC } from 'react' +import React, { type FC } from 'react' import Image from 'next/image' import { PEANUT_LOGO_BLACK, PEANUTMAN_LOGO } from '@/assets' import Modal from '../Modal' diff --git a/src/components/Global/CopyField/index.tsx b/src/components/Global/CopyField/index.tsx index ac1655096..8c7bd8e0f 100644 --- a/src/components/Global/CopyField/index.tsx +++ b/src/components/Global/CopyField/index.tsx @@ -1,5 +1,5 @@ 'use client' -import { Button, ButtonVariant } from '@/components/0_Bruddle' +import { Button, type ButtonVariant } from '@/components/0_Bruddle' import BaseInput from '@/components/0_Bruddle/BaseInput' import { copyTextToClipboardWithFallback } from '@/utils' import { useCallback, useState } from 'react' diff --git a/src/components/Global/CopyToClipboard/index.tsx b/src/components/Global/CopyToClipboard/index.tsx index 8ffc13273..22ab57e6c 100644 --- a/src/components/Global/CopyToClipboard/index.tsx +++ b/src/components/Global/CopyToClipboard/index.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react' import { twMerge } from 'tailwind-merge' import { Icon } from '../Icons/Icon' -import { Button, ButtonSize } from '@/components/0_Bruddle' +import { Button, type ButtonSize } from '@/components/0_Bruddle' interface Props { textToCopy: string diff --git a/src/components/Global/DaimoPayButton/index.tsx b/src/components/Global/DaimoPayButton/index.tsx index aeb234e2d..2702efa0c 100644 --- a/src/components/Global/DaimoPayButton/index.tsx +++ b/src/components/Global/DaimoPayButton/index.tsx @@ -1,7 +1,7 @@ 'use client' import { Button } from '@/components/0_Bruddle' -import { IconName } from '@/components/Global/Icons/Icon' +import { type IconName } from '@/components/Global/Icons/Icon' import { PEANUT_WALLET_TOKEN } from '@/constants' import { DaimoPayButton as DaimoPayButtonSDK, useDaimoPayUI } from '@daimo/pay' import { useCallback, useEffect } from 'react' diff --git a/src/components/Global/DirectSendQR/index.tsx b/src/components/Global/DirectSendQR/index.tsx index b1014d2ca..644f4e28b 100644 --- a/src/components/Global/DirectSendQR/index.tsx +++ b/src/components/Global/DirectSendQR/index.tsx @@ -16,7 +16,7 @@ import { usePathname, useRouter, useSearchParams } from 'next/navigation' import { useMemo, useState, type ChangeEvent } from 'react' import { twMerge } from 'tailwind-merge' import ActionModal from '../ActionModal' -import { Icon, IconName } from '../Icons/Icon' +import { Icon, type IconName } from '../Icons/Icon' import { EQrType, NAME_BY_QR_TYPE, parseEip681, recognizeQr } from './utils' const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL! diff --git a/src/components/Global/EmptyStates/EmptyState.tsx b/src/components/Global/EmptyStates/EmptyState.tsx index d1a148238..17824cf07 100644 --- a/src/components/Global/EmptyStates/EmptyState.tsx +++ b/src/components/Global/EmptyStates/EmptyState.tsx @@ -1,6 +1,6 @@ import React from 'react' import Card from '../Card' -import { Icon, IconName } from '../Icons/Icon' +import { Icon, type IconName } from '../Icons/Icon' interface EmptyStateProps { icon: IconName diff --git a/src/components/Global/ExchangeRateWidget/index.tsx b/src/components/Global/ExchangeRateWidget/index.tsx index 45085aa46..767e47626 100644 --- a/src/components/Global/ExchangeRateWidget/index.tsx +++ b/src/components/Global/ExchangeRateWidget/index.tsx @@ -4,8 +4,8 @@ import { useDebounce } from '@/hooks/useDebounce' import { useExchangeRate } from '@/hooks/useExchangeRate' import Image from 'next/image' import { useRouter, useSearchParams } from 'next/navigation' -import { FC, useCallback, useEffect, useMemo } from 'react' -import { Icon, IconName } from '../Icons/Icon' +import { type FC, useCallback, useEffect, useMemo } from 'react' +import { Icon, type IconName } from '../Icons/Icon' import { Button } from '@/components/0_Bruddle' interface IExchangeRateWidgetProps { diff --git a/src/components/Global/FlowHeader/index.tsx b/src/components/Global/FlowHeader/index.tsx index a004199d6..c8bb627b5 100644 --- a/src/components/Global/FlowHeader/index.tsx +++ b/src/components/Global/FlowHeader/index.tsx @@ -1,6 +1,6 @@ import { Button } from '@/components/0_Bruddle' import { Icon } from '../Icons/Icon' -import { ReactNode } from 'react' +import { type ReactNode } from 'react' interface FlowHeaderProps { onPrev?: () => void diff --git a/src/components/Global/GeneralRecipientInput/index.tsx b/src/components/Global/GeneralRecipientInput/index.tsx index 8fefb2b6c..8a0095b7e 100644 --- a/src/components/Global/GeneralRecipientInput/index.tsx +++ b/src/components/Global/GeneralRecipientInput/index.tsx @@ -1,5 +1,5 @@ 'use client' -import ValidatedInput, { InputUpdate } from '@/components/Global/ValidatedInput' +import ValidatedInput, { type InputUpdate } from '@/components/Global/ValidatedInput' import { useRecentRecipients } from '@/hooks/useRecentRecipients' import * as interfaces from '@/interfaces' import { validateBankAccount } from '@/utils' diff --git a/src/components/Global/IOSInstallPWAModal/index.tsx b/src/components/Global/IOSInstallPWAModal/index.tsx index c88d3a3b8..68e922829 100644 --- a/src/components/Global/IOSInstallPWAModal/index.tsx +++ b/src/components/Global/IOSInstallPWAModal/index.tsx @@ -1,6 +1,6 @@ 'use client' -import ActionModal, { ActionModalButtonProps } from '@/components/Global/ActionModal' +import ActionModal, { type ActionModalButtonProps } from '@/components/Global/ActionModal' import { useEffect, useState } from 'react' import { Icon } from '../Icons/Icon' diff --git a/src/components/Global/Icons/Icon.tsx b/src/components/Global/Icons/Icon.tsx index e3067b62a..126e235fd 100644 --- a/src/components/Global/Icons/Icon.tsx +++ b/src/components/Global/Icons/Icon.tsx @@ -1,4 +1,4 @@ -import { ComponentType, FC, SVGProps } from 'react' +import { type ComponentType, type FC, type SVGProps } from 'react' import { AchievementsIcon } from './achievements' import { AlertIcon } from './alert' import { ArrowDownIcon } from './arrow-down' diff --git a/src/components/Global/Icons/Info.tsx b/src/components/Global/Icons/Info.tsx index 1274bc9a2..a3dcf067a 100644 --- a/src/components/Global/Icons/Info.tsx +++ b/src/components/Global/Icons/Info.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const InfoIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/achievements.tsx b/src/components/Global/Icons/achievements.tsx index 5975adf8a..d1274e7b6 100644 --- a/src/components/Global/Icons/achievements.tsx +++ b/src/components/Global/Icons/achievements.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const AchievementsIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/alert.tsx b/src/components/Global/Icons/alert.tsx index f086d2004..6e21b04c6 100644 --- a/src/components/Global/Icons/alert.tsx +++ b/src/components/Global/Icons/alert.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const AlertIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/arrow-down-left.tsx b/src/components/Global/Icons/arrow-down-left.tsx index e0995e3af..8e1ff8a6c 100644 --- a/src/components/Global/Icons/arrow-down-left.tsx +++ b/src/components/Global/Icons/arrow-down-left.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ArrowDownLeftIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/arrow-down.tsx b/src/components/Global/Icons/arrow-down.tsx index 2c804788c..eebda2efd 100644 --- a/src/components/Global/Icons/arrow-down.tsx +++ b/src/components/Global/Icons/arrow-down.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ArrowDownIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/arrow-up-right.tsx b/src/components/Global/Icons/arrow-up-right.tsx index 91878d52d..fb23a887c 100644 --- a/src/components/Global/Icons/arrow-up-right.tsx +++ b/src/components/Global/Icons/arrow-up-right.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ArrowUpRightIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/arrow-up.tsx b/src/components/Global/Icons/arrow-up.tsx index f394f6138..86285bfc1 100644 --- a/src/components/Global/Icons/arrow-up.tsx +++ b/src/components/Global/Icons/arrow-up.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ArrowUpIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/badge.tsx b/src/components/Global/Icons/badge.tsx index 60a90281a..bf575aa69 100644 --- a/src/components/Global/Icons/badge.tsx +++ b/src/components/Global/Icons/badge.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const BadgeIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/bank.tsx b/src/components/Global/Icons/bank.tsx index 28021c15d..8845155f8 100644 --- a/src/components/Global/Icons/bank.tsx +++ b/src/components/Global/Icons/bank.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const BankIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/bell.tsx b/src/components/Global/Icons/bell.tsx index 841ec4458..772902967 100644 --- a/src/components/Global/Icons/bell.tsx +++ b/src/components/Global/Icons/bell.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const BellIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/camera.tsx b/src/components/Global/Icons/camera.tsx index fc76e2525..9145a4da5 100644 --- a/src/components/Global/Icons/camera.tsx +++ b/src/components/Global/Icons/camera.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const CameraIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/cancel.tsx b/src/components/Global/Icons/cancel.tsx index 376350c82..6592305bd 100644 --- a/src/components/Global/Icons/cancel.tsx +++ b/src/components/Global/Icons/cancel.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const CancelIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/check-circle.tsx b/src/components/Global/Icons/check-circle.tsx index e02560dc8..01fcf89ce 100644 --- a/src/components/Global/Icons/check-circle.tsx +++ b/src/components/Global/Icons/check-circle.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const CheckCircleIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/check.tsx b/src/components/Global/Icons/check.tsx index d50c6e9fe..a82b54413 100644 --- a/src/components/Global/Icons/check.tsx +++ b/src/components/Global/Icons/check.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const CheckIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/chevron-down.tsx b/src/components/Global/Icons/chevron-down.tsx index c1a7ca5fd..e7b081ea7 100644 --- a/src/components/Global/Icons/chevron-down.tsx +++ b/src/components/Global/Icons/chevron-down.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ChevronDownIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/chevron-up.tsx b/src/components/Global/Icons/chevron-up.tsx index a19a12161..8b406bed4 100644 --- a/src/components/Global/Icons/chevron-up.tsx +++ b/src/components/Global/Icons/chevron-up.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' interface ChevronUpIconProps extends SVGProps { size?: number | string diff --git a/src/components/Global/Icons/clip.tsx b/src/components/Global/Icons/clip.tsx index 253a79f89..690e34249 100644 --- a/src/components/Global/Icons/clip.tsx +++ b/src/components/Global/Icons/clip.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ClipIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/clock.tsx b/src/components/Global/Icons/clock.tsx index 277a2e2cb..e1856c2b2 100644 --- a/src/components/Global/Icons/clock.tsx +++ b/src/components/Global/Icons/clock.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ClockIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/copy.tsx b/src/components/Global/Icons/copy.tsx index 24e0d3ee3..dcc865e82 100644 --- a/src/components/Global/Icons/copy.tsx +++ b/src/components/Global/Icons/copy.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const CopyIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/currency.tsx b/src/components/Global/Icons/currency.tsx index 933c9da2d..19923759f 100644 --- a/src/components/Global/Icons/currency.tsx +++ b/src/components/Global/Icons/currency.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const CurrencyIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/docs.tsx b/src/components/Global/Icons/docs.tsx index c675680af..42d92ea69 100644 --- a/src/components/Global/Icons/docs.tsx +++ b/src/components/Global/Icons/docs.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const DocsIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/dollar.tsx b/src/components/Global/Icons/dollar.tsx index 2400b9fd8..685dda252 100644 --- a/src/components/Global/Icons/dollar.tsx +++ b/src/components/Global/Icons/dollar.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const DollarIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/double-check.tsx b/src/components/Global/Icons/double-check.tsx index 4e4c831e1..8351fee65 100644 --- a/src/components/Global/Icons/double-check.tsx +++ b/src/components/Global/Icons/double-check.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const DoubleCheckIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/download.tsx b/src/components/Global/Icons/download.tsx index 0825df7d4..08914a778 100644 --- a/src/components/Global/Icons/download.tsx +++ b/src/components/Global/Icons/download.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const DownloadIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/error.tsx b/src/components/Global/Icons/error.tsx index 9f08ea96b..c80769a06 100644 --- a/src/components/Global/Icons/error.tsx +++ b/src/components/Global/Icons/error.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ErrorIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/exchange-arrows.tsx b/src/components/Global/Icons/exchange-arrows.tsx index 4d94fe06e..33c7f91ad 100644 --- a/src/components/Global/Icons/exchange-arrows.tsx +++ b/src/components/Global/Icons/exchange-arrows.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ExchangeArrowsIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/exchange.tsx b/src/components/Global/Icons/exchange.tsx index f1146b66c..14bec6045 100644 --- a/src/components/Global/Icons/exchange.tsx +++ b/src/components/Global/Icons/exchange.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ExchangeIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/external-link.tsx b/src/components/Global/Icons/external-link.tsx index 51d4e08a4..198019024 100644 --- a/src/components/Global/Icons/external-link.tsx +++ b/src/components/Global/Icons/external-link.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ExternalLinkIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/eye-slash.tsx b/src/components/Global/Icons/eye-slash.tsx index 7ea3336ff..8389ac01c 100644 --- a/src/components/Global/Icons/eye-slash.tsx +++ b/src/components/Global/Icons/eye-slash.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const EyeSlashIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/eye.tsx b/src/components/Global/Icons/eye.tsx index 5ffbc8154..0df7d81d4 100644 --- a/src/components/Global/Icons/eye.tsx +++ b/src/components/Global/Icons/eye.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const EyeIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/failed.tsx b/src/components/Global/Icons/failed.tsx index 3bc137bd2..4e29c31e9 100644 --- a/src/components/Global/Icons/failed.tsx +++ b/src/components/Global/Icons/failed.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const FailedIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/fees.tsx b/src/components/Global/Icons/fees.tsx index 0b2fee362..15de393d6 100644 --- a/src/components/Global/Icons/fees.tsx +++ b/src/components/Global/Icons/fees.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const FeesIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/gift.tsx b/src/components/Global/Icons/gift.tsx index 49605bb88..e56f1eb2e 100644 --- a/src/components/Global/Icons/gift.tsx +++ b/src/components/Global/Icons/gift.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const GiftIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/history.tsx b/src/components/Global/Icons/history.tsx index d24cc1445..c246888b5 100644 --- a/src/components/Global/Icons/history.tsx +++ b/src/components/Global/Icons/history.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const HistoryIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/home.tsx b/src/components/Global/Icons/home.tsx index d8a9d640c..8297f140c 100644 --- a/src/components/Global/Icons/home.tsx +++ b/src/components/Global/Icons/home.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const HomeIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/invite-heart.tsx b/src/components/Global/Icons/invite-heart.tsx index 475fc61a9..0cc49dc0e 100644 --- a/src/components/Global/Icons/invite-heart.tsx +++ b/src/components/Global/Icons/invite-heart.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const InviteHeartIcon: FC> = (props) => { return ( diff --git a/src/components/Global/Icons/link-slash.tsx b/src/components/Global/Icons/link-slash.tsx index 98cd3cf65..8c5a35bc6 100644 --- a/src/components/Global/Icons/link-slash.tsx +++ b/src/components/Global/Icons/link-slash.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const LinkSlashIcon: FC> = (props) => { return ( diff --git a/src/components/Global/Icons/link.tsx b/src/components/Global/Icons/link.tsx index 53ec643df..01a493220 100644 --- a/src/components/Global/Icons/link.tsx +++ b/src/components/Global/Icons/link.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const LinkIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/lock.tsx b/src/components/Global/Icons/lock.tsx index 5467d8b67..d314edc7c 100644 --- a/src/components/Global/Icons/lock.tsx +++ b/src/components/Global/Icons/lock.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const LockIcon: FC> = (props) => { return ( diff --git a/src/components/Global/Icons/logout.tsx b/src/components/Global/Icons/logout.tsx index bb2ea8a47..a1015347d 100644 --- a/src/components/Global/Icons/logout.tsx +++ b/src/components/Global/Icons/logout.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const LogoutIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/mobile-install.tsx b/src/components/Global/Icons/mobile-install.tsx index 90f793f88..cdd72d557 100644 --- a/src/components/Global/Icons/mobile-install.tsx +++ b/src/components/Global/Icons/mobile-install.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const MobileInstallIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/paper-clip.tsx b/src/components/Global/Icons/paper-clip.tsx index 39aac393b..f7f618bf0 100644 --- a/src/components/Global/Icons/paper-clip.tsx +++ b/src/components/Global/Icons/paper-clip.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const PaperClipIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/peanut-support.tsx b/src/components/Global/Icons/peanut-support.tsx index 4dbf82008..57665ab88 100644 --- a/src/components/Global/Icons/peanut-support.tsx +++ b/src/components/Global/Icons/peanut-support.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const PeanutSupportIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/pending.tsx b/src/components/Global/Icons/pending.tsx index 54aebd226..299421457 100644 --- a/src/components/Global/Icons/pending.tsx +++ b/src/components/Global/Icons/pending.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const PendingIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/plus.tsx b/src/components/Global/Icons/plus.tsx index dc52c625b..e6cc1157c 100644 --- a/src/components/Global/Icons/plus.tsx +++ b/src/components/Global/Icons/plus.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const PlusIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/processing.tsx b/src/components/Global/Icons/processing.tsx index 7d7c166f1..250893889 100644 --- a/src/components/Global/Icons/processing.tsx +++ b/src/components/Global/Icons/processing.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ProcessingIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/qr-code.tsx b/src/components/Global/Icons/qr-code.tsx index 1684fe637..bfa188f4a 100644 --- a/src/components/Global/Icons/qr-code.tsx +++ b/src/components/Global/Icons/qr-code.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const QrCodeIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/question-mark.tsx b/src/components/Global/Icons/question-mark.tsx index 36ee87657..dc5393e71 100644 --- a/src/components/Global/Icons/question-mark.tsx +++ b/src/components/Global/Icons/question-mark.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const QuestionMarkIcon: FC> = (props) => { return ( diff --git a/src/components/Global/Icons/retry.tsx b/src/components/Global/Icons/retry.tsx index 8101f14a8..6cde21a33 100644 --- a/src/components/Global/Icons/retry.tsx +++ b/src/components/Global/Icons/retry.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const RetryIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/search.tsx b/src/components/Global/Icons/search.tsx index c5cd646fc..1aa36d80e 100644 --- a/src/components/Global/Icons/search.tsx +++ b/src/components/Global/Icons/search.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const SearchIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/share.tsx b/src/components/Global/Icons/share.tsx index 87c9904ca..a4d229380 100644 --- a/src/components/Global/Icons/share.tsx +++ b/src/components/Global/Icons/share.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ShareIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/shield.tsx b/src/components/Global/Icons/shield.tsx index ca699c70d..14e31704f 100644 --- a/src/components/Global/Icons/shield.tsx +++ b/src/components/Global/Icons/shield.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const ShieldIcon: FC> = (props) => { return ( diff --git a/src/components/Global/Icons/smile.tsx b/src/components/Global/Icons/smile.tsx index 989aa58be..be3abe08a 100644 --- a/src/components/Global/Icons/smile.tsx +++ b/src/components/Global/Icons/smile.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const SmileIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/star.tsx b/src/components/Global/Icons/star.tsx index 818ef438d..7b51887bf 100644 --- a/src/components/Global/Icons/star.tsx +++ b/src/components/Global/Icons/star.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const StarIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/success.tsx b/src/components/Global/Icons/success.tsx index 154c36b97..490e623fe 100644 --- a/src/components/Global/Icons/success.tsx +++ b/src/components/Global/Icons/success.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const SuccessIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/switch.tsx b/src/components/Global/Icons/switch.tsx index 7ac08abad..b9c1b94ac 100644 --- a/src/components/Global/Icons/switch.tsx +++ b/src/components/Global/Icons/switch.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const SwitchIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/trophy.tsx b/src/components/Global/Icons/trophy.tsx index 53f944c8f..c44de0b4b 100644 --- a/src/components/Global/Icons/trophy.tsx +++ b/src/components/Global/Icons/trophy.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const TrophyIcon: FC> = (props) => { return ( diff --git a/src/components/Global/Icons/txn-off.tsx b/src/components/Global/Icons/txn-off.tsx index 05328d81f..109d51614 100644 --- a/src/components/Global/Icons/txn-off.tsx +++ b/src/components/Global/Icons/txn-off.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const TxnOffIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/user-id.tsx b/src/components/Global/Icons/user-id.tsx index f99abfd0e..c2cb8772c 100644 --- a/src/components/Global/Icons/user-id.tsx +++ b/src/components/Global/Icons/user-id.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const UserIdIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/user-plus.tsx b/src/components/Global/Icons/user-plus.tsx index 398e7528b..be07b67e0 100644 --- a/src/components/Global/Icons/user-plus.tsx +++ b/src/components/Global/Icons/user-plus.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const UserPlusIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/user.tsx b/src/components/Global/Icons/user.tsx index 49f623cae..2d9d23f21 100644 --- a/src/components/Global/Icons/user.tsx +++ b/src/components/Global/Icons/user.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const UserIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/wallet-cancel.tsx b/src/components/Global/Icons/wallet-cancel.tsx index 7304ff197..fb3139594 100644 --- a/src/components/Global/Icons/wallet-cancel.tsx +++ b/src/components/Global/Icons/wallet-cancel.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const WalletCancelIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/wallet-outline.tsx b/src/components/Global/Icons/wallet-outline.tsx index e3ab09494..ec1b12c15 100644 --- a/src/components/Global/Icons/wallet-outline.tsx +++ b/src/components/Global/Icons/wallet-outline.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const WalletOutlineIcon: FC> = (props) => ( diff --git a/src/components/Global/Icons/wallet.tsx b/src/components/Global/Icons/wallet.tsx index 983db1724..92fa1ab93 100644 --- a/src/components/Global/Icons/wallet.tsx +++ b/src/components/Global/Icons/wallet.tsx @@ -1,4 +1,4 @@ -import { FC, SVGProps } from 'react' +import { type FC, type SVGProps } from 'react' export const WalletIcon: FC> = (props) => ( <> diff --git a/src/components/Global/IframeWrapper/index.tsx b/src/components/Global/IframeWrapper/index.tsx index a4b371ae9..1e0c6ca21 100644 --- a/src/components/Global/IframeWrapper/index.tsx +++ b/src/components/Global/IframeWrapper/index.tsx @@ -1,7 +1,7 @@ import { useEffect, useMemo, useState } from 'react' import Modal from '../Modal' -import { Button, ButtonVariant } from '@/components/0_Bruddle' -import { Icon, IconName } from '../Icons/Icon' +import { Button, type ButtonVariant } from '@/components/0_Bruddle' +import { Icon, type IconName } from '../Icons/Icon' import ActionModal from '../ActionModal' import { useRouter } from 'next/navigation' import StartVerificationView from './StartVerificationView' diff --git a/src/components/Global/Image/index.tsx b/src/components/Global/Image/index.tsx index 7c9d72470..6076c7d63 100644 --- a/src/components/Global/Image/index.tsx +++ b/src/components/Global/Image/index.tsx @@ -1,6 +1,6 @@ 'use client' import { useState } from 'react' -import { default as NextImage, ImageProps } from 'next/image' +import { default as NextImage, type ImageProps } from 'next/image' const Image = ({ className, ...props }: ImageProps) => { const [loaded, setLoaded] = useState(false) diff --git a/src/components/Global/MantecaDetailsCard/index.tsx b/src/components/Global/MantecaDetailsCard/index.tsx index 346d46413..67586b940 100644 --- a/src/components/Global/MantecaDetailsCard/index.tsx +++ b/src/components/Global/MantecaDetailsCard/index.tsx @@ -1,6 +1,6 @@ -import React, { FC } from 'react' +import React, { type FC } from 'react' import Card from '../Card' -import { PaymentInfoRow, PaymentInfoRowProps } from '@/components/Payment/PaymentInfoRow' +import { PaymentInfoRow, type PaymentInfoRowProps } from '@/components/Payment/PaymentInfoRow' export interface MantecaCardRow extends PaymentInfoRowProps { key: React.Key diff --git a/src/components/Global/NavHeader/index.tsx b/src/components/Global/NavHeader/index.tsx index e62ec2d43..af01e93b3 100644 --- a/src/components/Global/NavHeader/index.tsx +++ b/src/components/Global/NavHeader/index.tsx @@ -2,7 +2,7 @@ import { Button } from '@/components/0_Bruddle' import Link from 'next/link' import { twMerge } from 'tailwind-merge' -import { Icon, IconName } from '../Icons/Icon' +import { Icon, type IconName } from '../Icons/Icon' import { useAuth } from '@/context/authContext' interface NavHeaderProps { diff --git a/src/components/Global/NoMoreJailModal/index.tsx b/src/components/Global/NoMoreJailModal/index.tsx index 70a9cb1f8..2373f53a0 100644 --- a/src/components/Global/NoMoreJailModal/index.tsx +++ b/src/components/Global/NoMoreJailModal/index.tsx @@ -1,5 +1,5 @@ 'use client' -import React, { FC, useEffect, useState } from 'react' +import React, { type FC, useEffect, useState } from 'react' import Image from 'next/image' import { PEANUT_LOGO_BLACK, PEANUTMAN_LOGO } from '@/assets' import Modal from '../Modal' diff --git a/src/components/Global/PeanutActionDetailsCard/index.tsx b/src/components/Global/PeanutActionDetailsCard/index.tsx index 11ba1db68..df52aa665 100644 --- a/src/components/Global/PeanutActionDetailsCard/index.tsx +++ b/src/components/Global/PeanutActionDetailsCard/index.tsx @@ -1,13 +1,13 @@ -import AvatarWithBadge, { AvatarSize } from '@/components/Profile/AvatarWithBadge' +import AvatarWithBadge, { type AvatarSize } from '@/components/Profile/AvatarWithBadge' import { PEANUT_WALLET_TOKEN_SYMBOL } from '@/constants' -import { RecipientType } from '@/lib/url-parser/types/payment' +import { type RecipientType } from '@/lib/url-parser/types/payment' import { printableAddress } from '@/utils' import { AVATAR_TEXT_DARK, getColorForUsername } from '@/utils/color.utils' import { useCallback } from 'react' import { twMerge } from 'tailwind-merge' import Attachment from '../Attachment' import Card from '../Card' -import { Icon, IconName } from '../Icons/Icon' +import { Icon, type IconName } from '../Icons/Icon' import RouteExpiryTimer from '../RouteExpiryTimer' import Image, { type StaticImageData } from 'next/image' import Loading from '../Loading' diff --git a/src/components/Global/PostSignupActionManager/index.tsx b/src/components/Global/PostSignupActionManager/index.tsx index 5fb216350..c0c88ed7b 100644 --- a/src/components/Global/PostSignupActionManager/index.tsx +++ b/src/components/Global/PostSignupActionManager/index.tsx @@ -5,7 +5,7 @@ import { useRouter } from 'next/navigation' import { useEffect, useState } from 'react' import ActionModal from '../ActionModal' import { POST_SIGNUP_ACTIONS } from './post-signup-action.consts' -import { IconName } from '../Icons/Icon' +import { type IconName } from '../Icons/Icon' import { useAuth } from '@/context/authContext' export const PostSignupActionManager = ({ diff --git a/src/components/Global/PostSignupActionManager/post-signup-action.consts.ts b/src/components/Global/PostSignupActionManager/post-signup-action.consts.ts index 9682808a5..6496a2978 100644 --- a/src/components/Global/PostSignupActionManager/post-signup-action.consts.ts +++ b/src/components/Global/PostSignupActionManager/post-signup-action.consts.ts @@ -1,4 +1,4 @@ -import { IconName } from '../Icons/Icon' +import { type IconName } from '../Icons/Icon' export const POST_SIGNUP_ACTIONS = [ { diff --git a/src/components/Global/RewardsModal/index.tsx b/src/components/Global/RewardsModal/index.tsx index 063592735..9df918f6a 100644 --- a/src/components/Global/RewardsModal/index.tsx +++ b/src/components/Global/RewardsModal/index.tsx @@ -2,7 +2,7 @@ import { PEANUTMAN_RAISING_HANDS } from '@/assets' import { Button } from '@/components/0_Bruddle' import { useAuth } from '@/context/authContext' import { rewardsApi } from '@/services/rewards' -import { RewardLink } from '@/services/services.types' +import { type RewardLink } from '@/services/services.types' import { hitUserMetric } from '@/utils/metrics.utils' import Image from 'next/image' import Link from 'next/link' diff --git a/src/components/Global/StatusPill/index.tsx b/src/components/Global/StatusPill/index.tsx index a65b597d8..1daec7db8 100644 --- a/src/components/Global/StatusPill/index.tsx +++ b/src/components/Global/StatusPill/index.tsx @@ -1,6 +1,6 @@ -import { Icon, IconName } from '../Icons/Icon' +import { Icon, type IconName } from '../Icons/Icon' import { twMerge } from 'tailwind-merge' -import { StatusType } from '../Badges/StatusBadge' +import { type StatusType } from '../Badges/StatusBadge' export type StatusPillType = Exclude diff --git a/src/components/Global/SuccessViewComponents/SuccessViewDetailsCard.tsx b/src/components/Global/SuccessViewComponents/SuccessViewDetailsCard.tsx index 568b6f6bb..814f5a55a 100644 --- a/src/components/Global/SuccessViewComponents/SuccessViewDetailsCard.tsx +++ b/src/components/Global/SuccessViewComponents/SuccessViewDetailsCard.tsx @@ -1,6 +1,6 @@ import { Card } from '@/components/0_Bruddle/Card' import React from 'react' -import StatusBadge, { StatusType } from '../Badges/StatusBadge' +import StatusBadge, { type StatusType } from '../Badges/StatusBadge' import { Icon } from '../Icons/Icon' interface SuccessViewDetailsCardProps { diff --git a/src/components/Global/TokenAndNetworkConfirmationModal/index.tsx b/src/components/Global/TokenAndNetworkConfirmationModal/index.tsx index 1f50efee7..eb5062de6 100644 --- a/src/components/Global/TokenAndNetworkConfirmationModal/index.tsx +++ b/src/components/Global/TokenAndNetworkConfirmationModal/index.tsx @@ -1,8 +1,8 @@ import ActionModal from '@/components/Global/ActionModal' import { Slider } from '@/components/Slider' import { ARBITRUM_ICON } from '@/assets' -import { NetworkConfig } from '@/components/Global/TokenSelector/TokenSelector.consts' -import { CryptoToken } from '@/components/AddMoney/consts' +import { type NetworkConfig } from '@/components/Global/TokenSelector/TokenSelector.consts' +import { type CryptoToken } from '@/components/AddMoney/consts' import Image from 'next/image' export default function TokenAndNetworkConfirmationModal({ diff --git a/src/components/Global/TokenSelector/Components/NetworkListView.tsx b/src/components/Global/TokenSelector/Components/NetworkListView.tsx index be23404fe..b1cc74475 100644 --- a/src/components/Global/TokenSelector/Components/NetworkListView.tsx +++ b/src/components/Global/TokenSelector/Components/NetworkListView.tsx @@ -2,7 +2,7 @@ import React, { useMemo } from 'react' import EmptyState from '../../EmptyStates/EmptyState' import NavHeader from '../../NavHeader' -import { NetworkConfig } from '../TokenSelector.consts' +import { type NetworkConfig } from '../TokenSelector.consts' import NetworkListItem from './NetworkListItem' import SearchInput from './SearchInput' diff --git a/src/components/Global/TokenSelector/Components/ScrollableList.tsx b/src/components/Global/TokenSelector/Components/ScrollableList.tsx index d17ec79f4..2703cc6c7 100644 --- a/src/components/Global/TokenSelector/Components/ScrollableList.tsx +++ b/src/components/Global/TokenSelector/Components/ScrollableList.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react' +import React, { type ReactNode } from 'react' import { twMerge } from 'tailwind-merge' interface ScrollableListProps { diff --git a/src/components/Global/TokenSelector/Components/TokenListItem.tsx b/src/components/Global/TokenSelector/Components/TokenListItem.tsx index c83e4d561..66315dae6 100644 --- a/src/components/Global/TokenSelector/Components/TokenListItem.tsx +++ b/src/components/Global/TokenSelector/Components/TokenListItem.tsx @@ -1,7 +1,7 @@ -import Card, { CardPosition } from '@/components/Global/Card' +import Card, { type CardPosition } from '@/components/Global/Card' import AvatarWithBadge from '@/components/Profile/AvatarWithBadge' import { tokenSelectorContext } from '@/context/tokenSelector.context' -import { IUserBalance } from '@/interfaces' +import { type IUserBalance } from '@/interfaces' import { formatAmountWithSignificantDigits, formatAmount } from '@/utils' import Image from 'next/image' import React, { useContext, useMemo, useState } from 'react' diff --git a/src/components/Global/TokenSelector/TokenSelector.tsx b/src/components/Global/TokenSelector/TokenSelector.tsx index 15264ea0e..f4308483b 100644 --- a/src/components/Global/TokenSelector/TokenSelector.tsx +++ b/src/components/Global/TokenSelector/TokenSelector.tsx @@ -1,19 +1,19 @@ 'use client' import Image from 'next/image' -import React, { ReactNode, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react' +import React, { type ReactNode, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react' import { twMerge } from 'tailwind-merge' import { Button } from '@/components/0_Bruddle' import Divider from '@/components/0_Bruddle/Divider' import { PEANUT_WALLET_CHAIN, PEANUT_WALLET_TOKEN } from '@/constants/zerodev.consts' import { tokenSelectorContext } from '@/context' -import { IToken, IUserBalance } from '@/interfaces' +import { type IToken, type IUserBalance } from '@/interfaces' import { areEvmAddressesEqual, formatTokenAmount, isNativeCurrency, getChainName } from '@/utils' import { SQUID_ETH_ADDRESS } from '@/utils/token.utils' import { useAppKit, useAppKitAccount, useDisconnect } from '@reown/appkit/react' import EmptyState from '../EmptyStates/EmptyState' -import { Icon, IconName } from '../Icons/Icon' +import { Icon, type IconName } from '../Icons/Icon' import NetworkButton from './Components/NetworkButton' import NetworkListView from './Components/NetworkListView' import ScrollableList from './Components/ScrollableList' diff --git a/src/components/Global/USBankAccountInput/index.tsx b/src/components/Global/USBankAccountInput/index.tsx index 764f929dc..dbded81ad 100644 --- a/src/components/Global/USBankAccountInput/index.tsx +++ b/src/components/Global/USBankAccountInput/index.tsx @@ -1,6 +1,6 @@ import { sanitizeBankAccount } from '@/utils/format.utils' import { useState } from 'react' -import { UseFormRegister, UseFormSetValue } from 'react-hook-form' +import { type UseFormRegister, type UseFormSetValue } from 'react-hook-form' interface IUSBankAccountInputProps { register: UseFormRegister diff --git a/src/components/Global/UnsupportedBrowserModal/index.tsx b/src/components/Global/UnsupportedBrowserModal/index.tsx index 9813d480e..a344920e7 100644 --- a/src/components/Global/UnsupportedBrowserModal/index.tsx +++ b/src/components/Global/UnsupportedBrowserModal/index.tsx @@ -1,8 +1,8 @@ 'use client' -import ActionModal, { ActionModalButtonProps } from '@/components/Global/ActionModal' +import ActionModal, { type ActionModalButtonProps } from '@/components/Global/ActionModal' import { useToast } from '@/components/0_Bruddle/Toast' -import { IconName } from '@/components/Global/Icons/Icon' +import { type IconName } from '@/components/Global/Icons/Icon' import { copyTextToClipboardWithFallback } from '@/utils/general.utils' import { useEffect, useState, Suspense } from 'react' import { useSearchParams } from 'next/navigation' diff --git a/src/components/Global/ValidatedInput/index.tsx b/src/components/Global/ValidatedInput/index.tsx index a7a1f4c7d..010f4b19b 100644 --- a/src/components/Global/ValidatedInput/index.tsx +++ b/src/components/Global/ValidatedInput/index.tsx @@ -2,7 +2,7 @@ import BaseInput from '@/components/0_Bruddle/BaseInput' import MoreInfo from '@/components/Global/MoreInfo' import { useDebounce } from '@/hooks/useDebounce' import * as Sentry from '@sentry/nextjs' -import { ChangeEvent, useEffect, useRef, useState } from 'react' +import { type ChangeEvent, useEffect, useRef, useState } from 'react' import { twMerge } from 'tailwind-merge' import { Icon } from '../Icons/Icon' import Loading from '../Loading' diff --git a/src/components/Global/WalletNavigation/index.tsx b/src/components/Global/WalletNavigation/index.tsx index aa3793445..8d4db7547 100644 --- a/src/components/Global/WalletNavigation/index.tsx +++ b/src/components/Global/WalletNavigation/index.tsx @@ -1,6 +1,6 @@ import { PEANUT_LOGO } from '@/assets' import DirectSendQr from '@/components/Global/DirectSendQR' -import { Icon, IconName, Icon as NavIcon } from '@/components/Global/Icons/Icon' +import { Icon, type IconName, Icon as NavIcon } from '@/components/Global/Icons/Icon' import underMaintenanceConfig from '@/config/underMaintenance.config' import { useSupportModalContext } from '@/context/SupportModalContext' import { useUserStore } from '@/redux/hooks' diff --git a/src/components/Home/AddMoneyPromptModal/index.tsx b/src/components/Home/AddMoneyPromptModal/index.tsx index d0cb91565..97e4250c0 100644 --- a/src/components/Home/AddMoneyPromptModal/index.tsx +++ b/src/components/Home/AddMoneyPromptModal/index.tsx @@ -1,7 +1,7 @@ 'use client' import { PEANUTMAN_WAVING } from '@/assets' -import ActionModal, { ActionModalButtonProps } from '@/components/Global/ActionModal' +import ActionModal, { type ActionModalButtonProps } from '@/components/Global/ActionModal' import Image from 'next/image' import { useRouter } from 'next/navigation' diff --git a/src/components/Home/HomeBanners/BannerCard.tsx b/src/components/Home/HomeBanners/BannerCard.tsx index 1b26547eb..3b36ccd16 100644 --- a/src/components/Home/HomeBanners/BannerCard.tsx +++ b/src/components/Home/HomeBanners/BannerCard.tsx @@ -1,7 +1,7 @@ 'use client' import { Card } from '@/components/0_Bruddle' -import { Icon, IconName } from '@/components/Global/Icons/Icon' +import { Icon, type IconName } from '@/components/Global/Icons/Icon' import React from 'react' interface BannerCardProps { diff --git a/src/components/Home/HomeBanners/index.tsx b/src/components/Home/HomeBanners/index.tsx index bf4ffd6ba..81a0ea0d9 100644 --- a/src/components/Home/HomeBanners/index.tsx +++ b/src/components/Home/HomeBanners/index.tsx @@ -3,7 +3,7 @@ import Carousel from '@/components/Global/Carousel' import BannerCard from './BannerCard' import NotificationBanner from '@/components/Notifications/NotificationBanner' -import { IconName } from '@/components/Global/Icons/Icon' +import { type IconName } from '@/components/Global/Icons/Icon' import { useBanners } from '@/hooks/useBanners' const HomeBanners = () => { diff --git a/src/components/Home/HomeHistory.tsx b/src/components/Home/HomeHistory.tsx index 03f99d320..9c3f0bfc4 100644 --- a/src/components/Home/HomeHistory.tsx +++ b/src/components/Home/HomeHistory.tsx @@ -4,17 +4,17 @@ import Icon from '@/components/Global/Icon' import TransactionCard from '@/components/TransactionDetails/TransactionCard' import { mapTransactionDataForDrawer } from '@/components/TransactionDetails/transactionTransformer' import { BASE_URL } from '@/constants' -import { EHistoryEntryType, HistoryEntry, useTransactionHistory } from '@/hooks/useTransactionHistory' +import { EHistoryEntryType, type HistoryEntry, useTransactionHistory } from '@/hooks/useTransactionHistory' import { useWebSocket } from '@/hooks/useWebSocket' import { useUserStore } from '@/redux/hooks' import * as Sentry from '@sentry/nextjs' import Link from 'next/link' import { useCallback, useEffect, useMemo, useState } from 'react' import { twMerge } from 'tailwind-merge' -import Card, { CardPosition, getCardPosition } from '../Global/Card' +import Card, { type CardPosition, getCardPosition } from '../Global/Card' import EmptyState from '../Global/EmptyStates/EmptyState' import { KycStatusItem } from '../Kyc/KycStatusItem' -import { isKycStatusItem, KycHistoryEntry } from '@/hooks/useBridgeKycFlow' +import { isKycStatusItem, type KycHistoryEntry } from '@/hooks/useBridgeKycFlow' import { useWallet } from '@/hooks/wallet/useWallet' import { useUserInteractions } from '@/hooks/useUserInteractions' diff --git a/src/components/Home/ReferralCampaignModal/index.tsx b/src/components/Home/ReferralCampaignModal/index.tsx index 32f6f0012..8fbccc508 100644 --- a/src/components/Home/ReferralCampaignModal/index.tsx +++ b/src/components/Home/ReferralCampaignModal/index.tsx @@ -1,7 +1,7 @@ 'use client' import { PEANUTMAN_WAVING } from '@/assets' -import ActionModal, { ActionModalButtonProps } from '@/components/Global/ActionModal' +import ActionModal, { type ActionModalButtonProps } from '@/components/Global/ActionModal' import Image from 'next/image' import { useRouter } from 'next/navigation' diff --git a/src/components/Kyc/InitiateBridgeKYCModal.tsx b/src/components/Kyc/InitiateBridgeKYCModal.tsx index ec822e8e2..8fbca218c 100644 --- a/src/components/Kyc/InitiateBridgeKYCModal.tsx +++ b/src/components/Kyc/InitiateBridgeKYCModal.tsx @@ -2,7 +2,7 @@ import ActionModal from '@/components/Global/ActionModal' import { useBridgeKycFlow } from '@/hooks/useBridgeKycFlow' import IframeWrapper from '@/components/Global/IframeWrapper' import { KycVerificationInProgressModal } from './KycVerificationInProgressModal' -import { IconName } from '@/components/Global/Icons/Icon' +import { type IconName } from '@/components/Global/Icons/Icon' import { saveRedirectUrl } from '@/utils' import useClaimLink from '../Claim/useClaimLink' diff --git a/src/components/Kyc/InitiateMantecaKYCModal.tsx b/src/components/Kyc/InitiateMantecaKYCModal.tsx index 486383168..ca854e913 100644 --- a/src/components/Kyc/InitiateMantecaKYCModal.tsx +++ b/src/components/Kyc/InitiateMantecaKYCModal.tsx @@ -2,9 +2,9 @@ import ActionModal from '@/components/Global/ActionModal' import IframeWrapper from '@/components/Global/IframeWrapper' -import { IconName } from '@/components/Global/Icons/Icon' +import { type IconName } from '@/components/Global/Icons/Icon' import { useMantecaKycFlow } from '@/hooks/useMantecaKycFlow' -import { CountryData } from '@/components/AddMoney/consts' +import { type CountryData } from '@/components/AddMoney/consts' import { Button } from '../0_Bruddle' import { PeanutDoesntStoreAnyPersonalInformation } from './KycVerificationInProgressModal' import { useEffect } from 'react' diff --git a/src/components/Kyc/KycFlow.tsx b/src/components/Kyc/KycFlow.tsx index 383c699ea..88795f515 100644 --- a/src/components/Kyc/KycFlow.tsx +++ b/src/components/Kyc/KycFlow.tsx @@ -1,4 +1,4 @@ -import { Button, ButtonProps } from '@/components/0_Bruddle/Button' +import { Button, type ButtonProps } from '@/components/0_Bruddle/Button' import IframeWrapper from '@/components/Global/IframeWrapper' import { useBridgeKycFlow } from '@/hooks/useBridgeKycFlow' diff --git a/src/components/Kyc/KycStatusDrawer.tsx b/src/components/Kyc/KycStatusDrawer.tsx index de961f4be..f3c72f204 100644 --- a/src/components/Kyc/KycStatusDrawer.tsx +++ b/src/components/Kyc/KycStatusDrawer.tsx @@ -4,13 +4,13 @@ import { KycFailed } from './states/KycFailed' import { KycProcessing } from './states/KycProcessing' import PeanutLoading from '@/components/Global/PeanutLoading' import { Drawer, DrawerContent, DrawerTitle } from '../Global/Drawer' -import { BridgeKycStatus } from '@/utils' +import { type BridgeKycStatus } from '@/utils' import { getKycDetails } from '@/app/actions/users' -import { IUserKycVerification, MantecaKycStatus } from '@/interfaces' +import { type IUserKycVerification, MantecaKycStatus } from '@/interfaces' import { useUserStore } from '@/redux/hooks' import { useBridgeKycFlow } from '@/hooks/useBridgeKycFlow' import { useMantecaKycFlow } from '@/hooks/useMantecaKycFlow' -import { CountryData, countryData } from '@/components/AddMoney/consts' +import { type CountryData, countryData } from '@/components/AddMoney/consts' import IFrameWrapper from '@/components/Global/IframeWrapper' // a helper to categorize the kyc status from the user object diff --git a/src/components/Kyc/KycStatusItem.tsx b/src/components/Kyc/KycStatusItem.tsx index ac4780fd8..7da995120 100644 --- a/src/components/Kyc/KycStatusItem.tsx +++ b/src/components/Kyc/KycStatusItem.tsx @@ -1,14 +1,14 @@ import { useState, useMemo, useCallback } from 'react' -import Card, { CardPosition } from '@/components/Global/Card' +import Card, { type CardPosition } from '@/components/Global/Card' import { KycStatusDrawer } from './KycStatusDrawer' import { useUserStore } from '@/redux/hooks' import AvatarWithBadge from '../Profile/AvatarWithBadge' -import StatusBadge, { StatusType } from '../Global/Badges/StatusBadge' +import StatusBadge, { type StatusType } from '../Global/Badges/StatusBadge' import { useWebSocket } from '@/hooks/useWebSocket' -import { BridgeKycStatus, formatDate } from '@/utils' -import { HTMLAttributes } from 'react' +import { type BridgeKycStatus, formatDate } from '@/utils' +import { type HTMLAttributes } from 'react' import { twMerge } from 'tailwind-merge' -import { IUserKycVerification } from '@/interfaces' +import { type IUserKycVerification } from '@/interfaces' // this component shows the current kyc status and opens a drawer with more details on click export const KycStatusItem = ({ diff --git a/src/components/Kyc/KycVerificationInProgressModal.tsx b/src/components/Kyc/KycVerificationInProgressModal.tsx index 526798964..179d5254d 100644 --- a/src/components/Kyc/KycVerificationInProgressModal.tsx +++ b/src/components/Kyc/KycVerificationInProgressModal.tsx @@ -1,6 +1,6 @@ import { useRouter } from 'next/navigation' import ActionModal from '@/components/Global/ActionModal' -import { Icon, IconName } from '@/components/Global/Icons/Icon' +import { Icon, type IconName } from '@/components/Global/Icons/Icon' import { twMerge } from 'tailwind-merge' interface KycVerificationInProgressModalProps { diff --git a/src/components/LandingPage/faq.tsx b/src/components/LandingPage/faq.tsx index 7a7ce6285..f47d3d668 100644 --- a/src/components/LandingPage/faq.tsx +++ b/src/components/LandingPage/faq.tsx @@ -4,7 +4,7 @@ import { Eyes, PeanutsBG } from '@/assets' import { MarqueeComp } from '@/components/Global/MarqueeWrapper' import { Box } from '@chakra-ui/react' import { useState } from 'react' -import { FAQsPanel, FAQsProps } from '../Global/FAQs' +import { FAQsPanel, type FAQsProps } from '../Global/FAQs' type LocalFAQsProps = FAQsProps & { marquee: { diff --git a/src/components/Payment/PaymentForm/index.tsx b/src/components/Payment/PaymentForm/index.tsx index 2f3d8d0eb..63446914f 100644 --- a/src/components/Payment/PaymentForm/index.tsx +++ b/src/components/Payment/PaymentForm/index.tsx @@ -8,7 +8,7 @@ import ActionModal from '@/components/Global/ActionModal' import AddressLink from '@/components/Global/AddressLink' import ErrorAlert from '@/components/Global/ErrorAlert' import FileUploadInput from '@/components/Global/FileUploadInput' -import { IconName } from '@/components/Global/Icons/Icon' +import { type IconName } from '@/components/Global/Icons/Icon' import NavHeader from '@/components/Global/NavHeader' import TokenAmountInput from '@/components/Global/TokenAmountInput' import UserCard from '@/components/User/UserCard' @@ -16,9 +16,9 @@ import { PEANUT_WALLET_TOKEN, PEANUT_WALLET_TOKEN_DECIMALS } from '@/constants' import { tokenSelectorContext } from '@/context' import { useAuth } from '@/context/authContext' import { useRequestFulfillmentFlow } from '@/context/RequestFulfillmentFlowContext' -import { InitiatePaymentPayload, usePaymentInitiator } from '@/hooks/usePaymentInitiator' +import { type InitiatePaymentPayload, usePaymentInitiator } from '@/hooks/usePaymentInitiator' import { useWallet } from '@/hooks/wallet/useWallet' -import { ParsedURL } from '@/lib/url-parser/types/payment' +import { type ParsedURL } from '@/lib/url-parser/types/payment' import { useAppDispatch, usePaymentStore } from '@/redux/hooks' import { paymentActions } from '@/redux/slices/payment-slice' import { walletActions } from '@/redux/slices/wallet-slice' @@ -31,7 +31,7 @@ import { formatUnits } from 'viem' import { useAccount } from 'wagmi' import { useUserInteractions } from '@/hooks/useUserInteractions' import { useUserByUsername } from '@/hooks/useUserByUsername' -import { PaymentFlow } from '@/app/[...recipient]/client' +import { type PaymentFlow } from '@/app/[...recipient]/client' import MantecaFulfillment from '../Views/MantecaFulfillment.view' import { invitesApi } from '@/services/invites' import { EInviteType } from '@/services/services.types' diff --git a/src/components/Payment/Views/Confirm.payment.view.tsx b/src/components/Payment/Views/Confirm.payment.view.tsx index 4dd41cdad..966b4009c 100644 --- a/src/components/Payment/Views/Confirm.payment.view.tsx +++ b/src/components/Payment/Views/Confirm.payment.view.tsx @@ -5,7 +5,7 @@ import ActionModal from '@/components/Global/ActionModal' import Card from '@/components/Global/Card' import DisplayIcon from '@/components/Global/DisplayIcon' import ErrorAlert from '@/components/Global/ErrorAlert' -import { IconName } from '@/components/Global/Icons/Icon' +import { type IconName } from '@/components/Global/Icons/Icon' import NavHeader from '@/components/Global/NavHeader' import PeanutActionDetailsCard from '@/components/Global/PeanutActionDetailsCard' import PeanutLoading from '@/components/Global/PeanutLoading' diff --git a/src/components/Payment/Views/Initial.payment.view.tsx b/src/components/Payment/Views/Initial.payment.view.tsx index c3149fe11..09e3b16a5 100644 --- a/src/components/Payment/Views/Initial.payment.view.tsx +++ b/src/components/Payment/Views/Initial.payment.view.tsx @@ -1,4 +1,4 @@ -import { PaymentForm, PaymentFormProps } from '../PaymentForm' +import { PaymentForm, type PaymentFormProps } from '../PaymentForm' export default function InitialPaymentView(props: PaymentFormProps) { return ( diff --git a/src/components/Payment/Views/MantecaFulfillment.view.tsx b/src/components/Payment/Views/MantecaFulfillment.view.tsx index e9643e627..96f2f3879 100644 --- a/src/components/Payment/Views/MantecaFulfillment.view.tsx +++ b/src/components/Payment/Views/MantecaFulfillment.view.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState, useMemo } from 'react' -import { CountryData } from '@/components/AddMoney/consts' +import { type CountryData } from '@/components/AddMoney/consts' import MantecaDepositShareDetails from '@/components/AddMoney/components/MantecaDepositShareDetails' import PeanutLoading from '@/components/Global/PeanutLoading' import { MantecaGeoSpecificKycModal } from '@/components/Kyc/InitiateMantecaKYCModal' diff --git a/src/components/Payment/Views/Status.payment.view.tsx b/src/components/Payment/Views/Status.payment.view.tsx index 9464bc524..2be1980f6 100644 --- a/src/components/Payment/Views/Status.payment.view.tsx +++ b/src/components/Payment/Views/Status.payment.view.tsx @@ -7,22 +7,22 @@ import CreateAccountButton from '@/components/Global/CreateAccountButton' import { Icon } from '@/components/Global/Icons/Icon' import NavHeader from '@/components/Global/NavHeader' import { SoundPlayer } from '@/components/Global/SoundPlayer' -import { StatusPillType } from '@/components/Global/StatusPill' +import { type StatusPillType } from '@/components/Global/StatusPill' import { TransactionDetailsDrawer } from '@/components/TransactionDetails/TransactionDetailsDrawer' -import { TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' +import { type TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' import { TRANSACTIONS, BASE_URL } from '@/constants' import { useTokenChainIcons } from '@/hooks/useTokenChainIcons' import { useTransactionDetailsDrawer } from '@/hooks/useTransactionDetailsDrawer' import { EHistoryEntryType, EHistoryUserRole } from '@/hooks/useTransactionHistory' -import { RecipientType } from '@/lib/url-parser/types/payment' +import { type RecipientType } from '@/lib/url-parser/types/payment' import { usePaymentStore, useUserStore } from '@/redux/hooks' import { paymentActions } from '@/redux/slices/payment-slice' -import { ApiUser } from '@/services/users' +import { type ApiUser } from '@/services/users' import { formatAmount, getInitialsFromName, printableAddress } from '@/utils' import { useQueryClient } from '@tanstack/react-query' import Image from 'next/image' import { useRouter } from 'next/navigation' -import { ReactNode, useEffect, useMemo, useRef } from 'react' +import { type ReactNode, useEffect, useMemo, useRef } from 'react' import { useDispatch } from 'react-redux' import STAR_STRAIGHT_ICON from '@/assets/icons/starStraight.svg' import { usePointsConfetti } from '@/hooks/usePointsConfetti' diff --git a/src/components/Profile/AvatarWithBadge.tsx b/src/components/Profile/AvatarWithBadge.tsx index 410249741..348778681 100644 --- a/src/components/Profile/AvatarWithBadge.tsx +++ b/src/components/Profile/AvatarWithBadge.tsx @@ -2,8 +2,8 @@ import { getInitialsFromName } from '@/utils' import { getColorForUsername } from '@/utils/color.utils' import React, { useMemo } from 'react' import { twMerge } from 'tailwind-merge' -import { Icon, IconName } from '../Global/Icons/Icon' -import StatusPill, { StatusPillType } from '../Global/StatusPill' +import { Icon, type IconName } from '../Global/Icons/Icon' +import StatusPill, { type StatusPillType } from '../Global/StatusPill' import Image, { type StaticImageData } from 'next/image' export type AvatarSize = 'extra-small' | 'small' | 'medium' | 'large' diff --git a/src/components/Profile/components/ProfileMenuItem.tsx b/src/components/Profile/components/ProfileMenuItem.tsx index 8379b4f86..04b602b1b 100644 --- a/src/components/Profile/components/ProfileMenuItem.tsx +++ b/src/components/Profile/components/ProfileMenuItem.tsx @@ -1,6 +1,6 @@ import StatusBadge from '@/components/Global/Badges/StatusBadge' -import Card, { CardPosition } from '@/components/Global/Card' -import { Icon, IconName } from '@/components/Global/Icons/Icon' +import Card, { type CardPosition } from '@/components/Global/Card' +import { Icon, type IconName } from '@/components/Global/Icons/Icon' import NavigationArrow from '@/components/Global/NavigationArrow' import { Tooltip } from '@/components/Tooltip' import Link from 'next/link' diff --git a/src/components/Profile/views/IdentityVerification.view.tsx b/src/components/Profile/views/IdentityVerification.view.tsx index 98226e40f..0241c4fe1 100644 --- a/src/components/Profile/views/IdentityVerification.view.tsx +++ b/src/components/Profile/views/IdentityVerification.view.tsx @@ -2,7 +2,7 @@ import { updateUserById } from '@/app/actions/users' import { Button } from '@/components/0_Bruddle' import { BRIDGE_ALPHA3_TO_ALPHA2, MantecaSupportedExchanges } from '@/components/AddMoney/consts' -import { UserDetailsForm, UserDetailsFormData } from '@/components/AddMoney/UserDetailsForm' +import { UserDetailsForm, type UserDetailsFormData } from '@/components/AddMoney/UserDetailsForm' import { CountryList } from '@/components/Common/CountryList' import ErrorAlert from '@/components/Global/ErrorAlert' import IframeWrapper from '@/components/Global/IframeWrapper' diff --git a/src/components/Request/direct-request/views/Initial.direct.request.view.tsx b/src/components/Request/direct-request/views/Initial.direct.request.view.tsx index fce0ff7ad..a2f44c102 100644 --- a/src/components/Request/direct-request/views/Initial.direct.request.view.tsx +++ b/src/components/Request/direct-request/views/Initial.direct.request.view.tsx @@ -2,17 +2,17 @@ import { Button } from '@/components/0_Bruddle' import ErrorAlert from '@/components/Global/ErrorAlert' import FileUploadInput from '@/components/Global/FileUploadInput' -import GeneralRecipientInput, { GeneralRecipientUpdate } from '@/components/Global/GeneralRecipientInput' +import GeneralRecipientInput, { type GeneralRecipientUpdate } from '@/components/Global/GeneralRecipientInput' import NavHeader from '@/components/Global/NavHeader' import PeanutLoading from '@/components/Global/PeanutLoading' import TokenAmountInput from '@/components/Global/TokenAmountInput' -import ValidationErrorView, { ValidationErrorViewProps } from '@/components/Payment/Views/Error.validation.view' +import ValidationErrorView, { type ValidationErrorViewProps } from '@/components/Payment/Views/Error.validation.view' import DirectSuccessView from '@/components/Payment/Views/Status.payment.view' import UserCard from '@/components/User/UserCard' import { loadingStateContext } from '@/context' import { useWallet } from '@/hooks/wallet/useWallet' import { useUserStore } from '@/redux/hooks' -import { IAttachmentOptions } from '@/redux/types/send-flow.types' +import { type IAttachmentOptions } from '@/redux/types/send-flow.types' import { usersApi } from '@/services/users' import { formatAmount, printableUsdc } from '@/utils' import { captureException } from '@sentry/nextjs' diff --git a/src/components/Request/link/views/Create.request.link.view.tsx b/src/components/Request/link/views/Create.request.link.view.tsx index a5ab1ef2a..bfac90ad3 100644 --- a/src/components/Request/link/views/Create.request.link.view.tsx +++ b/src/components/Request/link/views/Create.request.link.view.tsx @@ -15,8 +15,8 @@ import * as context from '@/context' import { useAuth } from '@/context/authContext' import { useDebounce } from '@/hooks/useDebounce' import { useWallet } from '@/hooks/wallet/useWallet' -import { IToken } from '@/interfaces' -import { IAttachmentOptions } from '@/redux/types/send-flow.types' +import { type IToken } from '@/interfaces' +import { type IAttachmentOptions } from '@/redux/types/send-flow.types' import { chargesApi } from '@/services/charges' import { requestsApi } from '@/services/requests' import { fetchTokenSymbol, getRequestLink, isNativeCurrency, printableUsdc } from '@/utils' diff --git a/src/components/Request/views/ExternalWalletFulfilManager.tsx b/src/components/Request/views/ExternalWalletFulfilManager.tsx index cc58d7690..389ed9005 100644 --- a/src/components/Request/views/ExternalWalletFulfilManager.tsx +++ b/src/components/Request/views/ExternalWalletFulfilManager.tsx @@ -1,7 +1,7 @@ import { useRequestFulfillmentFlow } from '@/context/RequestFulfillmentFlowContext' import ExternalWalletFulfilMethods from './ExternalWalletFulfilMethods' import AddMoneyCryptoPage from '@/app/(mobile-ui)/add-money/crypto/page' -import { ParsedURL } from '@/lib/url-parser/types/payment' +import { type ParsedURL } from '@/lib/url-parser/types/payment' import { usePaymentStore } from '@/redux/hooks' import ConfirmPaymentView from '@/components/Payment/Views/Confirm.payment.view' import DirectSuccessView from '@/components/Payment/Views/Status.payment.view' diff --git a/src/components/Request/views/ExternalWalletFulfilMethods.tsx b/src/components/Request/views/ExternalWalletFulfilMethods.tsx index 93204103c..94acb7fd8 100644 --- a/src/components/Request/views/ExternalWalletFulfilMethods.tsx +++ b/src/components/Request/views/ExternalWalletFulfilMethods.tsx @@ -2,8 +2,8 @@ import { BINANCE_LOGO, LEMON_LOGO, RIPIO_LOGO } from '@/assets' import { METAMASK_LOGO, RAINBOW_LOGO, TRUST_WALLET_SMALL_LOGO } from '@/assets/wallets' import { MethodCard } from '@/components/Common/ActionList' import NavHeader from '@/components/Global/NavHeader' -import { PaymentMethod } from '@/constants/actionlist.consts' -import { ExternalWalletFulfilMethod, useRequestFulfillmentFlow } from '@/context/RequestFulfillmentFlowContext' +import { type PaymentMethod } from '@/constants/actionlist.consts' +import { type ExternalWalletFulfilMethod, useRequestFulfillmentFlow } from '@/context/RequestFulfillmentFlowContext' const methods: PaymentMethod[] = [ { diff --git a/src/components/Request/views/ReqFulfillBankFlowManager.tsx b/src/components/Request/views/ReqFulfillBankFlowManager.tsx index dc87f8b5b..561452b7f 100644 --- a/src/components/Request/views/ReqFulfillBankFlowManager.tsx +++ b/src/components/Request/views/ReqFulfillBankFlowManager.tsx @@ -4,7 +4,7 @@ import { useAuth } from '@/context/authContext' import { CountryListRouter } from '@/components/Common/CountryListRouter' import { RequestFulfillmentBankFlowStep, useRequestFulfillmentFlow } from '@/context/RequestFulfillmentFlowContext' import AddMoneyBankDetails from '@/components/AddMoney/components/AddMoneyBankDetails' -import { ParsedURL } from '@/lib/url-parser/types/payment' +import { type ParsedURL } from '@/lib/url-parser/types/payment' import { OnrampConfirmationModal } from '@/components/AddMoney/components/OnrampConfirmationModal' import { useCreateOnramp } from '@/hooks/useCreateOnramp' import { usePaymentStore } from '@/redux/hooks' @@ -17,7 +17,7 @@ import NavHeader from '@/components/Global/NavHeader' import ErrorAlert from '@/components/Global/ErrorAlert' import { Button } from '@/components/0_Bruddle' import { updateUserById } from '@/app/actions/users' -import { Address } from 'viem' +import { type Address } from 'viem' import { getCurrencyConfig, getMinimumAmount } from '@/utils/bridge.utils' import { getCurrencyPrice } from '@/app/actions/currency' diff --git a/src/components/SearchUsers/SearchResultCard.tsx b/src/components/SearchUsers/SearchResultCard.tsx index 7c5427e84..cd17039fd 100644 --- a/src/components/SearchUsers/SearchResultCard.tsx +++ b/src/components/SearchUsers/SearchResultCard.tsx @@ -1,4 +1,4 @@ -import Card, { CardPosition } from '@/components/Global/Card' +import Card, { type CardPosition } from '@/components/Global/Card' import { Icon } from '@/components/Global/Icons/Icon' import React from 'react' import { twMerge } from 'tailwind-merge' diff --git a/src/components/SearchUsers/SearchResults.tsx b/src/components/SearchUsers/SearchResults.tsx index 69bf89d7c..66aed8581 100644 --- a/src/components/SearchUsers/SearchResults.tsx +++ b/src/components/SearchUsers/SearchResults.tsx @@ -1,4 +1,4 @@ -import { ApiUser, RecentUser } from '@/services/users' +import { type ApiUser, type RecentUser } from '@/services/users' import { twMerge } from 'tailwind-merge' import Card from '../Global/Card' import EmptyState from '../Global/EmptyStates/EmptyState' diff --git a/src/components/Setup/Views/InstallPWA.tsx b/src/components/Setup/Views/InstallPWA.tsx index 6c271d0d2..a1773785a 100644 --- a/src/components/Setup/Views/InstallPWA.tsx +++ b/src/components/Setup/Views/InstallPWA.tsx @@ -4,7 +4,7 @@ import ErrorAlert from '@/components/Global/ErrorAlert' import { Icon } from '@/components/Global/Icons/Icon' import Modal from '@/components/Global/Modal' import QRCodeWrapper from '@/components/Global/QRCodeWrapper' -import { BeforeInstallPromptEvent, ScreenId } from '@/components/Setup/Setup.types' +import { type BeforeInstallPromptEvent, type ScreenId } from '@/components/Setup/Setup.types' import { useAuth } from '@/context/authContext' import { useSetupFlow } from '@/hooks/useSetupFlow' import { useRouter } from 'next/navigation' diff --git a/src/components/Setup/components/SetupWrapper.tsx b/src/components/Setup/components/SetupWrapper.tsx index 9a9ae9201..4838bab87 100644 --- a/src/components/Setup/components/SetupWrapper.tsx +++ b/src/components/Setup/components/SetupWrapper.tsx @@ -2,11 +2,11 @@ import starImage from '@/assets/icons/star.png' import { Button } from '@/components/0_Bruddle' import CloudsBackground from '@/components/0_Bruddle/CloudsBackground' import Icon from '@/components/Global/Icon' -import { BeforeInstallPromptEvent, LayoutType, ScreenId } from '@/components/Setup/Setup.types' +import { type BeforeInstallPromptEvent, type LayoutType, type ScreenId } from '@/components/Setup/Setup.types' import InstallPWA from '@/components/Setup/Views/InstallPWA' import classNames from 'classnames' import Image from 'next/image' -import { Children, ReactNode, cloneElement, memo, type ReactElement } from 'react' +import { Children, type ReactNode, cloneElement, memo, type ReactElement } from 'react' import { twMerge } from 'tailwind-merge' /** diff --git a/src/components/Setup/context/SetupFlowContext.tsx b/src/components/Setup/context/SetupFlowContext.tsx index a30f7500c..14935662e 100644 --- a/src/components/Setup/context/SetupFlowContext.tsx +++ b/src/components/Setup/context/SetupFlowContext.tsx @@ -1,5 +1,5 @@ -import { createContext, ReactNode, useContext, useState } from 'react' -import { ISetupStep, ScreenId, ScreenProps } from '../Setup.types' +import { createContext, type ReactNode, useContext, useState } from 'react' +import { type ISetupStep, type ScreenId, type ScreenProps } from '../Setup.types' interface SetupFlowContextType { currentStep: number diff --git a/src/components/Tooltip/index.tsx b/src/components/Tooltip/index.tsx index b7c665b01..3f2913e6f 100644 --- a/src/components/Tooltip/index.tsx +++ b/src/components/Tooltip/index.tsx @@ -3,7 +3,7 @@ import React, { useState, useRef, useEffect } from 'react' import ReactDOM from 'react-dom' import { twMerge } from 'tailwind-merge' -import { TooltipContent, TooltipPosition } from './TooltipContent' +import { TooltipContent, type TooltipPosition } from './TooltipContent' interface TooltipProps { content: string | React.ReactNode diff --git a/src/components/TransactionDetails/TransactionAvatarBadge.tsx b/src/components/TransactionDetails/TransactionAvatarBadge.tsx index 86556fe03..8fc4a8935 100644 --- a/src/components/TransactionDetails/TransactionAvatarBadge.tsx +++ b/src/components/TransactionDetails/TransactionAvatarBadge.tsx @@ -1,6 +1,6 @@ -import { IconName } from '@/components/Global/Icons/Icon' -import AvatarWithBadge, { AvatarSize } from '@/components/Profile/AvatarWithBadge' -import { TransactionType } from '@/components/TransactionDetails/TransactionCard' +import { type IconName } from '@/components/Global/Icons/Icon' +import AvatarWithBadge, { type AvatarSize } from '@/components/Profile/AvatarWithBadge' +import { type TransactionType } from '@/components/TransactionDetails/TransactionCard' import { AVATAR_LINK_BG, AVATAR_TEXT_DARK, @@ -10,7 +10,7 @@ import { } from '@/utils/color.utils' import React from 'react' import { isAddress } from 'viem' -import { StatusPillType } from '../Global/StatusPill' +import { type StatusPillType } from '../Global/StatusPill' interface TransactionAvatarBadgeProps { size?: AvatarSize diff --git a/src/components/TransactionDetails/TransactionCard.tsx b/src/components/TransactionDetails/TransactionCard.tsx index b7de83044..809da66ce 100644 --- a/src/components/TransactionDetails/TransactionCard.tsx +++ b/src/components/TransactionDetails/TransactionCard.tsx @@ -1,9 +1,9 @@ -import Card, { CardPosition } from '@/components/Global/Card' -import { Icon, IconName } from '@/components/Global/Icons/Icon' +import Card, { type CardPosition } from '@/components/Global/Card' +import { Icon, type IconName } from '@/components/Global/Icons/Icon' import TransactionAvatarBadge from '@/components/TransactionDetails/TransactionAvatarBadge' import { TransactionDetailsDrawer } from '@/components/TransactionDetails/TransactionDetailsDrawer' -import { TransactionDirection } from '@/components/TransactionDetails/TransactionDetailsHeaderCard' -import { TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' +import { type TransactionDirection } from '@/components/TransactionDetails/TransactionDetailsHeaderCard' +import { type TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' import { useTransactionDetailsDrawer } from '@/hooks/useTransactionDetailsDrawer' import { formatNumberForDisplay, @@ -16,11 +16,11 @@ import { } from '@/utils' import React from 'react' import Image from 'next/image' -import StatusPill, { StatusPillType } from '../Global/StatusPill' +import StatusPill, { type StatusPillType } from '../Global/StatusPill' import { VerifiedUserLabel } from '../UserHeader' import { isAddress } from 'viem' import { STAR_STRAIGHT_ICON } from '@/assets' -import { HistoryEntryPerk } from '@/services/services.types' +import { type HistoryEntryPerk } from '@/services/services.types' export type TransactionType = | 'send' diff --git a/src/components/TransactionDetails/TransactionDetailsDrawer.tsx b/src/components/TransactionDetails/TransactionDetailsDrawer.tsx index e78d86458..7a35889de 100644 --- a/src/components/TransactionDetails/TransactionDetailsDrawer.tsx +++ b/src/components/TransactionDetails/TransactionDetailsDrawer.tsx @@ -1,4 +1,4 @@ -import { TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' +import { type TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' import React, { useCallback, useRef, useState } from 'react' import { Drawer, DrawerContent, DrawerTitle } from '../Global/Drawer' import { TransactionDetailsReceipt } from './TransactionDetailsReceipt' diff --git a/src/components/TransactionDetails/TransactionDetailsHeaderCard.tsx b/src/components/TransactionDetails/TransactionDetailsHeaderCard.tsx index b7827a338..6dd9cbdf7 100644 --- a/src/components/TransactionDetails/TransactionDetailsHeaderCard.tsx +++ b/src/components/TransactionDetails/TransactionDetailsHeaderCard.tsx @@ -1,14 +1,14 @@ 'use client' -import StatusBadge, { StatusType } from '@/components/Global/Badges/StatusBadge' +import StatusBadge, { type StatusType } from '@/components/Global/Badges/StatusBadge' import TransactionAvatarBadge from '@/components/TransactionDetails/TransactionAvatarBadge' -import { TransactionType } from '@/components/TransactionDetails/TransactionCard' +import { type TransactionType } from '@/components/TransactionDetails/TransactionCard' import { printableAddress } from '@/utils' import Image from 'next/image' import React from 'react' import { isAddress as isWalletAddress } from 'viem' import Card from '../Global/Card' -import { Icon, IconName } from '../Global/Icons/Icon' +import { Icon, type IconName } from '../Global/Icons/Icon' import { VerifiedUserLabel } from '../UserHeader' export type TransactionDirection = diff --git a/src/components/TransactionDetails/TransactionDetailsReceipt.tsx b/src/components/TransactionDetails/TransactionDetailsReceipt.tsx index 72907357d..f82591dfd 100644 --- a/src/components/TransactionDetails/TransactionDetailsReceipt.tsx +++ b/src/components/TransactionDetails/TransactionDetailsReceipt.tsx @@ -2,7 +2,7 @@ import Card from '@/components/Global/Card' import { PaymentInfoRow } from '@/components/Payment/PaymentInfoRow' -import { TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' +import { type TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' import { TRANSACTIONS } from '@/constants/query.consts' import { EHistoryEntryType, EHistoryUserRole } from '@/hooks/useTransactionHistory' import { useWallet } from '@/hooks/wallet/useWallet' @@ -30,7 +30,7 @@ import MoreInfo from '../Global/MoreInfo' import CancelSendLinkModal from '../Global/CancelSendLinkModal' import { twMerge } from 'tailwind-merge' import { isAddress } from 'viem' -import { getBankAccountLabel, TransactionDetailsRowKey, transactionDetailsRowKeys } from './transaction-details.utils' +import { getBankAccountLabel, type TransactionDetailsRowKey, transactionDetailsRowKeys } from './transaction-details.utils' import { useSupportModalContext } from '@/context/SupportModalContext' import { useRouter } from 'next/navigation' import { countryData } from '@/components/AddMoney/consts' diff --git a/src/components/TransactionDetails/transactionTransformer.ts b/src/components/TransactionDetails/transactionTransformer.ts index 4b66aa2bb..675959754 100644 --- a/src/components/TransactionDetails/transactionTransformer.ts +++ b/src/components/TransactionDetails/transactionTransformer.ts @@ -1,7 +1,7 @@ -import { StatusType } from '@/components/Global/Badges/StatusBadge' -import { TransactionType as TransactionCardType } from '@/components/TransactionDetails/TransactionCard' -import { TransactionDirection } from '@/components/TransactionDetails/TransactionDetailsHeaderCard' -import { EHistoryEntryType, EHistoryUserRole, HistoryEntry } from '@/hooks/useTransactionHistory' +import { type StatusType } from '@/components/Global/Badges/StatusBadge' +import { type TransactionType as TransactionCardType } from '@/components/TransactionDetails/TransactionCard' +import { type TransactionDirection } from '@/components/TransactionDetails/TransactionDetailsHeaderCard' +import { EHistoryEntryType, EHistoryUserRole, type HistoryEntry } from '@/hooks/useTransactionHistory' import { getExplorerUrl, getInitialsFromName, @@ -10,10 +10,10 @@ import { getTokenLogo, getChainLogo, } from '@/utils/general.utils' -import { StatusPillType } from '../Global/StatusPill' +import { type StatusPillType } from '../Global/StatusPill' import type { Address } from 'viem' import { PEANUT_WALLET_CHAIN } from '@/constants' -import { HistoryEntryPerk } from '@/services/services.types' +import { type HistoryEntryPerk } from '@/services/services.types' /** * @fileoverview maps raw transaction history data from the api/hook to the format needed by ui components. diff --git a/src/components/User/UserCard.tsx b/src/components/User/UserCard.tsx index 9b0216a54..8bb913521 100644 --- a/src/components/User/UserCard.tsx +++ b/src/components/User/UserCard.tsx @@ -1,11 +1,11 @@ -import { RecipientType } from '@/lib/url-parser/types/payment' +import { type RecipientType } from '@/lib/url-parser/types/payment' import { AVATAR_TEXT_DARK, getColorForUsername } from '@/utils/color.utils' import { useCallback } from 'react' import AddressLink from '../Global/AddressLink' import Attachment from '../Global/Attachment' import Card from '../Global/Card' -import { Icon, IconName } from '../Global/Icons/Icon' -import AvatarWithBadge, { AvatarSize } from '../Profile/AvatarWithBadge' +import { Icon, type IconName } from '../Global/Icons/Icon' +import AvatarWithBadge, { type AvatarSize } from '../Profile/AvatarWithBadge' import { VerifiedUserLabel } from '../UserHeader' interface UserCardProps { diff --git a/src/components/Withdraw/views/Confirm.withdraw.view.tsx b/src/components/Withdraw/views/Confirm.withdraw.view.tsx index 35b33bd8f..d556a048a 100644 --- a/src/components/Withdraw/views/Confirm.withdraw.view.tsx +++ b/src/components/Withdraw/views/Confirm.withdraw.view.tsx @@ -9,7 +9,7 @@ import NavHeader from '@/components/Global/NavHeader' import PeanutActionDetailsCard from '@/components/Global/PeanutActionDetailsCard' import { PaymentInfoRow } from '@/components/Payment/PaymentInfoRow' import { useTokenChainIcons } from '@/hooks/useTokenChainIcons' -import { ITokenPriceData } from '@/interfaces' +import { type ITokenPriceData } from '@/interfaces' import { formatAmount, isStableCoin } from '@/utils' import { interfaces } from '@squirrel-labs/peanut-sdk' import { type PeanutCrossChainRoute } from '@/services/swap' diff --git a/src/components/Withdraw/views/Initial.withdraw.view.tsx b/src/components/Withdraw/views/Initial.withdraw.view.tsx index 683aa3b59..a7f51f7a1 100644 --- a/src/components/Withdraw/views/Initial.withdraw.view.tsx +++ b/src/components/Withdraw/views/Initial.withdraw.view.tsx @@ -2,13 +2,13 @@ import { Button } from '@/components/0_Bruddle/Button' import ErrorAlert from '@/components/Global/ErrorAlert' -import GeneralRecipientInput, { GeneralRecipientUpdate } from '@/components/Global/GeneralRecipientInput' +import GeneralRecipientInput, { type GeneralRecipientUpdate } from '@/components/Global/GeneralRecipientInput' import NavHeader from '@/components/Global/NavHeader' import PeanutActionDetailsCard from '@/components/Global/PeanutActionDetailsCard' import { PEANUT_WALLET_CHAIN, PEANUT_WALLET_TOKEN } from '@/constants' import { useWithdrawFlow } from '@/context/WithdrawFlowContext' import { tokenSelectorContext } from '@/context/tokenSelector.context' -import { ITokenPriceData } from '@/interfaces' +import { type ITokenPriceData } from '@/interfaces' import { formatAmount } from '@/utils/general.utils' import { interfaces } from '@squirrel-labs/peanut-sdk' import { useRouter } from 'next/navigation' diff --git a/src/components/og/PaymentCardOG.tsx b/src/components/og/PaymentCardOG.tsx index 4cb167b63..862cd8c0b 100644 --- a/src/components/og/PaymentCardOG.tsx +++ b/src/components/og/PaymentCardOG.tsx @@ -1,4 +1,4 @@ -import { PaymentLink } from '@/interfaces' +import { type PaymentLink } from '@/interfaces' function usernamePxWidth(name: string) { const charPx = 0.6 * 80 // β‰ˆ48 px per glyph diff --git a/src/components/og/ReceiptCardOG.tsx b/src/components/og/ReceiptCardOG.tsx index 71d52ab07..74505a2d7 100644 --- a/src/components/og/ReceiptCardOG.tsx +++ b/src/components/og/ReceiptCardOG.tsx @@ -1,4 +1,4 @@ -import { PaymentLink } from '@/interfaces' +import { type PaymentLink } from '@/interfaces' function usernamePxWidth(name: string) { const charPx = 0.6 * 80 // β‰ˆ48 px per glyph diff --git a/src/config/wagmi.config.tsx b/src/config/wagmi.config.tsx index 3c2b24041..31c16b6e2 100644 --- a/src/config/wagmi.config.tsx +++ b/src/config/wagmi.config.tsx @@ -3,7 +3,7 @@ import '@/utils/crypto-polyfill' // Polyfill crypto.randomUUID for DaimoPayProvi import { JustaNameContext } from '@/config/justaname.config' import { WagmiAdapter } from '@reown/appkit-adapter-wagmi' import { - AppKitNetwork, + type AppKitNetwork, arbitrum, base, bsc, diff --git a/src/context/ClaimBankFlowContext.tsx b/src/context/ClaimBankFlowContext.tsx index f07fdaffb..0b9f0487a 100644 --- a/src/context/ClaimBankFlowContext.tsx +++ b/src/context/ClaimBankFlowContext.tsx @@ -1,11 +1,11 @@ 'use client' -import React, { createContext, ReactNode, useContext, useMemo, useState, useCallback } from 'react' -import { CountryData } from '../components/AddMoney/consts' -import { TCreateOfframpResponse } from '@/services/services.types' -import { Account, User } from '@/interfaces' -import { IBankAccountDetails } from '@/components/AddWithdraw/DynamicBankAccountForm' -import { BridgeKycStatus } from '@/utils/bridge-accounts.utils' +import React, { createContext, type ReactNode, useContext, useMemo, useState, useCallback } from 'react' +import { type CountryData } from '../components/AddMoney/consts' +import { type TCreateOfframpResponse } from '@/services/services.types' +import { type Account, type User } from '@/interfaces' +import { type IBankAccountDetails } from '@/components/AddWithdraw/DynamicBankAccountForm' +import { type BridgeKycStatus } from '@/utils/bridge-accounts.utils' export enum ClaimBankFlowStep { SavedAccountsList = 'saved-accounts-list', diff --git a/src/context/OnrampFlowContext.tsx b/src/context/OnrampFlowContext.tsx index a7703bb67..1472ffd32 100644 --- a/src/context/OnrampFlowContext.tsx +++ b/src/context/OnrampFlowContext.tsx @@ -1,6 +1,6 @@ 'use client' -import React, { createContext, ReactNode, useCallback, useContext, useMemo, useState } from 'react' +import React, { createContext, type ReactNode, useCallback, useContext, useMemo, useState } from 'react' export type OnrampView = 'INITIAL' | 'SELECT_METHOD' diff --git a/src/context/RequestFulfillmentFlowContext.tsx b/src/context/RequestFulfillmentFlowContext.tsx index c324d3b31..d8347f52f 100644 --- a/src/context/RequestFulfillmentFlowContext.tsx +++ b/src/context/RequestFulfillmentFlowContext.tsx @@ -1,9 +1,9 @@ 'use client' -import React, { createContext, ReactNode, useContext, useMemo, useState, useCallback } from 'react' -import { CountryData } from '@/components/AddMoney/consts' -import { IOnrampData } from './OnrampFlowContext' -import { User } from '@/interfaces' +import React, { createContext, type ReactNode, useContext, useMemo, useState, useCallback } from 'react' +import { type CountryData } from '@/components/AddMoney/consts' +import { type IOnrampData } from './OnrampFlowContext' +import { type User } from '@/interfaces' export type ExternalWalletFulfilMethod = 'exchange' | 'wallet' diff --git a/src/context/SupportModalContext.tsx b/src/context/SupportModalContext.tsx index d1e873157..9905174ec 100644 --- a/src/context/SupportModalContext.tsx +++ b/src/context/SupportModalContext.tsx @@ -1,6 +1,6 @@ 'use client' -import { createContext, useContext, useState, ReactNode } from 'react' +import { createContext, useContext, useState, type ReactNode } from 'react' interface SupportModalContextType { isSupportModalOpen: boolean diff --git a/src/context/WithdrawFlowContext.tsx b/src/context/WithdrawFlowContext.tsx index 7b9ad71ce..7898bf0d0 100644 --- a/src/context/WithdrawFlowContext.tsx +++ b/src/context/WithdrawFlowContext.tsx @@ -1,8 +1,8 @@ 'use client' -import { ITokenPriceData, Account } from '@/interfaces' +import { type ITokenPriceData, type Account } from '@/interfaces' import { interfaces as peanutInterfaces } from '@squirrel-labs/peanut-sdk' -import React, { createContext, ReactNode, useContext, useMemo, useState, useCallback } from 'react' +import React, { createContext, type ReactNode, useContext, useMemo, useState, useCallback } from 'react' export interface WithdrawMethod { type: 'bridge' | 'manteca' | 'crypto' diff --git a/src/context/authContext.tsx b/src/context/authContext.tsx index bbdc9c220..940aa6c7f 100644 --- a/src/context/authContext.tsx +++ b/src/context/authContext.tsx @@ -8,7 +8,7 @@ import { fetchWithSentry, removeFromCookie, syncLocalStorageToCookie, clearRedir import { useAppKit } from '@reown/appkit/react' import { useQueryClient } from '@tanstack/react-query' import { useRouter } from 'next/navigation' -import { createContext, ReactNode, useContext, useState, useEffect, useMemo } from 'react' +import { createContext, type ReactNode, useContext, useState, useEffect, useMemo } from 'react' import { captureException } from '@sentry/nextjs' interface AuthContextType { diff --git a/src/context/footerVisibility.tsx b/src/context/footerVisibility.tsx index 47900cb50..680b06279 100644 --- a/src/context/footerVisibility.tsx +++ b/src/context/footerVisibility.tsx @@ -1,5 +1,5 @@ 'use client' -import React, { createContext, useState, useContext, ReactNode } from 'react' +import React, { createContext, useState, useContext, type ReactNode } from 'react' interface FooterVisibilityContextProps { isFooterVisible: boolean diff --git a/src/context/kernelClient.context.tsx b/src/context/kernelClient.context.tsx index 7d021c06c..591daa905 100644 --- a/src/context/kernelClient.context.tsx +++ b/src/context/kernelClient.context.tsx @@ -15,10 +15,10 @@ import { createKernelAccount, createKernelAccountClient, createZeroDevPaymasterClient, - KernelAccountClient, + type KernelAccountClient, } from '@zerodev/sdk' -import { createContext, ReactNode, useCallback, useContext, useEffect, useState, useMemo } from 'react' -import { Chain, http, PublicClient, Transport } from 'viem' +import { createContext, type ReactNode, useCallback, useContext, useEffect, useState, useMemo } from 'react' +import { type Chain, http, type PublicClient, type Transport } from 'viem' import type { Address } from 'viem' import { captureException } from '@sentry/nextjs' diff --git a/src/hooks/query/user.ts b/src/hooks/query/user.ts index 72c595b2d..cc91e32b3 100644 --- a/src/hooks/query/user.ts +++ b/src/hooks/query/user.ts @@ -1,5 +1,5 @@ import { USER } from '@/constants' -import { IUserProfile } from '@/interfaces' +import { type IUserProfile } from '@/interfaces' import { useAppDispatch, useUserStore } from '@/redux/hooks' import { userActions } from '@/redux/slices/user-slice' import { fetchWithSentry } from '@/utils' diff --git a/src/hooks/useBanners.tsx b/src/hooks/useBanners.tsx index 2691bcfd2..ccfec33e8 100644 --- a/src/hooks/useBanners.tsx +++ b/src/hooks/useBanners.tsx @@ -1,6 +1,6 @@ 'use client' -import { IconName } from '@/components/Global/Icons/Icon' +import { type IconName } from '@/components/Global/Icons/Icon' import { useAuth } from '@/context/authContext' import { useEffect, useState } from 'react' import { useNotifications } from './useNotifications' diff --git a/src/hooks/useBridgeKycFlow.ts b/src/hooks/useBridgeKycFlow.ts index 48ff71d7e..adbb746cc 100644 --- a/src/hooks/useBridgeKycFlow.ts +++ b/src/hooks/useBridgeKycFlow.ts @@ -1,12 +1,12 @@ import { useState, useEffect, useRef, useCallback } from 'react' import { useRouter } from 'next/navigation' -import { IFrameWrapperProps } from '@/components/Global/IframeWrapper' +import { type IFrameWrapperProps } from '@/components/Global/IframeWrapper' import { useWebSocket } from '@/hooks/useWebSocket' import { useUserStore } from '@/redux/hooks' -import { BridgeKycStatus, convertPersonaUrl } from '@/utils' -import { InitiateKycResponse } from '@/app/actions/types/users.types' +import { type BridgeKycStatus, convertPersonaUrl } from '@/utils' +import { type InitiateKycResponse } from '@/app/actions/types/users.types' import { getKycDetails, updateUserById } from '@/app/actions/users' -import { IUserKycVerification } from '@/interfaces' +import { type IUserKycVerification } from '@/interfaces' interface UseKycFlowOptions { onKycSuccess?: () => void diff --git a/src/hooks/useCarouselDotButton.ts b/src/hooks/useCarouselDotButton.ts index afee0c3ef..44c4c3e84 100644 --- a/src/hooks/useCarouselDotButton.ts +++ b/src/hooks/useCarouselDotButton.ts @@ -1,4 +1,4 @@ -import { UseEmblaCarouselType } from 'embla-carousel-react' +import { type UseEmblaCarouselType } from 'embla-carousel-react' import { useCallback, useEffect, useState } from 'react' type UseDotButtonType = { diff --git a/src/hooks/useCreateOnramp.ts b/src/hooks/useCreateOnramp.ts index ca09ddbc5..f88360fad 100644 --- a/src/hooks/useCreateOnramp.ts +++ b/src/hooks/useCreateOnramp.ts @@ -1,7 +1,7 @@ import { useState, useCallback } from 'react' import Cookies from 'js-cookie' import { getCurrencyConfig } from '@/utils/bridge.utils' -import { CountryData } from '@/components/AddMoney/consts' +import { type CountryData } from '@/components/AddMoney/consts' import type { Address } from 'viem' import { getCurrencyPrice } from '@/app/actions/currency' diff --git a/src/hooks/useMantecaKycFlow.ts b/src/hooks/useMantecaKycFlow.ts index 928efeb7a..ff57a2c82 100644 --- a/src/hooks/useMantecaKycFlow.ts +++ b/src/hooks/useMantecaKycFlow.ts @@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from 'react' import type { IFrameWrapperProps } from '@/components/Global/IframeWrapper' import { mantecaApi } from '@/services/manteca' import { useAuth } from '@/context/authContext' -import { CountryData, MantecaSupportedExchanges } from '@/components/AddMoney/consts' +import { type CountryData, MantecaSupportedExchanges } from '@/components/AddMoney/consts' import { BASE_URL } from '@/constants' import { MantecaKycStatus } from '@/interfaces' import { useWebSocket } from './useWebSocket' diff --git a/src/hooks/usePaymentInitiator.ts b/src/hooks/usePaymentInitiator.ts index d7cd7e8d2..e783d56cd 100644 --- a/src/hooks/usePaymentInitiator.ts +++ b/src/hooks/usePaymentInitiator.ts @@ -1,18 +1,18 @@ import { PEANUT_WALLET_CHAIN, PEANUT_WALLET_TOKEN } from '@/constants' import { tokenSelectorContext } from '@/context' import { useWallet } from '@/hooks/wallet/useWallet' -import { ParsedURL } from '@/lib/url-parser/types/payment' +import { type ParsedURL } from '@/lib/url-parser/types/payment' import { useAppDispatch, usePaymentStore } from '@/redux/hooks' import { paymentActions } from '@/redux/slices/payment-slice' -import { IAttachmentOptions } from '@/redux/types/send-flow.types' +import { type IAttachmentOptions } from '@/redux/types/send-flow.types' import { chargesApi } from '@/services/charges' import { requestsApi } from '@/services/requests' import { - CreateChargeRequest, - PaymentCreationResponse, - TCharge, - TChargeTransactionType, - TRequestChargeResponse, + type CreateChargeRequest, + type PaymentCreationResponse, + type TCharge, + type TChargeTransactionType, + type TRequestChargeResponse, } from '@/services/services.types' import { areEvmAddressesEqual, ErrorHandler, isNativeCurrency, isTxReverted } from '@/utils' import { useAppKitAccount } from '@reown/appkit/react' diff --git a/src/hooks/useRecentUsers.ts b/src/hooks/useRecentUsers.ts index 32c369c5f..6405525da 100644 --- a/src/hooks/useRecentUsers.ts +++ b/src/hooks/useRecentUsers.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react' -import { useTransactionHistory, HistoryEntry } from '@/hooks/useTransactionHistory' -import { RecentUser } from '@/services/users' +import { useTransactionHistory, type HistoryEntry } from '@/hooks/useTransactionHistory' +import { type RecentUser } from '@/services/users' export function useRecentUsers() { const { data } = useTransactionHistory({ mode: 'latest', limit: 20 }) diff --git a/src/hooks/useSetupFlow.ts b/src/hooks/useSetupFlow.ts index 591df54ec..a8bdc4811 100644 --- a/src/hooks/useSetupFlow.ts +++ b/src/hooks/useSetupFlow.ts @@ -1,4 +1,4 @@ -import { ScreenId, ScreenProps } from '@/components/Setup/Setup.types' +import { type ScreenId, type ScreenProps } from '@/components/Setup/Setup.types' import { useAppDispatch, useSetupStore } from '@/redux/hooks' import { setupActions } from '@/redux/slices/setup-slice' import { useCallback } from 'react' diff --git a/src/hooks/useTransactionDetailsDrawer.ts b/src/hooks/useTransactionDetailsDrawer.ts index 38e21283f..a6fa1cf07 100644 --- a/src/hooks/useTransactionDetailsDrawer.ts +++ b/src/hooks/useTransactionDetailsDrawer.ts @@ -1,4 +1,4 @@ -import { TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' +import { type TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' import { useState } from 'react' export const useTransactionDetailsDrawer = () => { const [isDrawerOpen, setIsDrawerOpen] = useState(false) diff --git a/src/hooks/useUserByUsername.ts b/src/hooks/useUserByUsername.ts index 2efd967b0..2661a4fc7 100644 --- a/src/hooks/useUserByUsername.ts +++ b/src/hooks/useUserByUsername.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react' -import { ApiUser, usersApi } from '@/services/users' +import { type ApiUser, usersApi } from '@/services/users' /** * Hook to fetch a user by username diff --git a/src/hooks/useUserSearch.ts b/src/hooks/useUserSearch.ts index aa0ab2592..c0ea2408b 100644 --- a/src/hooks/useUserSearch.ts +++ b/src/hooks/useUserSearch.ts @@ -1,5 +1,5 @@ import { useUserStore } from '@/redux/hooks' -import { ApiUser, usersApi } from '@/services/users' +import { type ApiUser, usersApi } from '@/services/users' import { useEffect, useRef, useState } from 'react' import { useDebounce } from './useDebounce' diff --git a/src/hooks/useWebSocket.ts b/src/hooks/useWebSocket.ts index 331283c84..68f006e7f 100644 --- a/src/hooks/useWebSocket.ts +++ b/src/hooks/useWebSocket.ts @@ -1,6 +1,6 @@ import { useEffect, useState, useCallback, useRef } from 'react' import { PeanutWebSocket, getWebSocketInstance } from '@/services/websocket' -import { HistoryEntry } from './useTransactionHistory' +import { type HistoryEntry } from './useTransactionHistory' type WebSocketStatus = 'connecting' | 'connected' | 'disconnected' | 'error' diff --git a/src/interfaces/interfaces.ts b/src/interfaces/interfaces.ts index a555977f3..c99d9f776 100644 --- a/src/interfaces/interfaces.ts +++ b/src/interfaces/interfaces.ts @@ -1,4 +1,4 @@ -import { BridgeKycStatus } from '@/utils' +import { type BridgeKycStatus } from '@/utils' import { interfaces as peanutInterfaces } from '@squirrel-labs/peanut-sdk' export type RecipientType = 'address' | 'ens' | 'iban' | 'us' | 'username' diff --git a/src/lib/url-parser/parser.ts b/src/lib/url-parser/parser.ts index 8821848b2..8df2f5ad7 100644 --- a/src/lib/url-parser/parser.ts +++ b/src/lib/url-parser/parser.ts @@ -5,7 +5,7 @@ import { validateAmount } from '../validation/amount' import { validateAndResolveRecipient } from '../validation/recipient' import { getChainDetails, getTokenAndChainDetails } from '../validation/token' import { AmountValidationError } from './errors' -import { ParsedURL } from './types/payment' +import { type ParsedURL } from './types/payment' import { areEvmAddressesEqual } from '@/utils' export function parseAmountAndToken(amountString: string): { amount?: string; token?: string } { diff --git a/src/lib/url-parser/types/payment.ts b/src/lib/url-parser/types/payment.ts index ca61e39e0..1c7a9b31e 100644 --- a/src/lib/url-parser/types/payment.ts +++ b/src/lib/url-parser/types/payment.ts @@ -1,5 +1,5 @@ import { interfaces } from '@squirrel-labs/peanut-sdk' -import { Chain } from 'viem' +import { type Chain } from 'viem' export type RecipientType = 'ENS' | 'ADDRESS' | 'USERNAME' export type ChainId = Chain['id'] diff --git a/src/lib/validation/recipient.ts b/src/lib/validation/recipient.ts index 1d39918cb..e7427c33a 100644 --- a/src/lib/validation/recipient.ts +++ b/src/lib/validation/recipient.ts @@ -7,7 +7,7 @@ import { usersApi } from '@/services/users' import { fetchWithSentry } from '@/utils' import * as Sentry from '@sentry/nextjs' import { RecipientValidationError } from '../url-parser/errors' -import { RecipientType } from '../url-parser/types/payment' +import { type RecipientType } from '../url-parser/types/payment' export async function validateAndResolveRecipient( recipient: string, diff --git a/src/redux/hooks.ts b/src/redux/hooks.ts index 6e17391df..e551d90af 100644 --- a/src/redux/hooks.ts +++ b/src/redux/hooks.ts @@ -1,6 +1,6 @@ 'use client' -import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' -import { AppDispatch, RootState } from './types' +import { type TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' +import { type AppDispatch, type RootState } from './types' export const useAppDispatch = () => useDispatch() export const useAppSelector: TypedUseSelectorHook = useSelector diff --git a/src/redux/slices/bank-form-slice.ts b/src/redux/slices/bank-form-slice.ts index 63ba5d908..f3887b74c 100644 --- a/src/redux/slices/bank-form-slice.ts +++ b/src/redux/slices/bank-form-slice.ts @@ -1,7 +1,7 @@ -import { createSlice, PayloadAction } from '@reduxjs/toolkit' +import { createSlice, type PayloadAction } from '@reduxjs/toolkit' import { BANK_FORM_SLICE } from '../constants' -import { IBankFormState } from '../types/bank-form.types' -import { IBankAccountDetails } from '@/components/AddWithdraw/DynamicBankAccountForm' +import { type IBankFormState } from '../types/bank-form.types' +import { type IBankAccountDetails } from '@/components/AddWithdraw/DynamicBankAccountForm' const initialState: IBankFormState = { formData: null, diff --git a/src/redux/slices/payment-slice.ts b/src/redux/slices/payment-slice.ts index 2823874a8..213d6cc06 100644 --- a/src/redux/slices/payment-slice.ts +++ b/src/redux/slices/payment-slice.ts @@ -1,9 +1,9 @@ -import { ParsedURL } from '@/lib/url-parser/types/payment' -import { PaymentCreationResponse, TCharge, TRequestChargeResponse, TRequestResponse } from '@/services/services.types' -import { createSlice, PayloadAction } from '@reduxjs/toolkit' +import { type ParsedURL } from '@/lib/url-parser/types/payment' +import { type PaymentCreationResponse, type TCharge, type TRequestChargeResponse, type TRequestResponse } from '@/services/services.types' +import { createSlice, type PayloadAction } from '@reduxjs/toolkit' import { PAYMENT_SLICE } from '../constants' -import { IPaymentState, TPaymentView } from '../types/payment.types' -import { IAttachmentOptions } from '../types/send-flow.types' +import { type IPaymentState, type TPaymentView } from '../types/payment.types' +import { type IAttachmentOptions } from '../types/send-flow.types' const initialState: IPaymentState = { currentView: 'INITIAL', diff --git a/src/redux/slices/send-flow-slice.ts b/src/redux/slices/send-flow-slice.ts index 611f435d6..1b9df4a11 100644 --- a/src/redux/slices/send-flow-slice.ts +++ b/src/redux/slices/send-flow-slice.ts @@ -2,12 +2,12 @@ import { createSlice } from '@reduxjs/toolkit' import { interfaces as peanutInterfaces } from '@squirrel-labs/peanut-sdk' import { SEND_FLOW_SLICE } from '../constants' import { - ErrorState, - IAttachmentOptions, - ISendFlowState, - Recipient, - SendFlowTxnType, - SendFlowView, + type ErrorState, + type IAttachmentOptions, + type ISendFlowState, + type Recipient, + type SendFlowTxnType, + type SendFlowView, } from '../types/send-flow.types' const initialState: ISendFlowState = { diff --git a/src/redux/slices/setup-slice.ts b/src/redux/slices/setup-slice.ts index f45bc82ec..0f6c54cc7 100644 --- a/src/redux/slices/setup-slice.ts +++ b/src/redux/slices/setup-slice.ts @@ -1,7 +1,7 @@ -import { ISetupStep } from '@/components/Setup/Setup.types' -import { createSlice, PayloadAction } from '@reduxjs/toolkit' +import { type ISetupStep } from '@/components/Setup/Setup.types' +import { createSlice, type PayloadAction } from '@reduxjs/toolkit' import { SETUP } from '../constants' -import { ISetupState } from '../types/setup.types' +import { type ISetupState } from '../types/setup.types' import { EInviteType } from '@/services/services.types' const initialState: ISetupState = { diff --git a/src/redux/slices/user-slice.ts b/src/redux/slices/user-slice.ts index 98247e190..8fd3c5335 100644 --- a/src/redux/slices/user-slice.ts +++ b/src/redux/slices/user-slice.ts @@ -1,7 +1,7 @@ -import { IUserProfile } from '@/interfaces' -import { createSlice, PayloadAction } from '@reduxjs/toolkit' +import { type IUserProfile } from '@/interfaces' +import { createSlice, type PayloadAction } from '@reduxjs/toolkit' import { AUTH_SLICE } from '../constants' -import { IAuthState } from '../types/user.types' +import { type IAuthState } from '../types/user.types' const initialState: IAuthState = { user: null, diff --git a/src/redux/slices/wallet-slice.ts b/src/redux/slices/wallet-slice.ts index be72d7595..787ebdbbe 100644 --- a/src/redux/slices/wallet-slice.ts +++ b/src/redux/slices/wallet-slice.ts @@ -1,7 +1,7 @@ import { createSlice } from '@reduxjs/toolkit' import { WALLET_SLICE } from '../constants' -import { WalletUIState } from '../types/wallet.types' -import { PayloadAction } from '@reduxjs/toolkit' +import { type WalletUIState } from '../types/wallet.types' +import { type PayloadAction } from '@reduxjs/toolkit' const initialState: WalletUIState = { signInModalVisible: false, diff --git a/src/redux/slices/zerodev-slice.ts b/src/redux/slices/zerodev-slice.ts index e40fff5c1..e31810b70 100644 --- a/src/redux/slices/zerodev-slice.ts +++ b/src/redux/slices/zerodev-slice.ts @@ -1,6 +1,6 @@ -import { createSlice, PayloadAction } from '@reduxjs/toolkit' +import { createSlice, type PayloadAction } from '@reduxjs/toolkit' import { ZERODEV_SLICE } from '../constants' -import { ZeroDevState } from '../types/zerodev.types' +import { type ZeroDevState } from '../types/zerodev.types' const initialState: ZeroDevState = { isKernelClientReady: false, diff --git a/src/redux/types/bank-form.types.ts b/src/redux/types/bank-form.types.ts index d6503e6c5..6506b53d4 100644 --- a/src/redux/types/bank-form.types.ts +++ b/src/redux/types/bank-form.types.ts @@ -1,4 +1,4 @@ -import { IBankAccountDetails } from '@/components/AddWithdraw/DynamicBankAccountForm' +import { type IBankAccountDetails } from '@/components/AddWithdraw/DynamicBankAccountForm' export type BankFormFlow = 'claim' | 'withdraw' diff --git a/src/redux/types/payment.types.ts b/src/redux/types/payment.types.ts index 377193501..eabc481da 100644 --- a/src/redux/types/payment.types.ts +++ b/src/redux/types/payment.types.ts @@ -1,6 +1,6 @@ -import { ParsedURL } from '@/lib/url-parser/types/payment' -import { PaymentCreationResponse, TCharge, TRequestChargeResponse, TRequestResponse } from '@/services/services.types' -import { IAttachmentOptions } from './send-flow.types' +import { type ParsedURL } from '@/lib/url-parser/types/payment' +import { type PaymentCreationResponse, type TCharge, type TRequestChargeResponse, type TRequestResponse } from '@/services/services.types' +import { type IAttachmentOptions } from './send-flow.types' export type TPaymentView = 'INITIAL' | 'CONFIRM' | 'STATUS' | 'PUBLIC_PROFILE' diff --git a/src/redux/types/setup.types.ts b/src/redux/types/setup.types.ts index 2d8085622..720f07825 100644 --- a/src/redux/types/setup.types.ts +++ b/src/redux/types/setup.types.ts @@ -1,4 +1,4 @@ -import { ISetupStep } from '@/components/Setup/Setup.types' +import { type ISetupStep } from '@/components/Setup/Setup.types' import { EInviteType } from '@/services/services.types' export interface ISetupState { diff --git a/src/redux/types/user.types.ts b/src/redux/types/user.types.ts index 7c23156d2..8e038b86b 100644 --- a/src/redux/types/user.types.ts +++ b/src/redux/types/user.types.ts @@ -1,4 +1,4 @@ -import { IUserProfile } from '@/interfaces' +import { type IUserProfile } from '@/interfaces' export interface IAuthState { user: IUserProfile | null diff --git a/src/services/charges.ts b/src/services/charges.ts index 3679e1b7e..fddd530e6 100644 --- a/src/services/charges.ts +++ b/src/services/charges.ts @@ -1,7 +1,7 @@ import { PEANUT_API_URL } from '@/constants' import { fetchWithSentry, jsonParse } from '@/utils' import Cookies from 'js-cookie' -import { CreateChargeRequest, PaymentCreationResponse, TCharge, TRequestChargeResponse } from './services.types' +import { type CreateChargeRequest, type PaymentCreationResponse, type TCharge, type TRequestChargeResponse } from './services.types' export const chargesApi = { create: async (data: CreateChargeRequest): Promise => { diff --git a/src/services/invites.ts b/src/services/invites.ts index d05ad0693..3322aa4d4 100644 --- a/src/services/invites.ts +++ b/src/services/invites.ts @@ -2,7 +2,7 @@ import { validateInviteCode } from '@/app/actions/invites' import { PEANUT_API_URL } from '@/constants' import { fetchWithSentry } from '@/utils' import Cookies from 'js-cookie' -import { EInviteType, PointsInvitesResponse } from './services.types' +import { EInviteType, type PointsInvitesResponse } from './services.types' export const invitesApi = { acceptInvite: async (inviteCode: string, type: EInviteType): Promise<{ success: boolean }> => { diff --git a/src/services/manteca.ts b/src/services/manteca.ts index aeaa9e4b0..5c04a156a 100644 --- a/src/services/manteca.ts +++ b/src/services/manteca.ts @@ -1,9 +1,9 @@ import { PEANUT_API_URL, PEANUT_API_KEY } from '@/constants' import { - MantecaDepositResponseData, - MantecaWithdrawData, - MantecaWithdrawResponse, - CreateMantecaOnrampParams, + type MantecaDepositResponseData, + type MantecaWithdrawData, + type MantecaWithdrawResponse, + type CreateMantecaOnrampParams, } from '@/types/manteca.types' import { fetchWithSentry } from '@/utils' import Cookies from 'js-cookie' diff --git a/src/services/points.ts b/src/services/points.ts index 9e8a83072..ab80d07fb 100644 --- a/src/services/points.ts +++ b/src/services/points.ts @@ -1,5 +1,5 @@ import Cookies from 'js-cookie' -import { CalculatePointsRequest, PointsAction, TierInfo } from './services.types' +import { type CalculatePointsRequest, PointsAction, type TierInfo } from './services.types' import { fetchWithSentry } from '@/utils' import { PEANUT_API_URL } from '@/constants' diff --git a/src/services/requests.ts b/src/services/requests.ts index b0f80c45c..6c6089daf 100644 --- a/src/services/requests.ts +++ b/src/services/requests.ts @@ -1,5 +1,5 @@ import { PEANUT_API_URL } from '@/constants' -import { CreateRequestRequest, TRequestResponse } from './services.types' +import { type CreateRequestRequest, type TRequestResponse } from './services.types' import { fetchWithSentry } from '@/utils' export const requestsApi = { diff --git a/src/services/rewards.ts b/src/services/rewards.ts index fd1994096..3b29313d6 100644 --- a/src/services/rewards.ts +++ b/src/services/rewards.ts @@ -1,6 +1,6 @@ import { PEANUT_API_URL } from '@/constants' import { fetchWithSentry } from '@/utils' -import { RewardLink } from './services.types' +import { type RewardLink } from './services.types' import Cookies from 'js-cookie' export const rewardsApi = { diff --git a/src/services/services.types.ts b/src/services/services.types.ts index 1f5180658..50a3074e0 100644 --- a/src/services/services.types.ts +++ b/src/services/services.types.ts @@ -1,4 +1,4 @@ -import { BridgeKycStatus } from '@/utils' +import { type BridgeKycStatus } from '@/utils' import { interfaces as peanutInterfaces } from '@squirrel-labs/peanut-sdk' export type TStatus = 'NEW' | 'PENDING' | 'COMPLETED' | 'EXPIRED' | 'FAILED' | 'SIGNED' | 'SUCCESSFUL' | 'CANCELLED' diff --git a/src/services/users.ts b/src/services/users.ts index 6b1a89b99..f4fde68a7 100644 --- a/src/services/users.ts +++ b/src/services/users.ts @@ -5,12 +5,12 @@ import { PEANUT_WALLET_TOKEN_DECIMALS, PEANUT_WALLET_TOKEN_SYMBOL, } from '@/constants' -import { AccountType, IUserKycVerification } from '@/interfaces' -import { IAttachmentOptions } from '@/redux/types/send-flow.types' +import { AccountType, type IUserKycVerification } from '@/interfaces' +import { type IAttachmentOptions } from '@/redux/types/send-flow.types' import { fetchWithSentry } from '@/utils' import { interfaces as peanutInterfaces } from '@squirrel-labs/peanut-sdk' import { chargesApi } from './charges' -import { TCharge } from './services.types' +import { type TCharge } from './services.types' import Cookies from 'js-cookie' type ApiAccount = { diff --git a/src/services/websocket.ts b/src/services/websocket.ts index f01671a1a..997f69c91 100644 --- a/src/services/websocket.ts +++ b/src/services/websocket.ts @@ -1,4 +1,4 @@ -import { HistoryEntry } from '@/hooks/useTransactionHistory' +import { type HistoryEntry } from '@/hooks/useTransactionHistory' export type WebSocketMessage = { type: diff --git a/src/utils/balance.utils.ts b/src/utils/balance.utils.ts index 1b644c002..051ee3089 100644 --- a/src/utils/balance.utils.ts +++ b/src/utils/balance.utils.ts @@ -1,5 +1,5 @@ import { PEANUT_WALLET_TOKEN_DECIMALS } from '@/constants' -import { ChainValue, IUserBalance } from '@/interfaces' +import { type ChainValue, type IUserBalance } from '@/interfaces' import * as Sentry from '@sentry/nextjs' import { formatUnits } from 'viem' diff --git a/src/utils/bridge.utils.ts b/src/utils/bridge.utils.ts index 6e07d2fad..c9bd814bb 100644 --- a/src/utils/bridge.utils.ts +++ b/src/utils/bridge.utils.ts @@ -1,5 +1,5 @@ -import { countryData as ALL_METHODS_DATA, CountryData } from '@/components/AddMoney/consts' -import { Account, AccountType } from '@/interfaces' +import { countryData as ALL_METHODS_DATA, type CountryData } from '@/components/AddMoney/consts' +import { type Account, AccountType } from '@/interfaces' export interface CurrencyConfig { currency: string diff --git a/src/utils/history.utils.ts b/src/utils/history.utils.ts index 7f710ba0b..12956beff 100644 --- a/src/utils/history.utils.ts +++ b/src/utils/history.utils.ts @@ -1,9 +1,9 @@ import { MERCADO_PAGO, PIX, SIMPLEFI } from '@/assets/payment-apps' -import { TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' +import { type TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' import { getFromLocalStorage } from '@/utils' import { PEANUT_WALLET_TOKEN_DECIMALS, BASE_URL } from '@/constants' import { formatUnits } from 'viem' -import { Hash } from 'viem' +import { type Hash } from 'viem' import { getTokenDetails } from '@/utils' import { getCurrencyPrice } from '@/app/actions/currency' diff --git a/src/utils/metrics.utils.ts b/src/utils/metrics.utils.ts index 756dd45c7..390991bc2 100644 --- a/src/utils/metrics.utils.ts +++ b/src/utils/metrics.utils.ts @@ -1,4 +1,4 @@ -import { JSONObject } from '@/interfaces' +import { type JSONObject } from '@/interfaces' import { PEANUT_API_URL } from '@/constants' import { fetchWithSentry } from '@/utils' import Cookies from 'js-cookie' diff --git a/src/utils/sentry.utils.ts b/src/utils/sentry.utils.ts index d7402696d..d6a5a2ba6 100644 --- a/src/utils/sentry.utils.ts +++ b/src/utils/sentry.utils.ts @@ -1,6 +1,6 @@ import * as Sentry from '@sentry/nextjs' -import { JSONValue } from '../interfaces/interfaces' +import { type JSONValue } from '../interfaces/interfaces' /** Use configured fetch timeout or default to 10s * We use 10s because vercel function timout is 15s and this function From 9d6a9440de446a6f1cc4c0013fb3a61a7c5edccb Mon Sep 17 00:00:00 2001 From: Hugo Montenegro Date: Thu, 16 Oct 2025 02:35:10 -0300 Subject: [PATCH 4/5] pbpm format --- fix-type-imports.js | 1 - src/app/receipt/[entryId]/page.tsx | 5 ++++- .../TransactionDetails/TransactionDetailsReceipt.tsx | 6 +++++- src/redux/slices/payment-slice.ts | 7 ++++++- src/redux/types/payment.types.ts | 7 ++++++- src/services/charges.ts | 7 ++++++- 6 files changed, 27 insertions(+), 6 deletions(-) delete mode 100644 fix-type-imports.js diff --git a/fix-type-imports.js b/fix-type-imports.js deleted file mode 100644 index 0519ecba6..000000000 --- a/fix-type-imports.js +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/app/receipt/[entryId]/page.tsx b/src/app/receipt/[entryId]/page.tsx index 3014b751e..3f3a6e1d4 100644 --- a/src/app/receipt/[entryId]/page.tsx +++ b/src/app/receipt/[entryId]/page.tsx @@ -2,7 +2,10 @@ import { connection } from 'next/server' import { notFound } from 'next/navigation' import { isFinalState, historyTypeFromNumber } from '@/utils/history.utils' import { getHistoryEntry } from '@/app/actions/history' -import { mapTransactionDataForDrawer, type TransactionDetails } from '@/components/TransactionDetails/transactionTransformer' +import { + mapTransactionDataForDrawer, + type TransactionDetails, +} from '@/components/TransactionDetails/transactionTransformer' import { TransactionDetailsReceipt } from '@/components/TransactionDetails/TransactionDetailsReceipt' import NavHeader from '@/components/Global/NavHeader' import { generateMetadata as generateBaseMetadata } from '@/app/metadata' diff --git a/src/components/TransactionDetails/TransactionDetailsReceipt.tsx b/src/components/TransactionDetails/TransactionDetailsReceipt.tsx index f82591dfd..95c70dc27 100644 --- a/src/components/TransactionDetails/TransactionDetailsReceipt.tsx +++ b/src/components/TransactionDetails/TransactionDetailsReceipt.tsx @@ -30,7 +30,11 @@ import MoreInfo from '../Global/MoreInfo' import CancelSendLinkModal from '../Global/CancelSendLinkModal' import { twMerge } from 'tailwind-merge' import { isAddress } from 'viem' -import { getBankAccountLabel, type TransactionDetailsRowKey, transactionDetailsRowKeys } from './transaction-details.utils' +import { + getBankAccountLabel, + type TransactionDetailsRowKey, + transactionDetailsRowKeys, +} from './transaction-details.utils' import { useSupportModalContext } from '@/context/SupportModalContext' import { useRouter } from 'next/navigation' import { countryData } from '@/components/AddMoney/consts' diff --git a/src/redux/slices/payment-slice.ts b/src/redux/slices/payment-slice.ts index 213d6cc06..e736048d6 100644 --- a/src/redux/slices/payment-slice.ts +++ b/src/redux/slices/payment-slice.ts @@ -1,5 +1,10 @@ import { type ParsedURL } from '@/lib/url-parser/types/payment' -import { type PaymentCreationResponse, type TCharge, type TRequestChargeResponse, type TRequestResponse } from '@/services/services.types' +import { + type PaymentCreationResponse, + type TCharge, + type TRequestChargeResponse, + type TRequestResponse, +} from '@/services/services.types' import { createSlice, type PayloadAction } from '@reduxjs/toolkit' import { PAYMENT_SLICE } from '../constants' import { type IPaymentState, type TPaymentView } from '../types/payment.types' diff --git a/src/redux/types/payment.types.ts b/src/redux/types/payment.types.ts index eabc481da..a837cbf4c 100644 --- a/src/redux/types/payment.types.ts +++ b/src/redux/types/payment.types.ts @@ -1,5 +1,10 @@ import { type ParsedURL } from '@/lib/url-parser/types/payment' -import { type PaymentCreationResponse, type TCharge, type TRequestChargeResponse, type TRequestResponse } from '@/services/services.types' +import { + type PaymentCreationResponse, + type TCharge, + type TRequestChargeResponse, + type TRequestResponse, +} from '@/services/services.types' import { type IAttachmentOptions } from './send-flow.types' export type TPaymentView = 'INITIAL' | 'CONFIRM' | 'STATUS' | 'PUBLIC_PROFILE' diff --git a/src/services/charges.ts b/src/services/charges.ts index fddd530e6..ec4397997 100644 --- a/src/services/charges.ts +++ b/src/services/charges.ts @@ -1,7 +1,12 @@ import { PEANUT_API_URL } from '@/constants' import { fetchWithSentry, jsonParse } from '@/utils' import Cookies from 'js-cookie' -import { type CreateChargeRequest, type PaymentCreationResponse, type TCharge, type TRequestChargeResponse } from './services.types' +import { + type CreateChargeRequest, + type PaymentCreationResponse, + type TCharge, + type TRequestChargeResponse, +} from './services.types' export const chargesApi = { create: async (data: CreateChargeRequest): Promise => { From f4e961812b5ae3a5b0cb3e683dd77c4cccc7ce61 Mon Sep 17 00:00:00 2001 From: Hugo Montenegro Date: Thu, 16 Oct 2025 12:22:16 -0300 Subject: [PATCH 5/5] test fixes --- jest.setup.ts | 7 +++ package.json | 5 +- src/app/(mobile-ui)/withdraw/crypto/page.tsx | 12 ++-- src/app/actions.ts | 25 +++++--- src/app/actions/clients.ts | 5 +- src/utils/__mocks__/zerodev-sdk.ts | 66 ++++++++++++++++++++ 6 files changed, 100 insertions(+), 20 deletions(-) create mode 100644 src/utils/__mocks__/zerodev-sdk.ts diff --git a/jest.setup.ts b/jest.setup.ts index ea8d35d82..24a187f46 100644 --- a/jest.setup.ts +++ b/jest.setup.ts @@ -28,3 +28,10 @@ global.console = { jest.mock('next/cache', () => ({ unstable_cache: (fn: Function) => fn, })) + +jest.mock('@/app/actions/tokens', () => ({ + fetchTokenPriceApi: jest.fn(() => Promise.resolve({ price: 100, symbol: 'TEST' })), + getTokenBalances: jest.fn(() => Promise.resolve([])), + getTokenPrice: jest.fn(() => Promise.resolve(100)), + fetchERC20Data: jest.fn(() => Promise.resolve({ name: 'Test Token', symbol: 'TEST', decimals: 18 })), +})) diff --git a/package.json b/package.json index c44daa271..abe446e93 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ ] }, "transformIgnorePatterns": [ - "node_modules/(?!(@wagmi|wagmi|viem|@viem|@squirrel-labs|@reown|@walletconnect|@justaname\\.id|@zerodev)/)" + "node_modules/(?!(@wagmi|wagmi|viem|@viem|@squirrel-labs|@reown|@walletconnect|@justaname\\.id|@zerodev|permissionless)/)" ], "moduleNameMapper": { "\\.(svg|png|jpg|jpeg|gif)$": "jest-transform-stub", @@ -147,7 +147,8 @@ "^@reown/appkit/react$": "/src/utils/__mocks__/reown-appkit.ts", "^@justaname\\.id/react$": "/src/utils/__mocks__/justaname.ts", "^web-push$": "/src/utils/__mocks__/web-push.ts", - "^next/cache$": "/src/utils/__mocks__/next-cache.ts" + "^next/cache$": "/src/utils/__mocks__/next-cache.ts", + "^@zerodev/sdk(.*)$": "/src/utils/__mocks__/zerodev-sdk.ts" }, "setupFilesAfterEnv": [ "/jest.setup.ts" diff --git a/src/app/(mobile-ui)/withdraw/crypto/page.tsx b/src/app/(mobile-ui)/withdraw/crypto/page.tsx index 96de2e37d..e3db94dfc 100644 --- a/src/app/(mobile-ui)/withdraw/crypto/page.tsx +++ b/src/app/(mobile-ui)/withdraw/crypto/page.tsx @@ -13,12 +13,12 @@ import { useAppDispatch, usePaymentStore } from '@/redux/hooks' import { paymentActions } from '@/redux/slices/payment-slice' import { chargesApi } from '@/services/charges' import { requestsApi } from '@/services/requests' -import { - type CreateChargeRequest, - type CreateRequestRequest as CreateRequestPayloadServices, - type TCharge, - type TRequestChargeResponse, - type TRequestResponse, +import type { + CreateChargeRequest, + CreateRequestRequest as CreateRequestPayloadServices, + TCharge, + TRequestChargeResponse, + TRequestResponse, } from '@/services/services.types' import { NATIVE_TOKEN_ADDRESS } from '@/utils/token.utils' import { interfaces as peanutInterfaces } from '@squirrel-labs/peanut-sdk' diff --git a/src/app/actions.ts b/src/app/actions.ts index 9db467e5c..03d6236f6 100644 --- a/src/app/actions.ts +++ b/src/app/actions.ts @@ -37,21 +37,26 @@ const validateVapidEnv = () => { } // initialize webpush with try-catch +// NOTE: This is legacy code - we now use OneSignal for push notifications +// TODO: Remove this entire file once PushProvider is fully migrated to OneSignal try { const { vapidSubject, vapidPublicKey, vapidPrivateKey } = validateVapidEnv() webpush.setVapidDetails(vapidSubject, vapidPublicKey, vapidPrivateKey) } catch (error) { - console.error('Failed to initialize web push:', error) - // in development, provide more helpful error message - if (process.env.NODE_ENV === 'development') { - console.info(` - Please ensure you have the following environment variables set: - - NEXT_PUBLIC_VAPID_SUBJECT (usually a mailto: URL) - - NEXT_PUBLIC_VAPID_PUBLIC_KEY - - VAPID_PRIVATE_KEY - `) - console.log('VAPID Subject:', process.env.NEXT_PUBLIC_VAPID_SUBJECT) + // Silently fail in test environment to avoid breaking tests + if (process.env.NODE_ENV !== 'test') { + console.error('Failed to initialize web push:', error) + // in development, provide more helpful error message + if (process.env.NODE_ENV === 'development') { + console.info(` + Please ensure you have the following environment variables set: + - NEXT_PUBLIC_VAPID_SUBJECT (usually a mailto: URL) + - NEXT_PUBLIC_VAPID_PUBLIC_KEY + - VAPID_PRIVATE_KEY + `) + console.log('VAPID Subject:', process.env.NEXT_PUBLIC_VAPID_SUBJECT) + } } } diff --git a/src/app/actions/clients.ts b/src/app/actions/clients.ts index 80a63068b..1cf663731 100644 --- a/src/app/actions/clients.ts +++ b/src/app/actions/clients.ts @@ -13,8 +13,9 @@ export type ChainId = (typeof allChains)[number]['id'] * @see https://viem.sh/docs/clients/transports/fallback#fallback-transport */ export function getTransportWithFallback(chainId: ChainId): Transport { - const providerUrls = rpcUrls[chainId] - if (!providerUrls) { + // Handle circular dependency during module initialization (e.g., in tests) + const providerUrls = rpcUrls?.[chainId] + if (!providerUrls || !Array.isArray(providerUrls) || providerUrls.length === 0) { // If no premium providers are configured, viem will use a default one return http() } diff --git a/src/utils/__mocks__/zerodev-sdk.ts b/src/utils/__mocks__/zerodev-sdk.ts new file mode 100644 index 000000000..3a640a659 --- /dev/null +++ b/src/utils/__mocks__/zerodev-sdk.ts @@ -0,0 +1,66 @@ +// Mock for @zerodev/sdk to avoid ESM issues in tests + +export const createKernelAccount = jest.fn(() => + Promise.resolve({ + address: '0x1234567890123456789012345678901234567890', + signMessage: jest.fn(), + signTypedData: jest.fn(), + }) +) + +export const createKernelMigrationAccount = jest.fn(() => + Promise.resolve({ + address: '0x1234567890123456789012345678901234567890', + signMessage: jest.fn(), + signTypedData: jest.fn(), + }) +) + +export const createKernelAccountClient = jest.fn(() => ({ + account: { + address: '0x1234567890123456789012345678901234567890', + }, + sendUserOperation: jest.fn(), + waitForUserOperationReceipt: jest.fn(), +})) + +export const createZeroDevPaymasterClient = jest.fn(() => ({ + sponsorUserOperation: jest.fn(), +})) + +export const createPasskeyValidator = jest.fn(() => ({ + address: '0x1234567890123456789012345678901234567890', +})) + +export const toPasskeyValidator = jest.fn(() => ({ + address: '0x1234567890123456789012345678901234567890', +})) + +export const toWebAuthnKey = jest.fn(() => ({ + pubX: BigInt(0), + pubY: BigInt(0), +})) + +export const createWeightedValidator = jest.fn(() => ({ + address: '0x1234567890123456789012345678901234567890', +})) + +export const toECDSASigner = jest.fn(() => ({ + address: '0x1234567890123456789012345678901234567890', +})) + +export const signerToEcdsaValidator = jest.fn(() => ({ + address: '0x1234567890123456789012345678901234567890', +})) + +export const KERNEL_V3_1 = '0x0DA6a956B9488eD4dd761E59f52FDc6c8068E6B5' + +export const getEntryPoint = jest.fn((version: string) => ({ + address: '0x0000000071727De22E5E9d8BAf0edAc6f37da032' as `0x${string}`, + version: version as '0.6' | '0.7', +})) + +export const constants = { + KERNEL_V3_1: '0x0DA6a956B9488eD4dd761E59f52FDc6c8068E6B5', + getEntryPoint, +}