-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
chore(suite-native): move tokenDefinitionsMiddleware to desktop packages #16940
base: develop
Are you sure you want to change the base?
chore(suite-native): move tokenDefinitionsMiddleware to desktop packages #16940
Conversation
WalkthroughThe pull request implements changes in the middleware configuration and module organization. In the wallet middleware index file, the source of ✨ Finishing Touches
🪧 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: 0
🧹 Nitpick comments (1)
packages/suite/src/middlewares/wallet/tokenDefinitionsMiddleware.ts (1)
4-6
: Consider using package imports instead of relative paths.The current import paths are quite long and include
/src/
which might expose internal implementation details. Consider updating the imports to use the package name instead:-import { selectNetworkTokenDefinitions } from '../../../../../suite-common/token-definitions/src/tokenDefinitionsSelectors'; -import { getTokenDefinitionThunk } from '../../../../../suite-common/token-definitions/src/tokenDefinitionsThunks'; -import { getSupportedDefinitionTypes } from '../../../../../suite-common/token-definitions/src/tokenDefinitionsUtils'; +import { selectNetworkTokenDefinitions, getTokenDefinitionThunk, getSupportedDefinitionTypes } from '@suite-common/token-definitions';This would:
- Make the imports more maintainable
- Hide implementation details
- Reduce the risk of path-related issues
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/suite/src/middlewares/wallet/index.ts
(1 hunks)packages/suite/src/middlewares/wallet/tokenDefinitionsMiddleware.ts
(1 hunks)suite-common/token-definitions/src/index.ts
(0 hunks)
💤 Files with no reviewable changes (1)
- suite-common/token-definitions/src/index.ts
🔇 Additional comments (2)
packages/suite/src/middlewares/wallet/index.ts (1)
18-18
: LGTM! Import path updated correctly.The import path change aligns with the PR objective of moving the middleware to the desktop packages while maintaining the existing functionality.
packages/suite/src/middlewares/wallet/tokenDefinitionsMiddleware.ts (1)
10-35
: LGTM! Middleware implementation preserved.The middleware implementation remains unchanged and continues to work correctly with the token definitions functionality from suite-common.
Description
Moving
tokenDefinitionsMiddleware
from suite-common to suite.Related Issue
Trying to resolve issue #11454.
Screenshots: