-
-
Notifications
You must be signed in to change notification settings - Fork 126
Comparing changes
Open a pull request
base repository: MetaMask/KeyringController
base: v12.0.1
head repository: MetaMask/KeyringController
compare: v13.0.0
- 9 commits
- 8 files changed
- 5 contributors
Commits on Jul 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2adb432 - Browse repository at this point
Copy the full SHA 2adb432View commit details -
Fix
@metamask/eth-sig-utiltypes (#248)The types for the package `@metamask/eth-sig-util` were being overwritten by a local type declaration. That has been removed, and all type errors have been resolved. All of the type errors were related to `normalize` returning `undefined` if given a nullish input. We never pass it a nullish input, but TypeScript wasn't able to infer that, so that issue was addressed with type casts. This isn't ideal, but it's temporary. Once we finish migrating all Keyrings to the new Keyring interface, we won't need to normalize addresses anymore at all.
Configuration menu - View commit details
-
Copy full SHA for c3afc44 - Browse repository at this point
Copy the full SHA c3afc44View commit details -
Narrow return type of
signTypedMessageand encryption methods (#249)* Narrow return type of `signTypedMessage` The method `signTypedMessage` always returns a string, but the declared return type was `Bytes` (which is a type union of `string` along with other things). This made the method more difficult to use, as callers had to handle the other `Bytes` types as return values as well. The method has been updated to use `string` as the return type. * Narrow return type for encryption methods as well
Configuration menu - View commit details
-
Copy full SHA for 3e102b5 - Browse repository at this point
Copy the full SHA 3e102b5View commit details -
Fix
signTypedMessageparameter types (#250)The `signTypedMessage` parameter types accepted the data to sign as an array. This works with `signTypedData_v1`, but is incompatible with later versions. The signature has been updated to accept data as either an array or an object. Additionally, tests have been added to cover all three supported versions of `signTypedData`.
Configuration menu - View commit details
-
Copy full SHA for ec8b5da - Browse repository at this point
Copy the full SHA ec8b5daView commit details
Commits on Jul 18, 2023
-
Add types for store and fix type discrepancies (#247)
* fix: add types for persistent and memory store * fix: lint * refactor: remove return from void function * refactor: edit keyringBuilders type * fix: make keyringBuilders arg optional * rollback setLocked change * Update src/KeyringController.test.ts Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com> * refactor: rollback unlockKeyrings --------- Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f0baaac - Browse repository at this point
Copy the full SHA f0baaacView commit details -
Refactor controller initialization in tests (#251)
* Refactor controller initialization in tests Each test now uses a helper function to construct the keyring controller rather than using `beforeEach`. This eliminates redundant redundancy in cases where the controller was being overwritten, and makes it easier for future tests to customize how the controller is initialized. * Remove unnecessary submit password step * Simplify types
Configuration menu - View commit details
-
Copy full SHA for 647eb9d - Browse repository at this point
Copy the full SHA 647eb9dView commit details -
Restore compatibility with QR Keyring (#252)
The `KeyringController` method `addNewKeyring` was changed in v11 to initialize the keyring options to an empty object. These options are passed to the `deserialize` method of the keyring. This broke compatibility with the QR keyring because its `deserialize` method does not expect to be passed an empty object. The `KeyringController` has been updated to no longer initialize the `addNewKeyring` options to an empty object. It should now work the same as it did prior to v11. The one functional difference is that it now throws an error when `addNewKeyring` is used to add a simple keyring without supplying any private keys, however that path would have already thrown an error.
Configuration menu - View commit details
-
Copy full SHA for 1941d3c - Browse repository at this point
Copy the full SHA 1941d3cView commit details -
Allow non-object keyring serialized state (#253)
The `addNewKeyring` method has been updated to support non-object keyring serialized state, which had been supported already on versions prior to v11. This allows us to remove a special-case for the simple keyring, which requires a JSON array as its serialized keyring state. When constructing a simple keyring, the method `addNewKeying` now expects the second parameter (`opts`) to be an array of private keys rather than an object with a `privateKeys` property. This is how it worked prior to v11.
Configuration menu - View commit details
-
Copy full SHA for 8699ccd - Browse repository at this point
Copy the full SHA 8699ccdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 12e3a20 - Browse repository at this point
Copy the full SHA 12e3a20View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v12.0.1...v13.0.0