-
-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(suite-native): enable and discover account via trade #17266
base: develop
Are you sure you want to change the base?
Conversation
🚀 Expo preview is ready!
|
WalkthroughThe update restructures internationalization messages by organizing account and address empty states into nested objects. In the add coin account module, new type definitions and modified function signatures have been introduced to improve type safety and update navigation logic, including the addition of a confirmation handler. Exports have been extended to include new hooks and components. Several screens have been updated to simplify account confirmation processes and adjust navigation based on flow types. The trading module now integrates Redux for managing state in components, updates imports and dependencies, and removes obsolete tests and components. Additionally, the navigation configuration has been expanded to include a new route for receiving accounts, and the package configuration has been updated with new dependencies. ✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (7)
suite-native/module-trading/src/hooks/useSectionListData.tsx (2)
8-12
: Rename or clarify theItemRenderConfig
type name for broader usage.
WhileItemRenderConfig
is descriptive, consider adding more context or a doc comment about its purpose and usage, as it’s a core interface for the item rendering logic.
137-187
: Excellent custom hook architecture for section lists.
The combined usage ofuseMemo
for item counts and list size calculations is beneficial for performance. Ensure that upstream changes (e.g., dynamic item heights) are tracked if future design requirements evolve.suite-native/module-trading/src/components/general/AccountSheet/NoAccountsComponent.tsx (1)
34-59
: Good implementation of conditional UI based on device mode.The component correctly implements different messages based on the device's view-only mode status, which aligns with the PR requirement that account discovery should be restricted when the device is not connected.
Consider extracting the translation IDs into constants to avoid hardcoding strings in the component:
+const TRANSLATION_IDS = { + VIEW_ONLY_TITLE: 'moduleTrading.accountSheet.accountEmpty.viewOnly.title', + VIEW_ONLY_DESCRIPTION: 'moduleTrading.accountSheet.accountEmpty.viewOnly.description', + NETWORK_NOT_ENABLED_TITLE: 'moduleTrading.accountSheet.accountEmpty.networkNotEnabled.title', + NETWORK_NOT_ENABLED_DESCRIPTION: 'moduleTrading.accountSheet.accountEmpty.networkNotEnabled.description' +}; export const NoAccountsComponent = ({ isBottomRounded }: NoAccountsComponentProps) => { const { applyStyle } = useNativeStyles(); const isDeviceInViewOnlyMode = useSelector(selectIsDeviceInViewOnlyMode); const title = isDeviceInViewOnlyMode ? ( - <Translation id="moduleTrading.accountSheet.accountEmpty.viewOnly.title" /> + <Translation id={TRANSLATION_IDS.VIEW_ONLY_TITLE} /> ) : ( - <Translation id="moduleTrading.accountSheet.accountEmpty.networkNotEnabled.title" /> + <Translation id={TRANSLATION_IDS.NETWORK_NOT_ENABLED_TITLE} /> ); const description = isDeviceInViewOnlyMode ? ( - <Translation id="moduleTrading.accountSheet.accountEmpty.viewOnly.description" /> + <Translation id={TRANSLATION_IDS.VIEW_ONLY_DESCRIPTION} /> ) : ( - <Translation id="moduleTrading.accountSheet.accountEmpty.networkNotEnabled.description" /> + <Translation id={TRANSLATION_IDS.NETWORK_NOT_ENABLED_DESCRIPTION} /> );suite-native/module-trading/src/screens/ReceiveAccountsPickerScreen.tsx (1)
154-159
: Ensure empty state handling is comprehensive.The filter variable is defined but appears to not be used anywhere else in the component. Consider removing it if unused or implement filtering functionality.
-const filter = ''; -const emptyComponent = - filter.length > 0 ? ( - <AddressListEmptyComponent /> - ) : ( - <NoAccountsComponent isBottomRounded={isDeviceInViewOnlyMode} /> - ); +const emptyComponent = pickerMode === 'address' + ? <AddressListEmptyComponent /> + : <NoAccountsComponent isBottomRounded={isDeviceInViewOnlyMode} />;suite-native/module-add-accounts/src/hooks/useAddCoinAccount.ts (1)
377-389
: Added account type confirmation handler with timeout.The new
handleAccountTypeConfirmation
function improves the user experience by streamlining the confirmation process and includes a timeout to prevent UI crashes during transitions.Consider extracting the timeout value to a named constant to make the code more maintainable:
+const ACCOUNT_TYPE_CONFIRMATION_TIMEOUT = 100; // ms + const handleAccountTypeConfirmation = (flowType: AddCoinFlowType) => { if (networkSymbolWithTypeToBeAdded) { // Timeout is needed so AccountTypeDecisionBottomSheet has time to hide otherwise app crashes setTimeout(() => { addCoinAccount({ symbol: networkSymbolWithTypeToBeAdded[0], accountType: networkSymbolWithTypeToBeAdded[1], flowType, }); - }, 100); + }, ACCOUNT_TYPE_CONFIRMATION_TIMEOUT); clearNetworkWithTypeToBeAdded(); } };suite-native/module-add-accounts/src/screens/AddCoinDiscoveryFinishedScreen.tsx (1)
115-115
: Confirm coin name usage.
PassingnetworkSymbol
ascoinName
might differ from the human-readable coin name. If needed, consider retrieving the full coin name fromgetNetwork(networkSymbol).name
for consistency.suite-native/module-trading/src/components/buy/ReceiveAccountPicker.tsx (1)
92-96
: Conditional navigation inopenAccountPicker
.
Selecting the route only whenselectedSymbol
is defined prevents erroneous navigation. Consider logging or providing user feedback ifselectedSymbol
is absent.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (25)
suite-native/intl/src/en.ts
(1 hunks)suite-native/module-add-accounts/src/hooks/useAddCoinAccount.ts
(11 hunks)suite-native/module-add-accounts/src/index.ts
(1 hunks)suite-native/module-add-accounts/src/screens/AddCoinAccountScreen.tsx
(1 hunks)suite-native/module-add-accounts/src/screens/AddCoinDiscoveryFinishedScreen.tsx
(4 hunks)suite-native/module-add-accounts/src/screens/AddCoinDiscoveryRunningScreen.tsx
(2 hunks)suite-native/module-add-accounts/src/screens/SelectAccountTypeScreen.tsx
(5 hunks)suite-native/module-trading/package.json
(1 hunks)suite-native/module-trading/src/components/buy/BuyCard.tsx
(4 hunks)suite-native/module-trading/src/components/buy/ReceiveAccountPicker.tsx
(3 hunks)suite-native/module-trading/src/components/buy/__tests__/ReceiveAccountPicker.comp.test.tsx
(0 hunks)suite-native/module-trading/src/components/general/AccountSheet/AccountSheet.tsx
(0 hunks)suite-native/module-trading/src/components/general/AccountSheet/AddressListEmptyComponent.tsx
(1 hunks)suite-native/module-trading/src/components/general/AccountSheet/NoAccountsComponent.tsx
(1 hunks)suite-native/module-trading/src/components/general/TradeableAssetsSheet/TradeableAssetsSheet.tsx
(1 hunks)suite-native/module-trading/src/components/general/TradingBottomSheetSectionList.tsx
(2 hunks)suite-native/module-trading/src/hooks/__tests__/useReceiveAccountsListData.test.tsx
(10 hunks)suite-native/module-trading/src/hooks/__tests__/useSelectedAccount.test.ts
(0 hunks)suite-native/module-trading/src/hooks/useReceiveAccountsListData.ts
(3 hunks)suite-native/module-trading/src/hooks/useSectionListData.tsx
(1 hunks)suite-native/module-trading/src/hooks/useSelectedAccount.ts
(0 hunks)suite-native/module-trading/src/navigation/TradingStackNavigator.tsx
(2 hunks)suite-native/module-trading/src/screens/ReceiveAccountsPickerScreen.tsx
(1 hunks)suite-native/navigation/src/navigators.ts
(2 hunks)suite-native/navigation/src/routes.ts
(1 hunks)
💤 Files with no reviewable changes (4)
- suite-native/module-trading/src/components/buy/tests/ReceiveAccountPicker.comp.test.tsx
- suite-native/module-trading/src/components/general/AccountSheet/AccountSheet.tsx
- suite-native/module-trading/src/hooks/useSelectedAccount.ts
- suite-native/module-trading/src/hooks/tests/useSelectedAccount.test.ts
✅ Files skipped from review due to trivial changes (1)
- suite-native/module-trading/src/components/general/TradeableAssetsSheet/TradeableAssetsSheet.tsx
🔇 Additional comments (70)
suite-native/module-trading/src/hooks/useSectionListData.tsx (6)
1-3
: Nice use of React Native Reanimated imports.
The fade-in/out animations bring a smooth visual transition for section headers and items.
14-25
: Thorough type definitions for sectioned data and internal item shapes.
These definitions effectively separate concerns for section headers versus items. This enhances readability and helps ensure correct usage in the rendering logic.
36-59
: Conditional border styling is well-structured.
Using theextend
array to conditionally apply corner radii based onisFirst
/isLast
provides clean and maintainable styling for card-like sections.
60-88
: Verify the single-section header logic.
(!noSingletonSectionHeader || inputData.length > 1)
ensures headers are rendered for multiple sections or ifnoSingletonSectionHeader
is false, but consider edge cases where a single section might contain many items. If the design requires a header even for one large section, this logic might need revisiting.
90-104
: Great usage ofUnreachableCaseError
.
This pattern enforces exhaustive handling of union types, catching changes in the data structure at compile time. Keep it up!
106-135
: Clear separation of section header vs. item rendering.
The switch statement is straightforward and leveragesAnimatedBox
for subtle transitions, resulting in well-organized item rendering code.suite-native/module-trading/src/components/general/TradingBottomSheetSectionList.tsx (4)
1-3
: Imports are concise and relevant.
Removing unnecessary imports keeps the file cleaner.
5-10
: Defer to new hook definitions for data structures.
CentralizingItemRenderConfig
,SectionListData
, andListInternalItemShape
in the hook promotes a more modular design.
39-50
: Seamless integration withuseSectionList
.
The component effectively delegates data transformation and rendering concerns to the new hook, simplifying local logic.
53-55
: UsingBottomSheetFlashList
with internal data.
Passing the derived props (internalData
,internalKeyExtractor
,internalRenderItem
) keeps the component minimal and focused on its role.suite-native/navigation/src/routes.ts (1)
129-132
: Nice addition to the trading stack routes!Adding
ReceiveAccounts
to theTradingStackRoutes
enum aligns well with the PR objective of enabling account discovery within the trade section. This route will be used for the new account selection screen where users can choose accounts for receiving assets.suite-native/module-add-accounts/src/index.ts (1)
2-3
: Good modularity improvementExposing these hooks and components makes them available for the trading module to utilize, which is essential for the account discovery feature described in the PR objectives. This approach promotes code reuse across modules.
suite-native/module-trading/src/components/general/AccountSheet/AddressListEmptyComponent.tsx (1)
7-8
:❓ Verification inconclusive
Translation keys restructured for better organization
The translation keys have been updated to use a more hierarchical structure, changing from flat keys to nested ones. This is a good practice for better organization of internationalization resources.
Make sure these new translation keys are properly added to all language files to prevent any missing translations.
🏁 Script executed:
#!/bin/bash # Search for the new translation keys in language files echo "Checking for new translation keys in language files" grep -r "moduleTrading.accountSheet.addressEmpty" --include="*.ts" suite-native/intl/src/Length of output: 202
Translation Keys Update Verification Needed
The AddressListEmptyComponent now uses the updated translation keys ("moduleTrading.accountSheet.addressEmpty.title" and "moduleTrading.accountSheet.addressEmpty.description") to enforce a more hierarchical structure. However, our search in the language files (under suite-native/intl/src) did not return any matches for these keys. Please manually verify that these keys have been added to all relevant language files (including both TS and, if applicable, JSON files) to prevent missing translations at runtime.
suite-native/module-trading/src/navigation/TradingStackNavigator.tsx (2)
9-9
: Clean import addition.Import for the new ReceiveAccountsPickerScreen component is correctly added to support the new navigation route.
24-28
: Good implementation of the new screen route.The ReceiveAccounts screen is properly added to the TradingStack navigator with appropriate title and component configuration, which enables the account discovery functionality mentioned in the PR objectives.
suite-native/module-add-accounts/src/screens/AddCoinAccountScreen.tsx (2)
28-28
: Function rename looks good.The change from
addCoinAccount
tohandleAccountTypeConfirmation
improves readability by clearly describing the function's purpose.
36-36
:❓ Verification inconclusive
Simplified implementation.
The handleConfirmTap function has been simplified to directly call handleAccountTypeConfirmation with the flowType parameter, removing any previous timeout logic.
Verify that the timeout logic is properly implemented in the handleAccountTypeConfirmation function to prevent potential UI freezes during confirmation:
🏁 Script executed:
#!/bin/bash # Search for the implementation of handleAccountTypeConfirmation rg -A 10 "handleAccountTypeConfirmation.*=" --type typescriptLength of output: 98
I'll re-run the verification without specifying the file type to ensure we capture all possible locations for the
handleAccountTypeConfirmation
implementation. Please run the following script:#!/bin/bash # Searching for the implementation of handleAccountTypeConfirmation without specifying file type rg -A 10 "handleAccountTypeConfirmation" .Once you obtain the output, we can verify if the timeout logic is integrated as expected in the
handleAccountTypeConfirmation
function. Please share the results.suite-native/module-trading/src/components/general/AccountSheet/NoAccountsComponent.tsx (2)
8-10
: Good props definition.The props interface is clear and properly typed with a boolean flag for styling control.
12-32
: Well-structured styling.The styling approach using prepareNativeStyle with conditional styling for bottom corners is clean and maintainable.
suite-native/navigation/src/navigators.ts (2)
146-146
: Good type extension.Adding 'trade' to AddCoinFlowType properly extends the navigation capabilities to support the account discovery functionality within the trading context.
236-236
: Well-defined route parameter.The new ReceiveAccounts route is correctly defined with a required symbol parameter of type NetworkSymbol, which enables proper type checking for this route.
suite-native/module-trading/src/components/buy/BuyCard.tsx (5)
2-2
: Moving to Redux for state management.You've added Redux imports here, which is consistent with the architectural changes needed to support account discovery within the trading flow.
14-15
: Appropriate imports for Redux integration.The imports for Redux selectors and actions are properly added, along with the required type import.
27-28
: Redux setup for account management.Good implementation of the Redux hooks to manage the selected receive account state centrally, which will make it easier to share this state with other components that need to access it.
35-37
: State management moved to Redux.The useEffect hook now properly dispatches a Redux action instead of using local state. This is a good change for centralizing state management, particularly for features that need to be accessed across different components.
64-64
: Simplified ReceiveAccountPicker props.You've simplified the component by only passing the selectedSymbol and removing the local state management props, which is appropriate since this state is now managed in Redux.
suite-native/module-add-accounts/src/screens/AddCoinDiscoveryRunningScreen.tsx (3)
21-26
: Import structure improvements.Good organization of imports with explicit type imports from navigation, which improves code readability and maintainability.
30-32
: Enhanced type safety with StackProps.The component now properly types its props using StackProps with specific route parameters, which improves type safety and developer experience.
62-66
: Special handling for trade flow.This new conditional block implements the special handling for the 'trade' flow type, allowing users to return to the trade section after account discovery. This is a key part of the new feature to enable account discovery from the trade section.
suite-native/module-add-accounts/src/screens/SelectAccountTypeScreen.tsx (5)
28-32
: Improved import structure.The destructured imports are now more explicit, which improves code readability.
89-95
: New helper function for safer translation access.The
getAccountTypeTranslations
function adds robustness by safely checking if a translation exists before attempting to access it, which prevents potential runtime errors.
115-115
: Safer access to translation keys.Now using the helper function to safely retrieve the translation key, which is more robust against potential missing translations.
145-149
: Null check for missing translations.Good defensive programming by checking if translation data exists before attempting to use it, which prevents potential errors if account types are added without corresponding translations.
187-189
: Conditional translation for undefined keys.The translation function now safely handles the case where accountTypeKey might be undefined, preventing potential rendering issues.
suite-native/module-trading/src/hooks/__tests__/useReceiveAccountsListData.test.tsx (6)
10-10
: Updated import for new mode parameter.The import now correctly includes the ReceiveAccountsListMode type which is used in the updated hook interface.
62-62
: Added mode parameter to test helper function.The test helper function signature has been updated to include the new mode parameter, which matches the changes in the hook API.
66-67
: Updated hook call with mode parameter.The hook call now correctly passes the mode parameter along with the other arguments, matching the updated hook interface.
77-77
: Default mode in initial props.Setting a default mode in the initial props ensures backward compatibility in test cases that might not explicitly specify a mode.
91-95
: Updated all test cases with mode parameter.All test cases now correctly include the mode parameter, ensuring complete test coverage for both 'account' and 'address' modes.
Also applies to: 110-113, 128-136, 145-157, 189-192, 220-224
116-116
: Updated rerender call with mode parameter.The rerender call now correctly includes the mode parameter to maintain consistency with the initial render.
suite-native/module-trading/src/hooks/useReceiveAccountsListData.ts (4)
16-22
: Type definitions look good and improve code clarity.The introduction of clear type definitions for
ReceiveAccountsListMode
andUseReceiveAccountsListDataProps
provides better structure and makes the code more maintainable.
36-49
: Improved conditional logic with the new mode parameter.The logic now relies on the explicit mode parameter rather than inferring it from whether selectedAccount exists. This makes the code's intention clearer and more maintainable.
78-78
: Correctly updated useMemo dependencies.The
mode
parameter has been properly added to the dependency array, ensuring the memoized value recalculates when the mode changes.
24-28
:✅ Verification successful
API change improves flexibility but requires updates to all consumers.
The hook signature change from individual parameters to an object parameter follows React best practices and makes it easier to add or modify parameters in the future.
Note that this is a breaking change that requires updating all places where this hook is called.
🏁 Script executed:
#!/bin/bash # Find all usages of useReceiveAccountsListData to verify they've been updated rg "useReceiveAccountsListData\(" --type tsx --type tsLength of output: 84
Refactor hook API usage across the codebase
The updated hook signature now accepts an object parameter, which follows React best practices and allows for easier modifications in the future. However, since this is a breaking change, please ensure that every consumer of
useReceiveAccountsListData
has been updated accordingly.
- Verify that there are no lingering calls using the old parameter format.
- Re-run the above script or perform a manual code review to confirm that all invocations match the updated hook signature.
🏁 Script executed:
#!/bin/bash # Re-run the search for all usages of useReceiveAccountsListData in .ts and .tsx files rg "useReceiveAccountsListData\(" -g "*.ts" -g "*.tsx"Length of output: 328
Hook API change verified in consumer usage
The updated hook signature (taking an object parameter) is now properly propagated. The search confirms that both the main consumer in suite-native/module-trading/src/screens/ReceiveAccountsPickerScreen.tsx and the test in suite-native/module-trading/src/hooks/tests/useReceiveAccountsListData.test.tsx are updated to use the new object parameter.
No further changes are required.
suite-native/module-trading/src/screens/ReceiveAccountsPickerScreen.tsx (6)
76-76
: State management looks good.Proper initialization of picker mode state using the
ReceiveAccountsListMode
type from the hooks file.
78-83
: Good integration with the modified hook.The component correctly uses the updated
useReceiveAccountsListData
hook with the new parameter structure.
94-103
: Account selection logic is well-implemented.The
onItemSelect
function handles account selection, correctly updating Redux state and managing navigation based on whether the selected account has addresses.
123-129
: Well-structured handler methods.The handler methods are concise and each have a single responsibility, following good functional programming principles.
133-151
: Conditional footer rendering improves UX.The footer component is conditionally rendered based on device mode and picker mode, providing a good user experience with appropriate actions available in different states.
181-188
: Good integration with AccountTypeDecisionBottomSheet.The component properly integrates with the
AccountTypeDecisionBottomSheet
and passes all required props for account type selection.suite-native/intl/src/en.ts (1)
1294-1309
: Improved i18n structure with more specific error messages.The restructuring of the accountSheet messages into nested objects provides better context-specific error messages for different empty states:
- View-only mode without accounts
- Network not enabled without accounts
- Address not found (preserved from previous structure)
This change aligns well with the new account selection functionality introduced in the ReceiveAccountsPickerScreen.
suite-native/module-add-accounts/src/hooks/useAddCoinAccount.ts (5)
53-53
: Improved type safety with AddCoinEnabledAccountType.The new type properly excludes unsupported account types, making the code more type-safe.
189-196
: Added support for 'trade' flow type.The navigation logic correctly handles the 'trade' flow type, checking the current route and using appropriate navigation actions.
233-233
: Enhanced type safety with explicit parameter typing.The explicit type annotation for the flowType parameter improves type safety and code clarity.
350-363
: Conditional navigation based on flow type.The function now handles navigation differently for 'trade' flow versus other flows, using the appropriate navigation method based on context.
401-401
: Export for the new confirmation handler function.The function is properly added to the hook's return object, making it available to consumers.
suite-native/module-add-accounts/src/screens/AddCoinDiscoveryFinishedScreen.tsx (5)
15-23
: Good use of typed imports for navigation.
These new imports from@suite-native/navigation
enhance type safety and maintain consistency across files.
29-33
: Navigation type aligns well with stack structure.
IntroducingAddCoinDiscoveryFinishedScreenNavigationProps
keeps the route parameters strongly typed and helps avoid runtime navigation errors.
37-42
: Screen parameters strongly defined.
Wrapping the screen component with typedStackProps
ensures theroute
prop matches the expected structure forAddCoinDiscoveryFinishedScreen
.
51-51
: Ensure usage consistency ofhandleAccountTypeConfirmation
.
This function replaces the older account confirmation logic. Double-check that all references are updated and tested.Would you like me to generate a script that scans for any remaining calls to deprecated handlers, so you can verify everything points to
handleAccountTypeConfirmation
?
71-71
: Simple direct call to handle confirmations.
This approach is more streamlined, but verify thatflowType
is always defined to avoid unexpected behavior if navigated incorrectly.suite-native/module-trading/src/components/buy/ReceiveAccountPicker.tsx (9)
2-2
: ReduxuseSelector
import is consistent with the pattern.
This standard approach integrates component state with the global Redux store effectively.
4-4
: Navigation import is appropriate.
UsinguseNavigation
helps decouple the component from higher-level navigators while maintaining typed route support.
9-14
: Extended navigation types.
Bringing inRootStackParamList
,TradingStackParamList
, andTradingStackRoutes
clarifies route transitions and ensures type checking across route boundaries.
17-17
: Select function from Redux store.
selectBuySelectedReceiveAccount
is well named. Confirm that the state slice is tested so the component always gets correct account data.
32-36
: DedicatedNavigationProps
is clear.
Defining a specialized type for navigation props improves maintainability and avoids duplication in multiple components.
38-40
: StreamlinedReceiveAccountPickerProps
.
Removing unneeded dependencies and exposing onlyselectedSymbol
makes the component’s interface more focused.
87-90
: Hook-based navigation and Redux integration.
This pattern is concise and consistent. Make sure that edge cases (e.g.,selectedSymbol
isundefined
) are handled upstream.
98-104
: Fetch address text from account object.
The fallback toaccount.descriptor
ifaddresses
are missing is a logical approach. Ensure that other parts of the UI handledescriptor
gracefully if no addresses exist.
107-119
: Enhanced layout withTradingOverviewRow
.
This approach organizes the UI clearly, placing the account information in the right column. The refactor away from inline sheet rendering simplifies the component structure.
"@mobily/ts-belt": "^3.13.1", | ||
"@react-navigation/native": "6.1.18", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
New dependencies support the account discovery feature
The added dependencies support the PR objective of enabling account discovery via trade:
@mobily/ts-belt
: Provides functional programming utilities@react-navigation/native
: Essential for the new navigation routes@shopify/flash-list
: Optimized list rendering for account selectionreact-native-safe-area-context
: Ensures proper layout within safe areas
Note that there's a mix of version specification styles (some with ^ and some with exact versions). Consider standardizing the versioning approach for better maintenance.
Also applies to: 18-18, 26-26
🏁 Script executed:
#!/bin/bash
# Check if all the new dependencies are properly installed
echo "Verifying new dependencies in node_modules"
ls -la node_modules/@mobily/ts-belt node_modules/@react-navigation/native node_modules/@shopify/flash-list node_modules/react-native-safe-area-context 2>/dev/null || echo "Some dependencies might not be installed"
Length of output: 338
Attention: Missing Dependency Installations
While the new dependencies in suite-native/module-trading/package.json
support the account discovery feature, the verification step indicates that one or more of the following dependencies are not present in the node_modules
directory:
@mobily/ts-belt
@react-navigation/native
@shopify/flash-list
react-native-safe-area-context
Please ensure that the package install process (e.g. running npm install
or yarn install
) completes successfully. Additionally, note the mix of version specifications (some using the caret ^
and others exact); it is recommended to standardize the versioning approach for consistency and better maintenance.
Also applies to similar dependency entries on lines 18 and 26.
Related Issue
Resolve #16990
Screenshots:
Simulator.Screen.Recording.-.iPhone.16.-.2025-02-26.at.23.03.31.mp4
Simulator.Screen.Recording.-.iPhone.16.-.2025-02-26.at.23.05.14.mp4