safe-wallet-web
safe-wallet-web copied to clipboard
Fetch chains config on build time (and after revalidation)
What is the feature about
We currently fetch the chains config on runtime whenever the app loads. The chains config includes data that is needed in many different places of the app and is used for fetching the safe info, feature flags, rpc etc so it effectively "stalls" the app. However, the chains config doesn't change often so we should check if this can be optimized. A few examples when changes are necessary:
- Enabling or disabling a wallet
- Enabling or disabling a feature
- Changing the RPC URI for a specific network
- Changing the gas price (multiplier) for a specific network
Next.js offers something called Incremental Static Regeneration (ISR) which would allow us to only fetch the chains config on build time or after some fixed revalidation time by regenerating static files without having to build the app again.
The list of requirements
- [ ] Test if ISR can be used for fetching the chains config