Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: MetaMask/KeyringController
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v12.0.1
Choose a base ref
...
head repository: MetaMask/KeyringController
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v13.0.0
Choose a head ref
  • 9 commits
  • 8 files changed
  • 5 contributors

Commits on Jul 17, 2023

  1. Configuration menu
    Copy the full SHA
    2adb432 View commit details
    Browse the repository at this point in the history
  2. Fix @metamask/eth-sig-util types (#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.
    Gudahtt authored Jul 17, 2023
    Configuration menu
    Copy the full SHA
    c3afc44 View commit details
    Browse the repository at this point in the history
  3. Narrow return type of signTypedMessage and 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
    Gudahtt authored Jul 17, 2023
    Configuration menu
    Copy the full SHA
    3e102b5 View commit details
    Browse the repository at this point in the history
  4. Fix signTypedMessage parameter 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`.
    Gudahtt authored Jul 17, 2023
    Configuration menu
    Copy the full SHA
    ec8b5da View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. 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>
    mikesposito and mcmire authored Jul 18, 2023
    Configuration menu
    Copy the full SHA
    f0baaac View commit details
    Browse the repository at this point in the history
  2. 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
    Gudahtt authored Jul 18, 2023
    Configuration menu
    Copy the full SHA
    647eb9d View commit details
    Browse the repository at this point in the history
  3. 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.
    Gudahtt authored Jul 18, 2023
    Configuration menu
    Copy the full SHA
    1941d3c View commit details
    Browse the repository at this point in the history
  4. 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.
    Gudahtt authored Jul 18, 2023
    Configuration menu
    Copy the full SHA
    8699ccd View commit details
    Browse the repository at this point in the history
  5. 13.0.0 (#254)

    github-actions[bot] authored Jul 18, 2023
    Configuration menu
    Copy the full SHA
    12e3a20 View commit details
    Browse the repository at this point in the history
Loading