-
Notifications
You must be signed in to change notification settings - Fork 481
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
Refactor: Replace onboard with Eip1193Provider in dispatch calls #3745
Conversation
Branch preview✅ Deploy successful! Storybook: |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
📦 Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! Six Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. |
Coverage report
Show files with reduced coverage 🔻
Test suite run success1437 tests passing in 197 suites. Report generated by 🧪jest coverage report action from 0aa42f8 |
const signer = await getAssertedChainSigner(onboard, chainId) | ||
export const getUncheckedSafeSDK = async (provider: Eip1193Provider): Promise<Safe> => { | ||
const browserProvider = createWeb3(provider) | ||
const signer = await browserProvider.getSigner() |
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.
If we update to the latest protocol-kit it actually expects EIP 1193 Providers and removes all adapters.
Should we use the opportunity to do this in this PR?
https://docs.safe.global/sdk/protocol-kit/reference/migrate-to-v4
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.
Thats really nice! Doesn't look like too big of a change but just to be safe I would do the migration in a follow-up PR after this is merged.
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.
Added an issue: #3750
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Switch network doesn't work for rabby wallet. On prod we are showing the error with information about wrong chain in the wallet. In the PR there is no such error. |
Thanks for reporting! I can reproduce that the error notification is not visible anymore. I found a way however to fix this error for adding networks in Rabby so I will create a separate PR to dev instead of only fixing the notification. Created a PR here: #3776 |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
What it solves
Resolves #3744
This ports part of the changes over from #3727
How this PR fixes it
dispatch
functions to receivewallet.provider
instead ofonboard
dispatch
functions also receivewallet.address
now which is needed forTxEvents
assertWalletChain
calls to the component calling the dispatch functions. This is a temporary solution until Display a Switch Network button if wallet is connected to a different chain #3743.How to test it
Checklist