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
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 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