app-monorepo
app-monorepo copied to clipboard
feat: jotai context shared store
trafficstars
PR Summary
Updates to Global Settings, Dependencies, and Components
- A new global declaration,
$$navigationShortcuts, has been introduced. - The dependencies within a function
useOutsideClickhave been improved, which would re-trigger the function more accurately when necessary. - Various unnecessary import statements and chunks of code have been removed from several files, leading to cleaner and more efficient codebase.
- Import information for
ServiceScanQRCodehas been updated in theBackgroundApiProxy.tsfile. - Necessary variable and component names have been changed for better cohesion and understanding.
Strategic Additions and Removals
- A robust check has been added to the
SimpleDbEntityAccountSelector.tsfile forEAccountSelectorSceneName.discover, enhancing the program's accuracy. - A new function
getAccountSelectorMaphas been added toSimpleDbEntityDappConnection.ts, laying the groundwork for expanded functionality. - Several unnecessary import statements and pieces of code have been unmounted from both
ServiceDApp.tsandServiceToken.tsfiles.
Atom Renaming and Replacement
- A comprehensive renaming of atoms has been undertaken, replacing
accountSelectorMapAtomwithjotaiContextStoreMapAtomandEAccountSelectorSceneNametoEJotaiContextStoreNames. - This renaming process included an overall replacement of
accountSelectorMap.tswith a new filejotaiContextStoreMap.ts.
Component Renaming and Addition
- The existing component
accountSelectorStorehas been renamed tojotaiContextStorewith corresponding update of imports inAccountSelectorProvider.tsx. - A brand new component
AccountSelectorRootProvider.tsxhas been added, standing in for the removedaccountSelectorStore.
Architectural Improvements and Method Updates
- The
lodashlibrary in theactions.tsfile was made more efficient, and new import statements were added to accommodate this change. - A new logic file
JotaiContextStoreMirrorTracker.tsxwas added, providing a means of tracking and managing context store mirrors. - The
createJotaiContext.tsxfile underwent several removals to simplify its functionality. - A number of new files and hooks were added, each contributing to the creation and maintenance of Jotai context stores.
- The
TokenSelector.tsxfile was updated to improve its function call capabilities.
UI Modifications and New Additions
- A new component has been added to handle the syncing of accounts.
- Methods in several files were updated to accept new parameters to enhance their performance.
- Added a new file
HomeTokenListProviderMirror.tsxandHomeTokenListRootProvider.tsxin theHome/componentsdirectory. - Added
HomeTokenListProviderMirrorcomponent toTokenListContainer.tsx. - Removed
WalletActionsContainercomponent fromTokenListContainer.tsx. - Removed
TokenListContainerexport and renamedTokenListContainerWithProvidertoTokenListContainerexport inTokenListContainer.tsx.
Error Management and Date Formatting
- Enhanced error management methods have been incorporated, providing more robust error handling.
- Improvements have also been made to the
formatRelativeDatemethod in thedateUtils.ts.
状态管理复杂度再次升级 😣