@metamask/eth-snap-keyring
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -10,2 +10,8 @@ # Changelog | ||
## [2.1.1] | ||
### Fixed | ||
- Reject unsupported account methods ([#190](https://github.com/MetaMask/eth-snap-keyring/pull/190)) | ||
## [2.1.0] | ||
@@ -148,3 +154,4 @@ | ||
[Unreleased]: https://github.com/MetaMask/eth-snap-keyring/compare/v2.1.0...HEAD | ||
[Unreleased]: https://github.com/MetaMask/eth-snap-keyring/compare/v2.1.1...HEAD | ||
[2.1.1]: https://github.com/MetaMask/eth-snap-keyring/compare/v2.1.0...v2.1.1 | ||
[2.1.0]: https://github.com/MetaMask/eth-snap-keyring/compare/v2.0.0...v2.1.0 | ||
@@ -151,0 +158,0 @@ [2.0.0]: https://github.com/MetaMask/eth-snap-keyring/compare/v1.0.0...v2.0.0 |
@@ -5,3 +5,3 @@ /// <reference types="node" /> | ||
import { SignTypedDataVersion } from '@metamask/eth-sig-util'; | ||
import type { KeyringAccount, InternalAccount, EthBaseTransaction, EthBaseUserOperation, EthUserOperation, EthUserOperationPatch } from '@metamask/keyring-api'; | ||
import type { EthBaseTransaction, EthBaseUserOperation, EthUserOperation, EthUserOperationPatch, InternalAccount, KeyringAccount } from '@metamask/keyring-api'; | ||
import type { SnapController } from '@metamask/snaps-controllers'; | ||
@@ -8,0 +8,0 @@ import type { SnapId } from '@metamask/snaps-sdk'; |
@@ -462,2 +462,5 @@ "use strict"; | ||
const { account, snapId } = __classPrivateFieldGet(this, _SnapKeyring_instances, "m", _SnapKeyring_resolveAddress).call(this, address); | ||
if (!account.methods.includes(method)) { | ||
throw new Error(`Method '${method}' not supported for account ${account.address}`); | ||
} | ||
const requestId = (0, uuid_1.v4)(); | ||
@@ -464,0 +467,0 @@ // Create the promise before calling the snap to prevent a race condition |
{ | ||
"name": "@metamask/eth-snap-keyring", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Snaps keyring bridge.", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
123684
1485