Conversation
d60eefb to
6c001eb
Compare
Gudahtt
left a comment
There was a problem hiding this comment.
The KeyringController doesn't currently handle any hardware-wallet-specific methods like this one. In the past we've always called these directly from the extension.
I'm guessing that the problem is that _updateMemStoreKeyrings doesn't get called after forgetDevice is called in the extension. And removeAccount can't be used instead either, because the hardware keyrings don't both implement that method for some reason. So there's no public method to call that would "refresh" the current account state.
I don't love the idea of adding keyring-specific methods 🤔 But the only simple alternative I can think of is a "refreshAccounts" method, and I don't love that idea either because it relies upon the caller to understand the internals of this controller and when accounts need to be refreshed.
So I guess we can accept this for now. And in the new keyring API we'll be proposing soon, we can try to solve this problem in a better way.
6c001eb to
db6a7a4
Compare
db6a7a4 to
3e961d5
Compare
Fix the issue that currently MetaMask Extension did not update KeyringController state after forget device so that the addresses should be forgot still remained in redux store and displayed.