Closed mbcse closed 1 year ago
@mbcse thanks for reporting! There is a fix for this on @web3-onboard/core v2.19.0-alpha.1 and an official release will be out shortly.
@mbcse a fix for this is available with the latest versions of the core/react/vue packages. Thanks for raising this issue and please let us know if you have any other issues!
Current Behavior
Web3onboard is throwing an error when connecting to metamask when the selected chain in metamask doesn't match the chains specified in the web3onboard init function. Seems like a condition is missed in the recent release of the secondary token balances feature. It's possible that appChain can be "undefined" where the chain selected in metamask is different than the chains mentioned while configuring web3onboard
Error shown: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'secondaryTokens')
Expected Behavior
Should connect to metamask despite having rpc in chains array
Steps To Reproduce
What package is effected by this issue?
@web3-onboard/core
Is this a build or a runtime issue?
Runtime
Package Version
2.22.1
Node Version
No response
What browsers are you seeing the problem on?
No response
Relevant log output
No response
Anything else?
No response
Sanity Check