fix: default account type after disconnect#4641
Conversation
🦋 Changeset detectedLatest commit: 11a858d The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
10 Skipped Deployments
|
There was a problem hiding this comment.
Bug: Undefined Access in OptionsController
Accessing OptionsController.state.defaultAccountTypes[chainToWrite] can cause a TypeError if defaultAccountTypes is undefined. This should be guarded with optional chaining (?.) or a null check to prevent runtime errors.
packages/controllers/src/controllers/ChainController.ts#L671-L672
appkit/packages/controllers/src/controllers/ChainController.ts
Lines 671 to 672 in 11a858d
Was this report helpful? Give feedback by reacting with 👍 or 👎
|
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
Description
When we disconnect the namespace, we are setting
preferredAccountTypeof the account status to last used account type, where it should give priority todefaultAccountTypesoption.Type of change
Associated Issues
For Linear issues: Closes APKT-xxx
For GH issues: closes #...
Showcase (Optional)
If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.
Checklist