Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 153 files out of 260 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the WalkthroughBuild and TypeScript configs adjusted for Turbopack/transpilation and analyzer behavior. Multiple UI and interaction changes: new NavigationArrow component and replacements, points page restyle, hold-to-claim timing with 500ms preview, setup flow adds Landing step and JoinWaitlist tweaks. Some metadata functions now await Promise params. Branding text shortened to “Peanut”. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
src/components/Setup/Views/JoinWaitlist.tsx (1)
15-15: Clean up unused login-related code.The
handleLoginClick,isLoggingIn,handleError, andonLoginClickfunctions are defined but never used after the UI refactor removed the login button. These should be removed to reduce code clutter and bundle size.Apply this diff to remove the unused code:
import { invitesApi } from '@/services/invites' import ErrorAlert from '@/components/Global/ErrorAlert' -import { useLogin } from '@/hooks/useLogin' const JoinWaitlist = () => { const [inviteCode, setInviteCode] = useState('') const [isValid, setIsValid] = useState(false) const [isChanging, setIsChanging] = useState(false) const [isLoading, setisLoading] = useState(false) const [error, setError] = useState('') const toast = useToast() const { handleNext } = useSetupFlow() const dispatch = useAppDispatch() - const { handleLoginClick, isLoggingIn } = useLogin() const validateInviteCode = async (inviteCode: string): Promise<boolean> => { try { setError('') setisLoading(true) const res = await invitesApi.validateInviteCode(inviteCode) const isValid = res.success if (!isValid) { setError('Invalid invite code') } return isValid } catch (e) { setError('Invalid invite code') return false } finally { setisLoading(false) } } - 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 ( <div className="flex flex-col gap-4">Also applies to: 27-27, 47-64
src/app/(mobile-ui)/qr-pay/page.tsx (1)
598-659: Clear existing preview timers before starting a new holdA quick tap schedules the preview reset timer. If the user presses again within that 500 ms window,
startHolddoesn’t clear the pending timeout or interval, so the old preview timer still fires and wipes the new hold’s progress/haptics mid-press. That leaves the hold interaction unreliable. Please clear any existing timeout/interval before starting the next hold.const startHold = useCallback(() => { + if (holdTimerRef.current) { + clearTimeout(holdTimerRef.current) + holdTimerRef.current = null + } + if (progressIntervalRef.current) { + clearInterval(progressIntervalRef.current) + progressIntervalRef.current = null + } setHoldProgress(0) setIsShaking(true) const startTime = Date.now() holdStartTimeRef.current = startTimesrc/app/(mobile-ui)/dev/shake-test/page.tsx (1)
20-96: Cancel pending preview timers before restarting the holdAfter a quick tap, the preview reset timeout remains scheduled. If a tester presses again before that timeout fires, the old timer still executes and zeroes out the new hold’s progress/intensity. Clear any existing timeout/interval before wiring up the next hold to keep the demo reliable.
const startHold = useCallback(() => { + setHoldTimer((existing) => { + if (existing) clearTimeout(existing) + return null + }) + setProgressInterval((existing) => { + if (existing) clearInterval(existing) + return null + }) setHoldProgress(0) setIsShaking(true) setShowSuccess(false) const startTime = Date.now()
🧹 Nitpick comments (2)
next.config.js (2)
50-50: Verify the need for empty serverExternalPackages.The empty array declaration is valid but has no effect. If no packages need to be externalized, this line could be removed to reduce configuration noise. If it's a placeholder for future use, consider adding a comment.
If this is a placeholder, add a clarifying comment:
- // External packages that shouldn't be bundled (server-side only) + // External packages that shouldn't be bundled (server-side only) + // Currently empty - add packages here if needed serverExternalPackages: [],Or remove it entirely if not needed:
- // External packages that shouldn't be bundled (server-side only) - serverExternalPackages: [], -
55-56: Remove '@squirrel-labs/peanut-sdk' from transpilePackages (next.config.js:55-56). This SDK ships a pre-compiled bundle (main: "dist/index.js") and doesn’t require Babel transpilation.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (26)
next.config.js(2 hunks)src/app/(mobile-ui)/dev/shake-test/page.tsx(4 hunks)src/app/(mobile-ui)/points/page.tsx(5 hunks)src/app/(mobile-ui)/qr-pay/page.tsx(4 hunks)src/app/api/health/route.ts(1 hunks)src/app/api/og/route.tsx(1 hunks)src/app/request/[...username]/layout.tsx(1 hunks)src/app/send/[...username]/layout.tsx(1 hunks)src/app/send/[...username]/page.tsx(1 hunks)src/components/Global/NavigationArrow/index.tsx(1 hunks)src/components/Global/ShareButton/index.tsx(1 hunks)src/components/Global/TokenSelector/Components/NetworkListItem.tsx(2 hunks)src/components/Payment/PaymentInfoRow.tsx(3 hunks)src/components/Profile/components/ProfileMenuItem.tsx(2 hunks)src/components/Profile/index.tsx(1 hunks)src/components/Setup/Setup.consts.tsx(2 hunks)src/components/Setup/Setup.types.ts(2 hunks)src/components/Setup/Views/JoinWaitlist.tsx(3 hunks)src/components/Setup/Views/Landing.tsx(1 hunks)src/components/Setup/Views/index.ts(1 hunks)src/components/TransactionDetails/TransactionDetailsReceipt.tsx(1 hunks)src/config/wagmi.config.tsx(1 hunks)src/hooks/useBanners.tsx(1 hunks)src/lib/og/build-og-metadata.ts(1 hunks)src/utils/general.utils.ts(1 hunks)tsconfig.json(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-07-24T13:26:10.290Z
Learnt from: Hugo0
PR: peanutprotocol/peanut-ui#1014
File: src/components/Claim/Link/Initial.view.tsx:413-413
Timestamp: 2025-07-24T13:26:10.290Z
Learning: In the peanut-ui repository, the change from `${SQUID_API_URL}/route` to `${SQUID_API_URL}/v2/route` in src/components/Claim/Link/Initial.view.tsx was a typo fix, not an API migration, as the codebase was already using Squid API v2.
Applied to files:
src/app/api/og/route.tsx
📚 Learning: 2025-10-08T17:13:13.155Z
Learnt from: Zishan-7
PR: peanutprotocol/peanut-ui#1299
File: src/app/(mobile-ui)/points/page.tsx:41-51
Timestamp: 2025-10-08T17:13:13.155Z
Learning: In `src/app/(mobile-ui)/points/page.tsx`, the icon name "invite-heart" is intentionally used (not "inviter-heart") when displaying who invited the current user, as this is a deliberate design choice despite semantic differences with UserHeader usage.
Applied to files:
src/app/(mobile-ui)/points/page.tsx
🧬 Code graph analysis (8)
src/components/Profile/components/ProfileMenuItem.tsx (1)
src/components/Global/Icons/Icon.tsx (1)
Icon(206-215)
src/app/send/[...username]/layout.tsx (2)
src/app/request/[...username]/layout.tsx (1)
generateMetadata(5-34)src/app/send/[...username]/page.tsx (1)
generateMetadata(24-51)
src/components/Global/NavigationArrow/index.tsx (1)
src/components/Global/Icons/Icon.tsx (1)
Icon(206-215)
src/app/request/[...username]/layout.tsx (2)
src/app/send/[...username]/layout.tsx (1)
generateMetadata(5-34)src/app/metadata.ts (1)
generateMetadata(4-39)
src/components/Setup/Views/JoinWaitlist.tsx (2)
src/components/0_Bruddle/Button.tsx (1)
Button(76-267)src/redux/slices/setup-slice.ts (1)
setupActions(65-65)
src/components/Setup/Views/Landing.tsx (5)
src/hooks/useSetupFlow.ts (1)
useSetupFlow(6-68)src/hooks/useLogin.tsx (1)
useLogin(23-52)src/context/authContext.tsx (1)
useAuth(191-197)src/components/0_Bruddle/Toast.tsx (1)
useToast(111-117)src/utils/general.utils.ts (2)
getFromLocalStorage(112-134)sanitizeRedirectURL(1217-1238)
src/app/(mobile-ui)/points/page.tsx (1)
src/components/Global/Icons/Icon.tsx (1)
Icon(206-215)
src/app/send/[...username]/page.tsx (3)
src/app/request/[...username]/layout.tsx (1)
generateMetadata(5-34)src/app/send/[...username]/layout.tsx (1)
generateMetadata(5-34)src/app/[...recipient]/page.tsx (1)
generateMetadata(15-162)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Deploy-Preview
🔇 Additional comments (29)
src/utils/general.utils.ts (1)
1073-1073: LGTM! Branding update is consistent.The change from 'Peanut Protocol' to 'Peanut' aligns with the branding updates across the codebase.
src/components/Global/ShareButton/index.tsx (1)
32-32: LGTM! Branding update is consistent.The default title change from 'Peanut Protocol' to 'Peanut' aligns with the broader branding updates in this PR.
src/config/wagmi.config.tsx (1)
33-34: LGTM! Metadata updates are consistent.The metadata changes reflect the new branding ('Peanut' instead of 'Peanut Protocol') and updated product description. These will be displayed in wallet connection interfaces.
src/components/Setup/Setup.types.ts (1)
2-2: LGTM! Type additions follow existing patterns.The new 'landing' screen type is properly added to both
ScreenIdandScreenProps, following the same pattern as other screens with no required props.Also applies to: 20-20
src/app/api/health/route.ts (1)
41-41: LGTM! Alert message branding updated.The Discord notification header has been updated to reflect the new 'Peanut' branding, consistent with changes throughout the codebase.
src/hooks/useBanners.tsx (1)
55-55: LGTM! Banner description expanded appropriately.The updated description now mentions Banks and other payment methods alongside Mercado Pago, providing users with a more comprehensive understanding of the verification benefits.
src/components/Setup/Views/JoinWaitlist.tsx (2)
70-70: LGTM! Placeholder text is clearer.The new placeholder "Enter invite code" is more direct and actionable than "Do you have an invite code?".
87-119: LGTM! Flow separation improves UX.The refactored UI clearly separates two flows:
- Invite code path: Input + Next button (lines 87-97) validates and dispatches the code
- Waitlist path: Join waitlist button (lines 112-119) proceeds without an invite code
The "or" divider (lines 106-110) visually separates these options, making the choice clear to users.
src/components/Payment/PaymentInfoRow.tsx (1)
15-15: LGTM! Clean implementation of clickable row behavior.The changes properly add onClick support with appropriate visual feedback:
- Pointer cursor indicates interactivity
- Hover and active states provide visual feedback
- Conditional styling only applies when onClick is provided
- No breaking changes for existing usage
Also applies to: 26-27, 36-38
src/app/request/[...username]/layout.tsx (1)
5-7: LGTM! Next.js 15 async params migration implemented correctly.The signature change to accept
Promise<{ username: string[] }>and the await of params before destructuring aligns with Next.js 15 requirements. The fallback logic and metadata generation remain unchanged, ensuring backward compatibility.src/app/api/og/route.tsx (1)
105-111: LGTM! Branding update applied consistently.The text change from "Peanut Protocol" to "Peanut" aligns with the branding updates mentioned in the PR objectives and is consistent with similar changes across the codebase.
src/components/Setup/Views/index.ts (1)
5-5: LGTM! Export added for the new LandingStep component.The export follows the established pattern and enables the new setup screen mentioned in the PR objectives.
src/lib/og/build-og-metadata.ts (1)
33-34: LGTM! Branding update in metadata description.The change from "Peanut Protocol" to "Peanut" in the description maintains consistency with the global branding updates across the application.
src/components/Global/TokenSelector/Components/NetworkListItem.tsx (1)
7-7: LGTM! Good refactor using the new NavigationArrow component.Replacing the inline icon with the dedicated
NavigationArrowcomponent improves consistency across the UI. This change aligns with the introduction of the reusable navigation arrow pattern.Also applies to: 84-84
src/components/Global/NavigationArrow/index.tsx (1)
1-17: LGTM! Well-designed component for UI consistency.The
NavigationArrowcomponent provides a clean abstraction for the right-pointing chevron pattern used throughout the app. The implementation is straightforward:
- Properly typed props with sensible defaults
- Uses
twMergeto allow className customization- Well-documented with JSDoc comment
This improves maintainability by centralizing this UI pattern.
src/components/TransactionDetails/TransactionDetailsReceipt.tsx (1)
856-867: PaymentInfoRow onClick support verified
PaymentInfoRowProps defines an optionalonClickhandler and the component applies it with the appropriate styles, so the Points row navigation will work as intended.src/components/Profile/components/ProfileMenuItem.tsx (1)
49-58: Incorrect rotation assumption: custom endIcon props were never rotated; only the default arrow was. No action required.Likely an incorrect or invalid review comment.
src/app/(mobile-ui)/points/page.tsx (7)
8-8: LGTM!The NavigationArrow import is correctly added and used appropriately on line 182.
84-90: LGTM!The enhanced visual hierarchy with larger padding, prominent star icon, and bolder text effectively emphasizes the total points metric, aligning well with gamification UX patterns.
100-116: Verify the non-linear progress calculation is intentional.The progress bar uses a non-linear calculation with a 0.6 exponent:
Math.pow(ratio, 0.6). This creates an easing effect where the bar fills faster initially (e.g., 50% actual progress displays as ~57% visual progress).While this is a common gamification pattern to make early progress feel more rewarding, it adds complexity. Please confirm this non-linear progression is intentional rather than a simpler linear calculation.
130-140: LGTM!The centered tier status with conditional messaging provides clear feedback to users. The logic is consistent with the progress bar behavior, and the singular/plural handling is correct.
153-159: LGTM!The flex layout with
flex-shrink-0on the icon ensures proper sizing and prevents the icon from shrinking. The smaller icon size is appropriate for an informational context.
182-182: LGTM!The NavigationArrow component usage is appropriate here, providing consistent navigation affordance. The
text-blackclassName ensures proper color contrast.
165-165: TheiconSizeprop is correctly typed and the usage is valid.The
CopyToClipboardcomponent definesiconSizeas an optional prop with a strict union type:'2' | '4' | '6' | '8'. The value"4"passed on line 165 ofsrc/app/(mobile-ui)/points/page.tsxis one of the allowed literal values, and the prop is properly documented in the component's interface.tsconfig.json (2)
12-12: LGTM: Modern module resolution for bundlers.Switching to
"bundler"is appropriate for Next.js projects and aligns with the Turbopack configuration added innext.config.js. This resolution strategy is optimized for bundlers like webpack and Turbopack.
17-17: LGTM: Incremental build tracking in Next.js output directory.Placing the TypeScript build info file in
.next/follows Next.js conventions and ensures it's cleaned up with other build artifacts.next.config.js (3)
41-47: LGTM: Turbopack alias aligns with TypeScript paths.The
@alias configuration matches the paths intsconfig.json(line 24), ensuring consistency between TypeScript resolution and Turbopack's module resolution.
52-53: LGTM: Source maps handled by Sentry.Disabling production browser source maps while Sentry handles source map uploads (lines 159, 173, 184) is the correct pattern for security and performance. Source maps are uploaded to Sentry for error debugging without exposing them to end users.
59-64: LGTM: Appropriate optimization features.The experimental features are well-suited for this project:
optimizePackageImportstargets large UI libraries that benefit from tree-shakingwebpackBuildWorkerspeeds up builds when not using Turbopack (as noted in the comment)These optimizations should improve build performance without breaking existing functionality.
| // Only enable in production builds when explicitly requested | ||
| enabled: process.env.ANALYZE === 'true' && process.env.NODE_ENV !== 'development', |
There was a problem hiding this comment.
Minor: Comment doesn't match condition.
The comment states "Only enable in production builds" but the condition NODE_ENV !== 'development' would also enable the analyzer in test or staging environments (not just production). If the intent is production-only, use NODE_ENV === 'production'. Otherwise, update the comment to reflect the actual behavior (e.g., "Only enable in non-development builds").
Apply this diff if production-only is the intent:
- // Only enable in production builds when explicitly requested
- enabled: process.env.ANALYZE === 'true' && process.env.NODE_ENV !== 'development',
+ // Only enable in production builds when explicitly requested
+ enabled: process.env.ANALYZE === 'true' && process.env.NODE_ENV === 'production',Or update the comment if the current behavior is intentional:
- // Only enable in production builds when explicitly requested
+ // Only enable in non-development builds when explicitly requested
enabled: process.env.ANALYZE === 'true' && process.env.NODE_ENV !== 'development',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Only enable in production builds when explicitly requested | |
| enabled: process.env.ANALYZE === 'true' && process.env.NODE_ENV !== 'development', | |
| // Only enable in production builds when explicitly requested | |
| enabled: process.env.ANALYZE === 'true' && process.env.NODE_ENV === 'production', |
| // Only enable in production builds when explicitly requested | |
| enabled: process.env.ANALYZE === 'true' && process.env.NODE_ENV !== 'development', | |
| // Only enable in non-development builds when explicitly requested | |
| enabled: process.env.ANALYZE === 'true' && process.env.NODE_ENV !== 'development', |
🤖 Prompt for AI Agents
In next.config.js around lines 3 to 4 the comment "Only enable in production
builds" is misleading because the condition uses NODE_ENV !== 'development'
which also enables the analyzer in test/staging; either change the condition to
NODE_ENV === 'production' to enforce production-only, or update the comment to
"Only enable in non-development builds" to reflect current behavior—pick one and
make the corresponding change so comment and condition match.
| }, | ||
| "types": ["@serwist/next/typings", "jest"] | ||
| "types": ["@serwist/next/typings", "jest"], | ||
| "verbatimModuleSyntax": true |
There was a problem hiding this comment.
🧩 Analysis chain
LGTM: Stricter type-only import enforcement.
Enabling verbatimModuleSyntax requires type-only imports to use import type syntax, which improves tree-shaking and prevents runtime import side effects from type-only modules. Ensure the codebase consistently uses import type for type-only imports.
Run the following to check if there are type-only imports that need updating:
🏁 Script executed:
#!/bin/bash
# Description: Find imports that might need to be converted to type-only imports.
# Look for common type-only import patterns that aren't using 'import type'.
# Search for imports of types that should probably use 'import type'
rg -n --type=ts --type=tsx -C2 "^import \{[^}]*\} from ['\"]react['\"]" | rg -v "import type"
# Search for imports from type definition files
rg -n --type=ts --type=tsx "^import.*from ['\"].*\.d\.ts['\"]" | rg -v "import type"Length of output: 55
I'll run corrected shell scripts to verify the import patterns in the codebase.
🏁 Script executed:
#!/bin/bash
# Search for imports that might be type-only but aren't using 'import type'
# Use broader file matching without specifying tsx type
# Search for React imports without 'import type'
echo "=== React imports (checking for type-only patterns) ==="
rg -n "^import.*from ['\"]react['\"]" --type=ts | head -20
# Search for imports from @types packages or .d.ts files
echo "=== Type definition imports ==="
rg -n "^import.*from ['\"]@types/|^import.*from ['\"].*\.d\.ts" --type=ts | head -20
# Search for any import type statements to see what's already compliant
echo "=== Already using 'import type' ==="
rg -n "^import type" --type=ts | head -20
# Search for TypeScript/React type imports that might need the 'import type' keyword
echo "=== Potential type-only imports (React types, interfaces, etc.) ==="
rg -n "^import \{.*(?:FC|ReactNode|ReactElement|PropsWithChildren|CSSProperties|Ref)" --type=ts -o | head -20Length of output: 5371
Enforce import type for type-only React imports. Update any import statements that only pull types (e.g. FC, ReactNode, ReactElement, Ref) to use
import type { FC, ReactNode, ReactElement, Ref } from 'react'🤖 Prompt for AI Agents
In tsconfig.json around line 28, verbatimModuleSyntax is enabled but the
codebase still uses value imports for type-only React symbols; update all React
imports that only import types (e.g., FC, ReactNode, ReactElement, Ref) to use
the TypeScript type-only import form. Find every import from 'react' that only
brings types and change them to "import type { ... } from 'react'", leaving
runtime imports (useState, useEffect, default React) unchanged, and run
TypeScript/ESLint to ensure no remaining non-type imports remain.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/utils/__mocks__/justaname.ts (1)
6-22: Consider adding TypeScript return types for better maintainability.The mock implementations are correct and follow Jest best practices. However, adding explicit return types would improve IDE support and catch potential mismatches between mocks and real implementations.
Example enhancement:
interface UsePrimaryNameReturn { primaryName: string | undefined isLoading: boolean error: Error | null } export const usePrimaryName = jest.fn((): UsePrimaryNameReturn => ({ primaryName: undefined, isLoading: false, error: null, }))Apply similar patterns to
useRecordsanduseAddresses.src/utils/__mocks__/web-push.ts (1)
6-19: Consider adding TypeScript types for consistency.The mock implementations correctly mimic the web-push API:
sendNotificationproperly returns a resolved PromisegenerateVAPIDKeysreturns mock keys with the expected structure- Default export matches the module's API surface
For better type safety, consider adding explicit types:
export const setVapidDetails = jest.fn((subject: string, publicKey: string, privateKey: string): void => {}) export const sendNotification = jest.fn((subscription: any, payload?: string | Buffer): Promise<void> => Promise.resolve() )src/utils/__mocks__/reown-appkit.ts (1)
6-43: LGTM! Comprehensive mock implementation.The mock correctly implements all major hooks from
@reown/appkit/react:
- Properly nests
jest.fn()for callback functions (e.g.,open,close,switchNetwork)- Uses appropriate default values (
status: 'disconnected',isConnected: false)- Covers the full API surface needed for testing
For improved maintainability, consider adding explicit return types:
interface UseAppKitReturn { open: () => void close: () => void } export const useAppKit = jest.fn((): UseAppKitReturn => ({ open: jest.fn(), close: jest.fn(), }))Apply similar patterns to other hooks for better type safety.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
jest.setup.ts(1 hunks)package.json(1 hunks)src/utils/__mocks__/justaname.ts(1 hunks)src/utils/__mocks__/reown-appkit.ts(1 hunks)src/utils/__mocks__/web-push.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Deploy-Preview
🔇 Additional comments (3)
jest.setup.ts (1)
10-15: LGTM!The default environment variable setup follows best practices:
- Uses the safe fallback pattern
process.env.VAR || 'default'to preserve existing values- Provides sensible test-only defaults for all required variables
- Properly segregates public and private variables
package.json (2)
140-140: LGTM!The
transformIgnorePatternscorrectly excludes the new ESM packages from being ignored during transformation:
- Properly escapes
@justaname\.idwith a backslash- Uses negative lookahead
(?!...)to allow transformation of listed packages- Maintains consistency with existing patterns
147-149: LGTM!The new
moduleNameMapperentries correctly wire up the mock modules:
- Maps ESM packages to their Jest-compatible mocks
- Follows the established pattern of other mock mappings
- Properly escapes the regex special character in
@justaname\.id
| 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' |
There was a problem hiding this comment.
comment: this can be import type { blah, bleh } from 'blah'
ALSO edits 270 files lmao. It improves the file importing for types for perf