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

convert network accessors to functions #6219

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

walmat
Copy link
Contributor

@walmat walmat commented Oct 21, 2024

What changed (plus any additional context for devs)

Okay so runtime support wasn't working because our accessors for backendNetworks data were all objects that only read from queryData once and never again on successive calls. I've converted all the accessors to be functions, so now we read up-to-date information when accessing.

Intro: backendNetworksStore.

  • this store is a barebones Zustand store, and acts as an access point for the up-to-date backendNetworks data.
  • it stores a shared value version and a non-shared value version

This PR also introduces a couple worklet functions to make swaps behave nicely. The only caveat is for the worklet functions, you must pass the backend network data in as a parameter. This is necessary because we cannot call getState inside of a worklet.

Screen recordings / screenshots

N/A as it's just functional changes

What to test

Test all critical paths

would be nice to be able to coordinate some backend change to see them reflected in real-time

src/chains/index.ts Outdated Show resolved Hide resolved
@walmat walmat marked this pull request as ready for review October 22, 2024 23:26
@brunobar79
Copy link
Member

Launch in simulator or device for 215ea07

package.json Outdated Show resolved Hide resolved
ios/Podfile.lock Outdated Show resolved Hide resolved
@walmat walmat marked this pull request as draft October 24, 2024 15:04
@brunobar79
Copy link
Member

Launch in simulator or device for f751ea8

@walmat walmat marked this pull request as ready for review November 1, 2024 19:24
Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a comment

Choose a reason for hiding this comment

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

Looks good on both OS's, QA Passed 👍🏽

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