-
Notifications
You must be signed in to change notification settings - Fork 43
optimize core and react-wallet-kit #1090
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
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 558949c:
|
92a8c49 to
20ccbca
Compare
|
amazing work, this is a giant improvement, hope this can be pr'd in soon! |
55381c5 to
80ea306
Compare
|
put the eslint ignore comment back for the QR code. Fixes build |
b5bb720 to
979de20
Compare
| openSheet: (page: ModalPage) => void; | ||
| pushPage: (page: ModalPage) => void; | ||
| popPage: () => void; | ||
| popPages: (count: number) => void; |
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.
Cool beans man
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.
🫘
979de20 to
558949c
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|

Summary & Motivation
our SDK loading times have been noticeably slow - something that’s easy to overlook here in North America, but for users elsewhere it can feel sluggish
this PR is our first step toward optimizing client initialization and session loading times to improve overall responsiveness
What this pr does:
httpClient@walletconnect/sign-clientwhich had some performance benefits (core)- reduce number of queries. Originally we did a fetchUser for each connected wallet, we now only do one
- parallelize list_wallets, list_wallet_accounts, list_user queries
- this added a new optional param
authenticatorAddressestofetchWalletAccounts()- adds
isLoadingattribute to the WalletConnect WalletProvider- when WalletConnect is done initializing (or it fails) we emit events that we listen for in
react-wallet-kitwhichrefreshes either the wallet or the walletProvider state (or both). We then handle this in our auth component
useCallback()and ensures each direct dependency is included. Indirect dependencies are not included (react-wallet-kit)below are video comparisons recorded while connected to a VPN in Europe:
Client initialization time:
before:
init-old.mov
after:
init-new.mov
Session loading time:
before:
old.mov
after:
new.mov
Also we see some benefits as well in NA, take a look:
before:
NA-old.mov
after:
NA-new.mov
How I Tested These Changes
Did you add a changeset?
If updating one of our packages, you'll likely need to add a changeset to your PR. To do so, run
pnpm changeset.pnpm changesetwill generate a file where you should write a human friendly message about the changes. Note how this (example) includes the package name (should be auto added by the command) along with the type of semver change (major.minor.patch) (which you should set).These changes will be used at release time to determine what packages to publish and how to bump their version. For more context see this comment.