Skip to content
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

reduce some unnecessary fetches #704

Merged
merged 2 commits into from
Jul 3, 2023
Merged

reduce some unnecessary fetches #704

merged 2 commits into from
Jul 3, 2023

Conversation

greg-schrammel
Copy link
Contributor

@greg-schrammel greg-schrammel commented Jun 28, 2023

Fixes BX-####
Figma link (if any):

What changed (plus any additional context for devs)

Screen recordings / screenshots

added a stale time of 10 mins to useEnsAvatar (it's used in a lot of places just to get the context accent color, this makes so it won't trigger a new request each time)

the video is before (new fetch every new token row the scroll renders), after it will make one single request

Screen.Recording.2023-06-27.at.20.32.42.mov

in the activity tab I didn't add a staleTime because would take some bigger refactoring, like using a useQueries to set a stale time for each separate transaction instead of a single useQuery that fetches it all

I think we could bulk the requests

  • would have to check if backend supports for the graphql op getContractFunction
  • for rpc calls we can upgrade wagmi to v1 (viem etc) or use something like multicall-provider 😆
Screen.Recording.2023-06-28.at.13.44.57.mov

What to test

Final checklist

  • I have tested my changes in a LavaMoat bundle (yarn build).
  • I have tested my changes in Chrome & Brave.
  • If your changes are visual, did you check both the light and dark themes?

@github-actions
Copy link

Here's the packed extension for this build:
node_modules.tar.gz

Copy link
Member

@brunobar79 brunobar79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤝

@github-actions
Copy link

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-d35d0f0a43e78c1089c5285df564e8046c81aeed.zip

@github-actions
Copy link

github-actions bot commented Jul 3, 2023

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-c428028da2b61e72bee8606b147f85305a0100fb.zip

@greg-schrammel greg-schrammel merged commit b0695a4 into master Jul 3, 2023
@greg-schrammel greg-schrammel deleted the requests branch July 3, 2023 18:59
@github-actions
Copy link

github-actions bot commented Jul 3, 2023

Here's the packed extension for this build:
rainbowbx-b0695a4067f17ebf4414fc2c220a698b1c4f1e74.zip

BrodyHughes pushed a commit that referenced this pull request Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants