From ca7a717ccec43ef419c07d918f791f150adf831f Mon Sep 17 00:00:00 2001 From: Charly Chevalier Date: Wed, 28 Jan 2026 15:20:55 +0100 Subject: [PATCH] fix(keyring-controller): force state update after clearing keyrings --- packages/keyring-controller/src/KeyringController.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/keyring-controller/src/KeyringController.ts b/packages/keyring-controller/src/KeyringController.ts index add11e8183b..99084dcbc8b 100644 --- a/packages/keyring-controller/src/KeyringController.ts +++ b/packages/keyring-controller/src/KeyringController.ts @@ -2526,6 +2526,13 @@ export class KeyringController< } this.#keyrings = []; this.#unsupportedKeyrings = []; + + // We force this state update since the `AccountsController` is mirroring + // the keyrings array in its state (using `InternalAccount`s), and we want to + // ensure it's updated after a clear operation too. + this.update((state) => { + state.keyrings = []; + }); } /**