Skip to content

Commit

Permalink
Update main with changes from v14.0.2 (#340)
Browse files Browse the repository at this point in the history
* Request validation should not throw if verifyingContract is not defined in typed signature (#328) (#330)

* 14.0.1 (#331)

* [14.x] fix: support ethermint's EIP712 implementation (#333)

* setting cosmos as allowed string for verifyingContract field

* fixed and linter

* readability

* Update condition to match main branch

* Remove duplicate copy of test

---------

Co-authored-by: Jyoti Puri <jyotipuri@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Version 14.0.2 (#339)

* Version 14.0.2

* Fix typo

Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com>

---------

Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com>

---------

Co-authored-by: Jyoti Puri <jyotipuri@gmail.com>
Co-authored-by: Michael Tsitrin <114929630+mtsitrin@users.noreply.github.com>
Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com>
  • Loading branch information
4 people authored Oct 2, 2024
1 parent 7fbac8b commit 9034b5b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [14.0.2]
### Fixed
- Allow the string "cosmos" in the "verifyingContract" field of EIP-712 signatures ([#333](https://github.com/MetaMask/eth-json-rpc-middleware/pull/333))
- This change was made to support Ethermint's EIP-712 implementation, which was broken by validation added in v14.0.0

## [14.0.1]
### Fixed
- Request validation should not throw if verifyingContract is not defined in typed signature ([#328](https://github.com/MetaMask/eth-json-rpc-middleware/pull/328))
Expand Down Expand Up @@ -206,7 +211,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `json-rpc-engine@5.3.0` ([#53](https://github.com/MetaMask/eth-json-rpc-middleware/pull/53))
- `eth-rpc-errors@3.0.0` ([#55](https://github.com/MetaMask/eth-json-rpc-middleware/pull/55))

[Unreleased]: https://github.com/MetaMask/eth-json-rpc-middleware/compare/v14.0.1...HEAD
[Unreleased]: https://github.com/MetaMask/eth-json-rpc-middleware/compare/v14.0.2...HEAD
[14.0.2]: https://github.com/MetaMask/eth-json-rpc-middleware/compare/v14.0.1...v14.0.2
[14.0.1]: https://github.com/MetaMask/eth-json-rpc-middleware/compare/v14.0.0...v14.0.1
[14.0.0]: https://github.com/MetaMask/eth-json-rpc-middleware/compare/v13.0.0...v14.0.0
[13.0.0]: https://github.com/MetaMask/eth-json-rpc-middleware/compare/v12.1.2...v13.0.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/eth-json-rpc-middleware",
"version": "14.0.1",
"version": "14.0.2",
"description": "Ethereum-related json-rpc-engine middleware.",
"repository": {
"type": "git",
Expand Down
4 changes: 4 additions & 0 deletions src/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,10 @@ WalletMiddlewareOptions): JsonRpcMiddleware<any, Block> {
* Validates verifyingContract of typedSignMessage.
*
* @param data - The data passed in typedSign request.
* This function allows the verifyingContract to be either:
* - A valid hex address
* - The string "cosmos" (as it is hard-coded in some Cosmos ecosystem's EVM adapters)
* - An empty string
*/
function validateVerifyingContract(data: string) {
const { domain: { verifyingContract } = {} } = parseTypedMessage(data);
Expand Down

0 comments on commit 9034b5b

Please sign in to comment.