You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is to use query parameters as a store for network information rather than relying on connected wallet.
Motivation
Using query parameters as the single source of truth for network information has multiple advantages:
Allow change of network in the UI directly
Allow server-side rendering as we don't rely on client side information anymore
Enable users to interact with the bridge without having to connect their wallet
Abstract notions of L1/L2/L3 into from and to
Architecture changes
User should be prompted to switch network only when they are about to move funds.
Query param should be the source of truth over the currently connected network in the wallet.
Adding
from,to query parameters - Query parameters for source and destination chain.
Both parameter are string rather than chainId to be more user friendly. They are also sanitized and defaulted to valid chains if at least one of the value is not valid.
useNetworks() - Long term replacement for useNetworksRelationship returning source and destination chains.
useNetworksRelationship - Temporary hook until we replace it with useNetworks. API is closer to current useNetworksAndSigners, returning parent and child chains.
Objective
The idea is to use query parameters as a store for network information rather than relying on connected wallet.
Motivation
Using query parameters as the single source of truth for network information has multiple advantages:
from
andto
Architecture changes
User should be prompted to switch network only when they are about to move funds.
Query param should be the source of truth over the currently connected network in the wallet.
Adding
from,to
query parameters - Query parameters for source and destination chain.Both parameter are string rather than chainId to be more user friendly. They are also sanitized and defaulted to valid chains if at least one of the value is not valid.
useNetworks()
- Long term replacement foruseNetworksRelationship
returning source and destination chains.useNetworksRelationship
- Temporary hook until we replace it withuseNetworks
. API is closer to currentuseNetworksAndSigners
, returning parent and child chains.Deprecating
useNetworksAndSigners
hook - replaced byuseNetworks
hookl2ChainId
query param - replaced bychild
chainTimeline
Tasks
useNetworks
anduseNetworksRelationship
to our codebase #1296useNetworksAndSigners
withuseNetworks
anduseNetworksRelationship
#1298useNetworksRelationship
insideuseArbTokenBridge
#1432The text was updated successfully, but these errors were encountered: