Optimize Initial Data Fetching and Add Missing Credential Issuer Metadata Retrieval #533
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.
Summary
This PR optimizes the data fetching strategy during the initial load by removing redundant calls to fetch VC and VP, which are already adequately handled on the home page upon login or signup. Additionally, it introduces the fetching of missing credential issuer metadata, ensuring comprehensive data availability and integrity from the start.
Changes
get('/storage/vc')
andget('/storage/vp')
have been removed from thefetchInitialData
function as these are already being called on the home page (/
). This change eliminates unnecessary network requests during the initial data loading phase, thereby improving the loading performance and reducing data redundancy.fetchInitialData
function to fetch credential issuer metadata for each issuer obtained fromgetExternalEntity('/issuer/all')
. This ensures that all relevant metadata about issuers is readily available, filling a previously existing gap in our data fetching logic.