-
-
Notifications
You must be signed in to change notification settings - Fork 273
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(trading): rename package from invity to trading #16628
chore(trading): rename package from invity to trading #16628
Conversation
7da149b
to
7a03976
Compare
🚀 Expo preview is ready!
|
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.
looks good
4ecc9df
to
57fa3ea
Compare
7a03976
to
197490f
Compare
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
error Error: http://10.0.0.28:4873/@trezor%2feslint: no such package available WalkthroughThe pull request involves a comprehensive renaming and reorganization of the trading-related module from Changes
Assessment against linked issues
Poem
✨ 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/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuyPaymentWaitingForUser.tsx (1)
Line range hint
89-89
: Consider addressing the TODO comment in a separate issue.There's a TODO comment about adding transaction cancellation functionality. While not directly related to the package renaming, it would be good practice to track this as a separate issue.
Would you like me to create a new issue to track the implementation of the transaction cancellation feature?
📜 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 (64)
packages/suite-desktop-core/e2e/support/pageActions/marketActions.ts
(1 hunks)packages/suite/package.json
(1 hunks)packages/suite/src/actions/wallet/__tests__/tradingBuyActions.test.ts
(1 hunks)packages/suite/src/actions/wallet/__tests__/tradingExchangeActions.test.ts
(1 hunks)packages/suite/src/actions/wallet/trading/tradingCommonActions.ts
(1 hunks)packages/suite/src/actions/wallet/tradingBuyActions.ts
(1 hunks)packages/suite/src/actions/wallet/tradingExchangeActions.ts
(1 hunks)packages/suite/src/actions/wallet/tradingSellActions.ts
(1 hunks)packages/suite/src/hooks/wallet/trading/form/common/useTradingBuildAccountGroups.ts
(1 hunks)packages/suite/src/hooks/wallet/trading/form/common/useTradingPreviousRoute.ts
(1 hunks)packages/suite/src/hooks/wallet/trading/form/useTradingBuyForm.tsx
(1 hunks)packages/suite/src/hooks/wallet/trading/form/useTradingCommonForm.tsx
(1 hunks)packages/suite/src/hooks/wallet/trading/form/useTradingExchangeForm.ts
(1 hunks)packages/suite/src/hooks/wallet/trading/form/useTradingExchangeWatchSendApproval.ts
(1 hunks)packages/suite/src/hooks/wallet/trading/form/useTradingSellForm.ts
(1 hunks)packages/suite/src/hooks/wallet/trading/useServerEnviroment.ts
(1 hunks)packages/suite/src/hooks/wallet/trading/useTradingDetail.ts
(1 hunks)packages/suite/src/hooks/wallet/trading/useTradingWatchTrade.ts
(1 hunks)packages/suite/src/middlewares/wallet/__tests__/tradingMiddleware.test.ts
(2 hunks)packages/suite/src/middlewares/wallet/tradingMiddleware.ts
(1 hunks)packages/suite/src/reducers/suite/suiteReducer.ts
(1 hunks)packages/suite/src/reducers/wallet/tradingReducer.ts
(1 hunks)packages/suite/src/types/trading/trading.ts
(1 hunks)packages/suite/src/types/trading/tradingDetail.ts
(1 hunks)packages/suite/src/types/trading/tradingForm.ts
(1 hunks)packages/suite/src/utils/wallet/trading/tradingTypingUtils.ts
(1 hunks)packages/suite/src/utils/wallet/trading/tradingUtils.ts
(1 hunks)packages/suite/src/views/settings/SettingsDebug/InvityApi.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuy.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuyPaymentWaitingForUser.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailExchange/TradingDetailExchange.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailSell/TradingDetailSell.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersAmounts.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersItem.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersPaymentInfo.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormInput/TradingFormInputCountry.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffer.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOfferItem.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffersSwitcher.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffersSwitcherItem.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingHeader/TradingExchangeHeaderSummary.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingHeader/TradingOffersExchangeFiltersPanel.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingLayout/TradingLayoutHeader.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingOffers/TradingOffersExchange.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingPaymentPlainType.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingPaymentType.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingProviderInfo.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoExchangeType.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoItem.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoPaymentMethod.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchange.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSend.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendApproval.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendSwap.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSell.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellBankAccount.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellTransaction.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingVerify/TradingVerify.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingTransactions/TradingTransaction/TradingTransactionProvider.tsx
(1 hunks)packages/suite/src/views/wallet/trading/common/TradingUtils/TradingUtilsProvider.tsx
(1 hunks)packages/suite/tsconfig.json
(1 hunks)suite-common/trading/package.json
(1 hunks)suite-common/trading/src/invityAPI.ts
(1 hunks)suite-common/trading/src/types.ts
(2 hunks)
✅ Files skipped from review due to trivial changes (26)
- suite-common/trading/package.json
- packages/suite/src/reducers/wallet/tradingReducer.ts
- packages/suite/src/actions/wallet/tradingSellActions.ts
- suite-common/trading/src/invityAPI.ts
- packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersItem.tsx
- packages/suite/src/actions/wallet/tests/tradingBuyActions.test.ts
- packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchange.tsx
- packages/suite/src/actions/wallet/tradingExchangeActions.ts
- packages/suite/src/actions/wallet/trading/tradingCommonActions.ts
- packages/suite/src/types/trading/tradingForm.ts
- packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendSwap.tsx
- packages/suite/src/hooks/wallet/trading/form/useTradingSellForm.ts
- packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffer.tsx
- packages/suite/src/hooks/wallet/trading/form/useTradingBuyForm.tsx
- packages/suite/src/hooks/wallet/trading/form/common/useTradingPreviousRoute.ts
- packages/suite/src/utils/wallet/trading/tradingTypingUtils.ts
- packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoPaymentMethod.tsx
- packages/suite/src/actions/wallet/tradingBuyActions.ts
- packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendApproval.tsx
- packages/suite/src/utils/wallet/trading/tradingUtils.ts
- packages/suite/src/hooks/wallet/trading/form/useTradingExchangeForm.ts
- packages/suite/src/hooks/wallet/trading/form/useTradingExchangeWatchSendApproval.ts
- packages/suite/src/actions/wallet/tests/tradingExchangeActions.test.ts
- packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingVerify/TradingVerify.tsx
- packages/suite/src/reducers/suite/suiteReducer.ts
- packages/suite/src/middlewares/wallet/tradingMiddleware.ts
🔇 Additional comments (48)
packages/suite/src/middlewares/wallet/__tests__/tradingMiddleware.test.ts (2)
2-2
: LGTM! Import path updated correctly.The import path has been updated from '@suite-common/invity' to '@suite-common/trading' as part of the package rename.
16-16
: LGTM! Jest mock path updated consistently.The Jest mock path has been updated to match the new package name while maintaining the same mock implementation.
packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffersSwitcherItem.tsx (2)
6-6
: LGTM! Import path updated correctly.The import path has been updated from the old path to
@suite-common/trading
which aligns with the PR objective of renaming the package.✅ Verification successful
Import path update verification complete - all imports are consistent
The verification confirms that all imports across the codebase are consistently using '@suite-common/trading' with no remaining references to the old path.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that all similar imports have been consistently updated across the codebase rg "from '@suite-common/(invity|trading)'" --type tsLength of output: 8901
Line range hint
1-1
: Verify ifinvity-api
import should be updated.The import from
invity-api
might need to be updated for consistency with the package renaming from invity to trading.packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormInput/TradingFormInputCountry.tsx (1)
5-5
: LGTM! Import path updated correctly.The change aligns with the PR objective of renaming the package from 'invity' to 'trading'.
Let's verify that the module exists in the new location:
✅ Verification successful
Import path change verified successfully
The regional module with its countriesOptions export exists and is properly exported from the new
@suite-common/trading
package location.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the regional module exists in the new package # and that all its exports are maintained # Check if the module exists in the new location rg -g '*.{ts,tsx}' -l "export.*regional" "packages/suite-common/trading/" # Verify that countriesOptions is still exported ast-grep --pattern 'export const regional = { $$$ countriesOptions: $_, $$$ }'Length of output: 231
Script:
#!/bin/bash # First, let's understand the repository structure fd -t d "suite-common" # Find any files containing 'regional' exports in both old and new packages rg -g '*.{ts,tsx}' -l "export.*regional" # Search for any references to countriesOptions rg -g '*.{ts,tsx}' "countriesOptions"Length of output: 479
packages/suite/src/views/wallet/trading/common/TradingTransactions/TradingTransaction/TradingTransactionProvider.tsx (1)
1-1
: LGTM! Verify consistent package renaming across the codebase.The import statement has been correctly updated from
@suite-common/invity
to@suite-common/trading
, which aligns with the PR objective.Let's verify that all imports from the old package have been updated consistently:
✅ Verification successful
Import paths correctly updated, package.json references are valid
The verification confirms that:
- All imports from '@suite-common/invity' have been properly updated
- Remaining references to 'invity' are only in package.json files and specifically for '@types/invity-api' type definitions, which is correct as these are external type definitions that should maintain their original naming
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining imports from @suite-common/invity # Expected: No results, as all imports should have been updated echo "Checking for any remaining imports from @suite-common/invity..." rg "from ['|\"]@suite-common/invity['|\"]" echo "Checking for any remaining references to invity in package.json files..." fd package.json --exec rg -l "invity"Length of output: 444
Script:
#!/bin/bash # Check the context of 'invity' references in package.json files echo "Content of suite-common/trading/package.json with invity references:" cat suite-common/trading/package.json | grep -A 2 -B 2 "invity" echo -e "\nContent of packages/suite/package.json with invity references:" cat packages/suite/package.json | grep -A 2 -B 2 "invity"Length of output: 672
packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuyPaymentWaitingForUser.tsx (2)
8-8
: LGTM! Import updated correctly.The import statement has been properly updated from '@suite-common/invity' to '@suite-common/trading' as part of the package renaming effort.
Line range hint
4-4
: Verify if 'invity-api' package should also be renamed.While we're renaming from 'invity' to 'trading', there's still an import from 'invity-api'. Let's verify if this package should also be part of the renaming effort.
✅ Verification successful
Keep the 'invity-api' package name as is
The 'invity-api' package appears to be an external dependency containing API type definitions and should not be renamed as part of the migration from 'invity' to 'trading'. Renaming it would break compatibility with the external service.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if 'invity-api' is an external dependency or part of the monorepo echo "Checking package.json files for invity-api dependency..." find . -name "package.json" -type f -exec grep -l "invity-api" {} \; # Check if there are other usages of invity-api in the codebase echo "Checking other usages of invity-api..." rg "from 'invity-api'" --type ts --type tsxLength of output: 425
Script:
#!/bin/bash # Check package.json contents echo "Content of packages/suite/package.json:" cat packages/suite/package.json | jq '.dependencies["invity-api"]' echo "Content of suite-common/trading/package.json:" cat suite-common/trading/package.json | jq '.dependencies["invity-api"]' # Search for invity-api package directory echo "Searching for invity-api package directory:" fd -t d "invity-api$" # Properly search for invity-api imports echo "Searching for invity-api imports:" rg "from ['\"']invity-api" --type typescript --type-add 'typescript:*.{ts,tsx}'Length of output: 9181
packages/suite/src/hooks/wallet/trading/useServerEnviroment.ts (1)
1-1
: LGTM! Import path updated correctly.The import path has been updated from '@suite-common/invity' to '@suite-common/trading' while maintaining the existing functionality.
packages/suite/src/hooks/wallet/trading/form/useTradingCommonForm.tsx (1)
3-3
: LGTM! Type import path updated correctly.The type import path has been updated from '@suite-common/invity' to '@suite-common/trading' while maintaining type safety.
packages/suite/src/views/wallet/trading/common/TradingPaymentType.tsx (1)
3-3
: LGTM! API and type imports updated correctly.The import path for both invityAPI and TradingPaymentMethodType has been updated from '@suite-common/invity' to '@suite-common/trading' while maintaining functionality.
packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersPaymentInfo.tsx (1)
4-4
: LGTM! Type import path updated correctly.The type import path has been updated from '@suite-common/invity' to '@suite-common/trading' while maintaining type safety.
Let's verify that the package dependencies have been updated correctly:
✅ Verification successful
Dependencies verified: Import path migration is complete and correct
The package dependencies and import references have been properly updated:
- '@suite-common/trading' is correctly configured as a workspace dependency
- No remaining references to '@suite-common/invity' found in the codebase
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify package dependencies and references # Check for any remaining references to '@suite-common/invity' echo "Checking for remaining references to '@suite-common/invity'..." rg -l "@suite-common/invity" echo "Checking package.json for dependency updates..." cat packages/suite/package.json | jq '.dependencies["@suite-common/trading"], .dependencies["@suite-common/invity"]'Length of output: 412
packages/suite/src/types/trading/tradingDetail.ts (1)
2-2
: LGTM! Import path updated correctly.The import path change from '@suite-common/invity' to '@suite-common/trading' aligns with the package renaming objective.
packages/suite/src/views/wallet/trading/common/TradingPaymentPlainType.tsx (1)
1-1
: LGTM! Import path updated correctly.The import path change from '@suite-common/invity' to '@suite-common/trading' aligns with the package renaming objective.
packages/suite/src/views/wallet/trading/common/TradingUtils/TradingUtilsProvider.tsx (1)
5-5
: LGTM! Import path updated correctly.The import path change from 'src/types/trading/trading' to '@suite-common/trading' aligns with the package renaming objective. The addition of invityAPI import is consistent with its usage in the component.
packages/suite/src/views/wallet/trading/common/TradingProviderInfo.tsx (1)
3-3
: LGTM! Import path updated correctly.The import path change from '@suite-common/invity' to '@suite-common/trading' aligns with the package renaming objective.
suite-common/trading/src/types.ts (2)
33-33
: LGTM! Good type aggregation.The
TradingTradeStatusType
effectively combines the status types from buy, sell, and exchange trades into a single union type.
34-40
: LGTM! Well-structured provider props type.The
TradingUtilsProvidersProps
type provides a clear interface for provider information with appropriate optional fields.packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoExchangeType.tsx (1)
4-4
: LGTM! Correct package import update.Import correctly updated from '@suite-common/invity' to '@suite-common/trading' while maintaining the 'invity-api' dependency.
packages/suite/src/hooks/wallet/trading/form/common/useTradingBuildAccountGroups.ts (1)
4-4
: LGTM! Correct package import update.Import correctly updated from '@suite-common/invity' to '@suite-common/trading' while maintaining the hook's functionality.
packages/suite/src/views/settings/SettingsDebug/InvityApi.tsx (2)
3-4
: LGTM! Correct package import updates.Imports correctly updated from '@suite-common/invity' to '@suite-common/trading'.
Line range hint
1-52
: Consider renaming component and references for consistency.Since we're moving from 'invity' to 'trading', consider updating the following for naming consistency:
- Component name from
InvityApi
toTradingApi
- Variable names from
invityAPI
totradingAPI
- Text references from "Invity" to "Trading"
-export const InvityApi = () => { +export const TradingApi = () => { const debug = useSelector(state => state.suite.settings.debug); const dispatch = useDispatch(); - const invityApiServerOptions = Object.entries(invityAPI.SERVERS).map( + const tradingApiServerOptions = Object.entries(tradingAPI.SERVERS).map( ([environment, server]) => ({ label: server, value: environment as InvityServerEnvironment, }), ); - const selectedInvityApiServer = - invityApiServerOptions.find(s => s.value === debug.invityServerEnvironment) || - invityApiServerOptions[0]; + const selectedTradingApiServer = + tradingApiServerOptions.find(s => s.value === debug.invityServerEnvironment) || + tradingApiServerOptions[0]; const handleChange = (item: { value: InvityServerEnvironment; label: string }) => { dispatch(setDebugMode({ invityServerEnvironment: item.value })); - invityAPI.setInvityServersEnvironment(item.value); + tradingAPI.setTradingServersEnvironment(item.value); reloadApp(100); };Let's verify if there are other occurrences of "Invity" in the codebase that should be renamed:
packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOfferItem.tsx (1)
1-1
: LGTM! Import path updated correctly.The import statement has been properly updated to use the new
@suite-common/trading
package.packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoItem.tsx (1)
6-6
: LGTM! Import path updated correctly.The import statement has been properly updated to use the new
@suite-common/trading
package while correctly maintaining the separateinvity-api
import.packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSell.tsx (1)
5-5
: LGTM! Import path updated correctly.The import statement has been properly updated to use the new
@suite-common/trading
package.packages/suite/src/views/wallet/trading/common/TradingHeader/TradingOffersExchangeFiltersPanel.tsx (2)
5-5
: LGTM! Import path updated correctly.The import statement has been properly updated to use the new
@suite-common/trading
package.
Line range hint
1-85
: Verify all imports are updated consistently across the codebase.Let's ensure all imports from
@suite-common/invity
have been updated to@suite-common/trading
throughout the codebase.✅ Verification successful
All imports have been successfully migrated from
@suite-common/invity
to@suite-common/trading
The migration has been consistently applied across the entire codebase with no remaining references to the old import path.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining imports from @suite-common/invity # and verify that @suite-common/trading is used consistently echo "Checking for any remaining @suite-common/invity imports..." rg -l "@suite-common/invity" echo -e "\nVerifying @suite-common/trading imports..." rg -l "@suite-common/trading" echo -e "\nChecking package.json for dependencies..." find . -name "package.json" -exec grep -l "suite-common/[invity|trading]" {} \;Length of output: 7458
packages/suite/src/views/wallet/trading/common/TradingHeader/TradingExchangeHeaderSummary.tsx (1)
7-7
: LGTM! Import path correctly updated.The change from '@suite-common/invity' to '@suite-common/trading' is consistent with the package renaming objective.
packages/suite/src/views/wallet/trading/common/TradingLayout/TradingLayoutHeader.tsx (1)
6-6
: LGTM! Import path correctly updated.The change from '@suite-common/invity' to '@suite-common/trading' is consistent with the package renaming objective.
packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSend.tsx (1)
5-5
: LGTM! Import path correctly updated.The change from '@suite-common/invity' to '@suite-common/trading' is consistent with the package renaming objective.
packages/suite/src/views/wallet/trading/common/TradingOffers/TradingOffersExchange.tsx (1)
5-5
: LGTM! Import path correctly updated.The change from '@suite-common/invity' to '@suite-common/trading' is consistent with the package renaming objective.
packages/suite/src/hooks/wallet/trading/useTradingDetail.ts (1)
3-3
: LGTM! Import path updated correctly.The import path has been updated from '@suite-common/invity' to '@suite-common/trading' as part of the package renaming.
packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailSell/TradingDetailSell.tsx (1)
4-4
: LGTM! Import path updated correctly.The import path has been updated from '@suite-common/invity' to '@suite-common/trading' as part of the package renaming.
packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuy.tsx (1)
4-4
: LGTM! Import path updated correctly.The import path has been updated from '@suite-common/invity' to '@suite-common/trading' as part of the package renaming.
packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersAmounts.tsx (3)
8-8
: LGTM! Import path updated correctly.The import path has been updated from '@suite-common/invity' to '@suite-common/trading' as part of the package renaming.
Line range hint
1-1
: Overall Assessment: Changes look good with one consideration.The import path updates from '@suite-common/invity' to '@suite-common/trading' are consistent across all files. However, there are still references to the 'invity-api' package in some files. It would be helpful to clarify if these dependencies should also be updated as part of the package renaming effort.
Line range hint
4-4
: Verify if 'invity-api' dependency should also be updated.The file still imports
CryptoId
from 'invity-api'. Since we're renaming the package from 'invity' to 'trading', should this dependency also be updated for consistency?packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailExchange/TradingDetailExchange.tsx (1)
4-4
: LGTM! Import statement correctly updated.The import statement has been properly updated to use the new package name while maintaining the same type usage throughout the file.
packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffersSwitcher.tsx (1)
3-3
: LGTM! Multiple types correctly imported from new package.The import statement has been properly updated to import both types from the new package location while maintaining their correct usage in the component.
packages/suite/src/hooks/wallet/trading/useTradingWatchTrade.ts (1)
14-14
: LGTM! Imports correctly updated while maintaining external dependencies.The import statements have been properly updated to use the new package name while correctly maintaining the external 'invity-api' dependencies.
Let's verify that all necessary types have been moved to the trading package:
Also applies to: 20-20
✅ Verification successful
Import changes are correct and properly maintain external dependencies
The verification confirms that:
- Types are correctly imported from '@suite-common/trading'
- External invity-api dependencies are properly maintained
- No lingering references to the old package structure were found
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check for any remaining references to invity in the codebase # excluding node_modules and the invity-api package rg -g '!{node_modules,**/invity-api/**}' '@suite-common/invity'Length of output: 63
Script:
#!/bin/bash # Check for the specific types in the trading package echo "=== Checking trading package for types ===" ast-grep --pattern 'type TradingTradeStatusType' ast-grep --pattern 'type TradingType' echo -e "\n=== Checking for any remaining invity type references ===" rg -g '!{node_modules,**/invity-api/**}' 'from.*invity.*Type' echo -e "\n=== Checking the structure of trading types ===" fd trading.ts --exec cat {}Length of output: 10700
packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellTransaction.tsx (1)
5-5
: LGTM! Import statement correctly updated.The import statement has been properly updated to use the new package name while maintaining the correct type usage in the component.
packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellBankAccount.tsx (1)
8-8
: LGTM!The import path update from
@suite-common/invity
to@suite-common/trading
aligns with the package renaming objective.packages/suite/src/types/trading/trading.ts (1)
28-28
: LGTM!The import path update from
@suite-common/invity
to@suite-common/trading
aligns with the package renaming objective.packages/suite-desktop-core/e2e/support/pageActions/marketActions.ts (1)
5-5
: LGTM!The import path update from
@suite-common/invity
to@suite-common/trading
aligns with the package renaming objective.packages/suite/tsconfig.json (1)
68-68
: LGTM! Verify complete transition from invity to trading.The addition of the trading module reference aligns with the package renaming objective.
Run the following script to verify that all references to the old invity module have been removed:
packages/suite/package.json (3)
52-52
: LGTM: Addition of trading package dependency.The addition of
@suite-common/trading
aligns with the PR objective of renaming the package.
Line range hint
156-156
: Consider removing or updating@types/invity-api
dependency.Since we're renaming from
invity
totrading
, the@types/invity-api
devDependency might need to be updated or removed to maintain consistency.Let's verify the usage of these types across the codebase:
Line range hint
1-180
: Verify complete migration from invity to trading.Let's ensure all necessary dependencies have been updated consistently.
✅ Verification successful
Migration from invity to trading is complete
The migration is successfully completed. The only remaining references are type definitions (@types/invity-api) and configuration-related types (InvityServerEnvironment), which don't affect runtime behavior. No business logic, components, or runtime dependencies were found.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Comprehensive check for remaining invity references # Check package.json files across the monorepo echo "Checking package.json files for invity dependencies..." find . -name "package.json" -type f -exec grep -l "invity" {} \; # Check for any remaining invity imports in source files echo "Checking source files for invity imports..." rg "from ['\"]@suite-common/invity['\"]" # Check for any remaining invity string literals echo "Checking for invity string literals..." rg "invity" --type ts --type tsx --type js --type jsx --type jsonLength of output: 575
Script:
#!/bin/bash # Description: Detailed check for remaining invity references with fixed commands # Check content of identified package.json files echo "Content of suite/package.json invity references:" cat ./packages/suite/package.json | grep -A 2 -B 2 "invity" echo -e "\nContent of trading/package.json invity references:" cat ./suite-common/trading/package.json | grep -A 2 -B 2 "invity" # Check for invity string literals with correct file type handling echo -e "\nChecking for invity string literals in source files:" rg "invity" --type-add 'tsx:*.tsx' --type-add 'ts:*.ts' --type ts --type tsx --type js --type jsx --type json # Check for invity types and interfaces echo -e "\nChecking for invity types and interfaces:" rg "type.*Invity|interface.*Invity|enum.*Invity" --type-add 'tsx:*.tsx' --type-add 'ts:*.ts' --type ts --type tsxLength of output: 1561
Script:
#!/bin/bash # Description: Final check for invity business logic and components # Check for invity-related components and business logic echo "Checking for invity-related components and logic:" rg "invity" --type=typescript --type=javascriptreact --type=typescriptreact -g '!*.d.ts' -g '!package.json' -B 3 -A 3 # Check for any invity URLs or API endpoints echo -e "\nChecking for invity URLs and endpoints:" rg "invity\.(com|io|org)|api\.invity" --type=typescript --type=javascriptreact --type=typescriptreact --type=json # Check for invity-related imports and exports echo -e "\nChecking for invity-related imports and exports:" rg "import.*invity|export.*invity" --type=typescript --type=javascriptreact --type=typescriptreactLength of output: 756
Script:
#!/bin/bash # Description: Final verification with correct ripgrep syntax # Check for any invity-related code (excluding types and package.json) echo "Checking for invity-related code:" rg "invity" -t ts -t tsx -t js -t jsx -g '!*.d.ts' -g '!package.json' -B 3 -A 3 # Check for invity URLs and endpoints echo -e "\nChecking for invity URLs and endpoints:" rg "invity\.(com|io|org)|api\.invity" -t ts -t tsx -t js -t jsx -t json # Check for invity-related imports and exports echo -e "\nChecking for invity-related imports and exports:" rg "import.*invity|export.*invity" -t ts -t tsx -t js -t jsxLength of output: 585
1a2d177
to
46b80fb
Compare
4425d89
to
24e7357
Compare
9b5e65b
to
a8d3826
Compare
Description
Related Issue
Resolve #16627
Summary by CodeRabbit
Based on the comprehensive summary, here are the release notes:
Release Notes
Module Reorganization
@suite-common/invity
to@suite-common/trading
Type System Improvements
TradingUtilsProvidersProps
to enhance provider information handlingDependency Updates
@suite-common/invity
@suite-common/trading
No functional changes to the core trading logic were made during this refactoring.