eth-keyring-controller
Advanced tools
Comparing version 8.0.1 to 8.1.0
13
index.js
@@ -51,2 +51,3 @@ const { EventEmitter } = require('events'); | ||
this.keyrings = []; | ||
this._unsupportedKeyrings = []; | ||
@@ -566,2 +567,4 @@ // This option allows the controller to cache an exported key | ||
serializedKeyrings.push(...this._unsupportedKeyrings); | ||
let vault; | ||
@@ -684,3 +687,5 @@ let newEncryptionKey; | ||
const keyring = await this._restoreKeyring(serialized); | ||
await this._updateMemStoreKeyrings(); | ||
if (keyring) { | ||
await this._updateMemStoreKeyrings(); | ||
} | ||
return keyring; | ||
@@ -696,3 +701,3 @@ } | ||
* @param {Object} serialized - The serialized keyring. | ||
* @returns {Promise<Keyring>} The deserialized keyring. | ||
* @returns {Promise<Keyring|undefined>} The deserialized keyring or undefined if the keyring type is unsupported. | ||
*/ | ||
@@ -703,2 +708,6 @@ async _restoreKeyring(serialized) { | ||
const Keyring = this.getKeyringClassForType(type); | ||
if (!Keyring) { | ||
this._unsupportedKeyrings.push(serialized); | ||
return undefined; | ||
} | ||
const keyring = new Keyring(); | ||
@@ -705,0 +714,0 @@ await keyring.deserialize(data); |
{ | ||
"name": "eth-keyring-controller", | ||
"version": "8.0.1", | ||
"version": "8.1.0", | ||
"description": "A module for managing various keyrings of Ethereum accounts, encrypting them, and using them.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
34904
784
0