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

Restore compatibility with QR Keyring - #252

Merged
Gudahtt merged 1 commit into
mainfrom
fix-qr-keyring-compatibility
Jul 18, 2023
Merged

Restore compatibility with QR Keyring#252
Gudahtt merged 1 commit into
mainfrom
fix-qr-keyring-compatibility

Conversation

@Gudahtt

Copy link
Copy Markdown
Member

Description

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.

Changes

  • Fixed: Fix addNewKeyring incompatbility when no options are provided
    • The addNewKeyring method stopped working with certain keyrings (e.g. the QR keyring) in v11 when called with no options.

References

This bug was introduced before and fixed in the past, e.g. #136

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation for new or updated code as appropriate (note: this will usually be JSDoc)
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@Gudahtt

This comment was marked as resolved.

Base automatically changed from refactor-tests to mainJuly 18, 2023 12:08
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
Gudahttforce-pushed the fix-qr-keyring-compatibility branch from 9ebdc0f to 836b5a4CompareJuly 18, 2023 12:09
@Gudahtt
Gudahtt marked this pull request as ready for review July 18, 2023 12:09
@Gudahtt
Gudahtt requested a review from a team as a code ownerJuly 18, 2023 12:09

@mikespositomikesposito left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Gudahtt
Gudahtt merged commit 1941d3c into mainJul 18, 2023
@Gudahtt
Gudahtt deleted the fix-qr-keyring-compatibility branch July 18, 2023 12:20
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Gudahtt@mikesposito