1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 17:33:23 +01:00

Ensure ledger keyring message event listener are removed on metamask lock (#14691)

* Ensure ledger keyring message event listener are removed on metamask lock

* Clean up
This commit is contained in:
Dan J Miller 2022-05-12 13:36:14 -02:30 committed by GitHub
parent 5e55cf2cf2
commit 8948018e5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 8 deletions

View File

@ -4144,6 +4144,12 @@ export default class MetamaskController extends EventEmitter {
if (trezorKeyring) {
trezorKeyring.dispose();
}
const [ledgerKeyring] = this.keyringController.getKeyringsByType(
KEYRING_TYPES.LEDGER,
);
ledgerKeyring?.destroy?.();
return this.keyringController.setLocked();
}
}

View File

@ -2961,7 +2961,8 @@
"console.log": true,
"document.createElement": true,
"document.head.appendChild": true,
"fetch": true
"fetch": true,
"removeEventListener": true
},
"packages": {
"@ethereumjs/tx": true,

View File

@ -2961,7 +2961,8 @@
"console.log": true,
"document.createElement": true,
"document.head.appendChild": true,
"fetch": true
"fetch": true,
"removeEventListener": true
},
"packages": {
"@ethereumjs/tx": true,

View File

@ -2961,7 +2961,8 @@
"console.log": true,
"document.createElement": true,
"document.head.appendChild": true,
"fetch": true
"fetch": true,
"removeEventListener": true
},
"packages": {
"@ethereumjs/tx": true,

View File

@ -117,7 +117,7 @@
"@metamask/contract-metadata": "^1.31.0",
"@metamask/controllers": "^28.0.0",
"@metamask/design-tokens": "^1.5.1",
"@metamask/eth-ledger-bridge-keyring": "^0.11.0",
"@metamask/eth-ledger-bridge-keyring": "^0.12.0",
"@metamask/eth-token-tracker": "^4.0.0",
"@metamask/etherscan-link": "^2.1.0",
"@metamask/jazzicon": "^2.0.0",

View File

@ -2875,10 +2875,10 @@
resolved "https://registry.yarnpkg.com/@metamask/eslint-config/-/eslint-config-9.0.0.tgz#22d4911b705f7e4e566efbdda0e37912da33e30f"
integrity sha512-mWlLGQKjXXFOj9EtDClKSoTLeQuPW2kM1w3EpUMf4goYAQ+kLXCCa8pEff6h8ApWAnjhYmXydA1znQ2J4XvD+A==
"@metamask/eth-ledger-bridge-keyring@^0.11.0":
version "0.11.0"
resolved "https://registry.yarnpkg.com/@metamask/eth-ledger-bridge-keyring/-/eth-ledger-bridge-keyring-0.11.0.tgz#8502e2fd36c89aff7de6724354217274917cecd3"
integrity sha512-fCwM8LYC6SXLfsKc4oNiAatz2X8p/pjbM5zMfm4nb4sZPshBAWU32M4vnB3BSVeQEsisGuLfOWCOWhxmq25n+Q==
"@metamask/eth-ledger-bridge-keyring@^0.12.0":
version "0.12.0"
resolved "https://registry.yarnpkg.com/@metamask/eth-ledger-bridge-keyring/-/eth-ledger-bridge-keyring-0.12.0.tgz#d3986e0dbbfeab713f4e0338bf4e5c74a2265bdd"
integrity sha512-kceBQc/wKCAdChZeI1P0Fs0FS15WtiD2Q87MqmfuJYpOriWRx/RmjKZoa6EJe2vy20KurlZRcKIiU8nFQ0e/ag==
dependencies:
"@ethereumjs/tx" "^3.2.0"
eth-sig-util "^2.0.0"