Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several updates to improve the efficiency and maintainability of the codebase, particularly focusing on the initialization and usage of the
tokenInspector
instance, as well as optimizing the loading of components.Token Inspector Initialization and Usage:
src/initTokenInspector.ts
: Refactored the initialization of thetokenInspector
instance to use a singleton pattern, ensuring it is only created once and reused across the application.src/pages/Pool-V3/hooks/useGetPoolList.ts
: Updated to use the newgetTokenInspectorInstance
function for fetching token data. [1] [2]src/pages/Pools/hooks/hooks.ts
: Replaced direct usage oftokenInspector
with the newgetTokenInspectorInstance
function in multiple locations to ensure consistent initialization. [1] [2] [3]src/reducer/onchainTokens.ts
: Modified to use thegetTokenInspectorInstance
function for inspecting tokens. [1] [2]Component Loading Optimization:
src/routes.tsx
: Refactored to use React'slazy
andSuspense
for dynamic import of components, improving the initial load time and rendering performance.Miscellaneous Changes:
index.html
: Changed the Google Analytics script to load withdefer
instead ofasync
to ensure it doesn't block other critical resources.src/layouts/App.tsx
: Removed the unused import ofLoadingPage
to clean up the code.src/pages/Balance/index.tsx
: Removed commented-out code related to dynamic bridge support for Solana.