-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix
eth_signTypedData
signatures containing 0x
In v7.10.0, signatures including a `bytes` field with the value `0x` were being encoded differently than before. Previously the string `0x` was interpreted as an "empty" hex number, but as of v7.10.0 they were encoded as the string "0x". This change was not intentional, and it resulted in invalid signatures. This problem was introduced in `@metamask/eth-sig-util@6.0.1` (see here for details: MetaMask/eth-sig-util#340). This package was introduced to mobile when `@metamask/keyring-controller` was updated to v6 (#7267). The keyrings themselves still use `@metamask/eth-sig-util@5.0.1`, but the `KeyringController` is signing these messages directly rather than delegating to the keyrings, which is why the newer `@metamask/eth-sig-util` package is used here. This has been resovled by patching `@metamask/keyring-controller` to delegate signing typed messages to the keyrings. The very next release of that package includes that change anyway. We will wait until this bug is fixed before updating `@metamask/eth-sig-util` in the keyrings. Fixes #7792
- Loading branch information
Showing
1 changed file
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters