Resolve todo comments
Description
Todos are one of the issues is marked by DeepScan as critical so it’s recommended to resolve it as soon as possible. In the project there are 10 TODO’s in 6 files. Resolving the issue will increase code clarity, unit test coverage, improve error handling and much more.
Motivation
- Improve maintainability
- Prevent unhandeled errors
Additional Information
Search for TODO comments inside the code.
Price ticker:
- On error: Show the local fee calculation
dynamicFeesRetrieved
- On error: Show local fee calculation
settingsRetrieved
- On error: Reset to default (create a default setting object)
Unmapped deep link
- Design to be provided
Notifications
- Discuss separately
onBackButtonPressedAndroid
- Get more details on what should be fixed here
For the current state of the app in development, we have the following TODOs:
-
e2e/packages/Auth.e2e.js: 1.1. Download passphrase before selecting account. 1.2. Test tokens are displayed: We need to write tests to ensure tokens are fetched and displayed correctly on the home screen (token title, amount, symbol) -
e2e/packages/Settings.e2e.js: Fix settings end to end test. -
libs/wcm/utils/connectionCreator.js: Replace WC client icon with Lisk Service provided assets by #4465 / @reyraa looks like this issue doesn't exist on mobile neither in desktop. -
libs/wcm/utils/requestHandlers.js: Add test coverage by #4418 / @reyraa looks like this issue on mobile is not related to this. -
libs/wcm/utils/requestHandlers.test.js: Add tests by #4418 / @reyraa same -
src/BootstrapApp.js: Replace dummy loading fallback with<LoadingFallbackScreen />component when working on https://github.com/LiskHQ/lisk-mobile/issues/1587. -
src/actions/service.js: Redux error catches needs to be handled properly. Currently using clgs. -
src/assets/svgs/CaretSvg.js: Add missing SVGs according to directions. -
src/components/shared/BottomModal/index.js: Replace{children}container with anotherVirtualizedList-backed container.VirtualizedListsshould never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality. -
src/components/shared/DataRenderer/index.js: Add skeletons and error general component for loading and error states. -
src/components/shared/imessage/confirm/index.js: Consume transactions hooks instead when they are created / @reyraa can you provide more context on this? -
src/components/shared/loading/index.js: Reinstate lottie after upgrade / Not sure if this component stills being used. -
src/modules/Accounts/index.js: 13.1. Implement release notification. 13.2. Implement custom message: this can be used in case we need to notify the user about any unforeseen issue/change. -
src/modules/Accounts/components/AccountItem/index.js: Implement backup action.onPresscallback is mocked. -
src/modules/Accounts/components/AccountList/index.js: Integrate pagination props whenuseAccountsis refactored to use react-query. -
src/modules/Auth/AuthMethod/index.js: 16.1. Confirm valid file and show necessary error if any after callingselectEncryptedFileonselectEncryptedJSONfunction. 16.2. Handle error message onselectEncryptedJSONerror catch. -
src/modules/BlockchainApplication/api/useApplicationSupportedTokensQuery.js: Query for each token theGET /meta/tokensendpoint when service solvestokenIDinconsistency betweenGET /tokens/summaryandGET /meta/tokensresponses. -
src/modules/BlockchainApplication/hooks/useApplicationsExplorer.js: Pass as CSV ofchainIDs when backend supports feature. e.g.:applicationsData?.data.map((app) => app.chainID). -
src/modules/SendToken/components/SelectApplicationsStep/components.js: Integrate pagination props on applicationsInfiniteScrollListusing react-query. -
src/modules/SendToken/components/SelectTokenStep/components.js: 20.1. Read token symbol from account info when backend send the data onTokenSelectFieldpicker options. 20.2. Integrate pagination props on tokens picker options using react-query. -
src/modules/Settings/actions/settings.js: Rejection must is not handled onsettingsRetrievedRedux dispatcher. -
src/modules/Settings/components/ItemTitle/index.js: Update to use own defined icons (remove react-native-vector-icons) to solve current inconsistencies. -
src/modules/Transactions/hooks/useCCMFeeCalculator.js: Implement real calculation business logic. -
src/modules/Transactions/hooks/useInitializationFeeCalculator.js: Implement real calculation business logic. -
src/modules/Transactions/hooks/useTransactionAssets.js: Add custom images for each transaction type image. -
src/modules/Transactions/hooks/useTransactionList.js: Remove when wallet module is refactored and stop using it (deprecated - UseuseAccountTransactionsQueryinstead.). -
src/modules/Transactions/utils/constants.js: ForBASE_TRANSACTION_SCHEMA, we need to use the object fetched from service endpoint/elements. -
src/modules/Transactions/utils/helpers.js: ForgetDryRunTransactionError, calculate properly the error message and integrate it with UI. See https://github.com/LiskHQ/lisk-mobile/issues/1578 for details. -
src/modules/Transactions/utils/Transaction.js: On thesignmethod, updatenetworkIdentifiertochainIDonce service endpoint is updated. -
src/modules/Wallet/index.js: Implement saved language detection, release notification, custom message, useuseAccountTransactionsQueryinstead and useInfiniteScrollListinstead. @Balanced02 I think this component will be deprecated right? -
src/navigation/index.js: MoveuseWalletConnectEventsManager()toBootstrapAppcomponent.
@Balanced02 lets discuss here which ones need a separate issue to be solved.
I think 1., 2., needs a separate issue.
Most of these would have their separate issues.
We don't need 12 again, we can remove everything related to Lottie on the mobile app 30. InfiniteScrollList should not be depreciated... we'll need this along with the query to fetch more data 26. We need to confirm if we're removing the explorer from mobile completely. It's removed atm.
Can we create these as sub-tasks so we can work on them individually?
@Balanced02 , I removed the old Loading component (point 12).
Regarding to 30. , I didn't mean that InfiniteScrollList is deprecated, I meant that the Wallet component is.
Regarding to 26., the component useTransactionList is only being used by Wallet component (which we want to remove). Also, useTransactionList is not doing nothing. It's return is mocked.
Looks good then, we can create the subtasks and proceed