`chainId` may be outdated if user changes chains as part of connection in @web3-react
        
  Moderate severity
        
          GitHub Reviewed
      
        Published
          Apr 17, 2023 
          in
          
            Uniswap/web3-react
          
          •
          Updated Nov 11, 2023 
      
  
Package
Affected versions
>= 6.0.0, < 8.0.35-beta.0
  Patched versions
8.0.35-beta.0
  Description
        Published by the National Vulnerability Database
      Apr 17, 2023 
    
  
        Published to the GitHub Advisory Database
      Apr 18, 2023 
    
  
        Reviewed
      Apr 18, 2023 
    
  
        Last updated
      Nov 11, 2023 
    
  
Impact
chainIdmay be outdated if the user changes chains as part of the connection flow. This means that the value ofchainIdreturned byuseWeb3React()may be incorrect. In an application, this means that any data derived fromchainIdcould be incorrect.For example, if a swapping application derives a wrapped token contract address from the
chainIdand a user has changed chains as part of their connection flow the application could cause the user to send funds to the incorrect address when wrapping. This is a common approach when using other foundational libraries likeethers, and most users of v8 will want to upgrade past the affected versions.Patches
Patched in Uniswap/web3-react#749.
Users of [email protected] should upgrade to at least:
Workarounds
N/A
References
N/A
References