-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core: 2.3.2-alpha.4]: [fix] - Recommended Injected Wallets #1115
[core: 2.3.2-alpha.4]: [fix] - Recommended Injected Wallets #1115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noice! 🚀
Hey @aaronbarnardsound I'm getting |
Hey @mihaic195, could you share how you are calling the |
@mihaic195 I get the error you described if an empty object is passed in to the connect wallet function: Is that what you are passing in? Our validation should not allow that value, so I am going to update it to error indicating that is not a valid value. |
Fix is included in #1121 |
Hey @aaronbarnardsound I'm getting this error: TypeError: Cannot read properties of undefined (reading 'label'), is this a bug? I am putting an empty object in the connect({}) when a user clicks the connect wallet button and using the web3-onboard/react. Also use the autoSelect options when trying to connect using a useEffect and staying connected when the page is refreshed. connect({ Have been stuck on this a while just wondering if maybe I am using it wrong? Thanks |
Hey @ArshiaDhiman yes passing in an empty object is what causes the error and the fix above fixes our validation to indicate that an empty object is an invalid parameter to the |
Okay perfect thanks @aaronbarnardsound. I just thought I would specify that I am using @web3-onboard/react. I was unable to call the connect() function without a empty object but using the code below I fixed the error.
|
Ah ok, we need to get the types fixed in the React package then! I'll create an issue so that we can get that fixed up. |
@ArshiaDhiman Actually it looks like our types are correct and the connect options are optional - https://github.com/blocknative/web3-onboard/blob/v2-web3-onboard-develop/packages/react/src/index.ts#L74 |
@aaronbarnardsound okay thanks. I still get a error when I try use connect without a empty object or autoSelect. I have attached an example here, the fix above solved my issue so there is no problem. Thanks! 😄 |
@ArshiaDhiman which version of the react package are you on? Could you try updating to the latest? |
The issue was fixed thanks for your help |
Description
When only the injected wallets module is used and the user has no injected wallets installed, Onboard was no longer displaying the links included in the
recommendedInjectedWallets
parameter of theappMetadata
object. This was due to checks not being updated forautoSelect
now being an object that is always set.This PR updates all checks for the
autoSelect
parameter which fixes this issue.Checklist
package.json
is incremented following semantic versioning