@metamask-previews/keyring-controller 19.2.1-preview-4a9b4a93 → 19.2.1-preview-fefdb711
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -4
- package/dist/KeyringController.cjs +5 -7
- package/dist/KeyringController.cjs.map +1 -1
- package/dist/KeyringController.d.cts +9 -10
- package/dist/KeyringController.d.cts.map +1 -1
- package/dist/KeyringController.d.mts +9 -10
- package/dist/KeyringController.d.mts.map +1 -1
- package/dist/KeyringController.mjs +7 -9
- package/dist/KeyringController.mjs.map +1 -1
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -30,10 +30,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
30
30
|
- The action can be used to consume the `withKeyring` method of the `KeyringController` class
|
|
31
31
|
- Support keyring metadata in KeyringController ([#5112](https://github.com/MetaMask/core/pull/5112))
|
|
32
32
|
|
|
33
|
-
### Changed
|
|
34
|
-
|
|
35
|
-
- Bump `@ethereumjs/util` from `^8.1.0` to `^9.1.0` ([#5347](https://github.com/MetaMask/core/pull/5347))
|
|
36
|
-
|
|
37
33
|
## [19.1.0]
|
|
38
34
|
|
|
39
35
|
### Added
|
|
@@ -42,7 +42,7 @@ exports.KeyringController = exports.getDefaultKeyringState = exports.keyringBuil
|
|
|
42
42
|
const util_1 = require("@ethereumjs/util");
|
|
43
43
|
const base_controller_1 = require("@metamask/base-controller");
|
|
44
44
|
const encryptorUtils = __importStar(require("@metamask/browser-passworder"));
|
|
45
|
-
const eth_hd_keyring_1 = require("@metamask/eth-hd-keyring");
|
|
45
|
+
const eth_hd_keyring_1 = __importDefault(require("@metamask/eth-hd-keyring"));
|
|
46
46
|
const eth_sig_util_1 = require("@metamask/eth-sig-util");
|
|
47
47
|
const eth_simple_keyring_1 = __importDefault(require("@metamask/eth-simple-keyring"));
|
|
48
48
|
const utils_1 = require("@metamask/utils");
|
|
@@ -115,7 +115,7 @@ const defaultKeyringBuilders = [
|
|
|
115
115
|
// @ts-expect-error keyring types are mismatched
|
|
116
116
|
keyringBuilderFactory(eth_simple_keyring_1.default),
|
|
117
117
|
// @ts-expect-error keyring types are mismatched
|
|
118
|
-
keyringBuilderFactory(eth_hd_keyring_1.
|
|
118
|
+
keyringBuilderFactory(eth_hd_keyring_1.default),
|
|
119
119
|
];
|
|
120
120
|
const getDefaultKeyringState = () => {
|
|
121
121
|
return {
|
|
@@ -580,7 +580,7 @@ class KeyringController extends base_controller_1.BaseController {
|
|
|
580
580
|
const prefixed = (0, utils_1.add0x)(importedKey);
|
|
581
581
|
let bufferedPrivateKey;
|
|
582
582
|
try {
|
|
583
|
-
bufferedPrivateKey = (0,
|
|
583
|
+
bufferedPrivateKey = (0, util_1.toBuffer)(prefixed);
|
|
584
584
|
}
|
|
585
585
|
catch {
|
|
586
586
|
throw new Error('Cannot import invalid private key.');
|
|
@@ -1499,10 +1499,8 @@ async function _KeyringController_createKeyring(type, data) {
|
|
|
1499
1499
|
throw new Error(`${constants_1.KeyringControllerError.NoKeyringBuilder}. Keyring type: ${type}`);
|
|
1500
1500
|
}
|
|
1501
1501
|
const keyring = keyringBuilder();
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
await keyring.deserialize(data);
|
|
1505
|
-
}
|
|
1502
|
+
// @ts-expect-error Enforce data type after updating clients
|
|
1503
|
+
await keyring.deserialize(data);
|
|
1506
1504
|
if (keyring.init) {
|
|
1507
1505
|
await keyring.init();
|
|
1508
1506
|
}
|