-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
fix(unlock-app): fix network switch #14064
Conversation
@@ -96,7 +96,7 @@ export const useProvider = (config: any) => { | |||
)) as unknown as ethers.BrowserProvider | |||
} else { | |||
await switchBrowserProviderNetwork(networkId) | |||
walletServiceProvider = new ethers.BrowserProvider(pr.provider, 'any') | |||
walletServiceProvider = new ethers.BrowserProvider(window.ethereum!) |
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.
Are you sure this works with wallet connect or Coinbase wallet?
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.
for coinbase that approach should work https://docs.cdp.coinbase.com/wallet-sdk/docs/injected-provider/
but fails with WalletConnect indeed
* fix network switch * remove unwanted console log * cross-chain parse gas values properly * recreate provider proplery * cross chain: delete unwanted gas values
* Manual deploy as of commit:2c21135eb2fe5f56bad82c282c07c36ee49b9877 * fix(unlock-app): fixing decent serialization * fix(unlock-app): fix paywall modal when closed (#14065) fix for paywall modal when closed * fix(unlock-app): fix network switch (#14064) * fix network switch * remove unwanted console log * cross-chain parse gas values properly * recreate provider proplery * cross chain: delete unwanted gas values * fix(unlock-app): use eip1193 when recreating wallet provider for wallet connect (#14068) * use eip1193 to init provider on wallet connect * clarify provider flow --------- Co-authored-by: Clément Renaud <clement@unlock-protocol.com>
Description
Make things works properly when prompting to switch network in user web wallet
Issues
Fixes #
Refs #
Checklist:
Release Note Draft Snippet