Skip to content

Conversation

@lnbc1QWFyb24
Copy link
Contributor

Description

This PR changes the timing of when the wallet initialization code is run from during Onboard init, to when the connectWallet function is first called. This will allow for all async injected wallet modules to be injected in the page before we initialize the wallet modules. This important due to changes enforced to Google extensions in early 2023 which will make all injected wallets have to inject async.
In the case of an autoselect wallet flow, we also add an additional small delay to ensure enough time for injection.

Checklist

  • The version field in package.json is incremented following semantic versioning
  • The box that allows repo maintainers to update this PR is checked
  • I tested locally to make sure this feature/fix works
  • I have run yarn type-check & yarn build to confirm there are not any associated errors
  • This PR passes the Circle CI checks

Copy link
Contributor

@taylorjdawson taylorjdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice looks good to me! 🚀

@lnbc1QWFyb24 lnbc1QWFyb24 merged commit 1f563bb into v2-web3-onboard-develop Jul 14, 2022
@lnbc1QWFyb24 lnbc1QWFyb24 deleted the enhancement/delayed-wallet-init branch July 14, 2022 02:39
This was referenced Jul 15, 2022
@Adamj1232
Copy link
Contributor

I really like this change 🎉 🚀 🎸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants