@metamask/controller-utils
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -9,2 +9,9 @@ # Changelog | ||
## [4.0.1] | ||
### Changed | ||
- Add dependencies `eth-query` and `babel-runtime` ([#1447](https://github.com/MetaMask/core/pull/1447)) | ||
### Fixed | ||
- Fix bug where query function failed to call built-in EthQuery methods ([#1447](https://github.com/MetaMask/core/pull/1447)) | ||
## [4.0.0] | ||
@@ -113,3 +120,4 @@ ### Added | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@4.0.0...HEAD | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@4.0.1...HEAD | ||
[4.0.1]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@4.0.0...@metamask/controller-utils@4.0.1 | ||
[4.0.0]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@3.4.0...@metamask/controller-utils@4.0.0 | ||
@@ -116,0 +124,0 @@ [3.4.0]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@3.3.0...@metamask/controller-utils@3.4.0 |
/// <reference types="bn.js" /> | ||
import { BN } from 'ethereumjs-util'; | ||
import type EthQuery from 'eth-query'; | ||
import type { Hex } from '@metamask/utils'; | ||
@@ -175,10 +176,2 @@ import { Json } from '@metamask/utils'; | ||
export declare function normalizeEnsName(ensName: string): string | null; | ||
declare type EthQueryLike = { | ||
sendAsync: (opts: Partial<{ | ||
id: number; | ||
jsonrpc: '2.0'; | ||
method: string; | ||
params: unknown; | ||
}>, callback: (...args: [error: unknown, result: undefined] | [error: null, result: unknown]) => void) => void; | ||
}; | ||
/** | ||
@@ -192,3 +185,3 @@ * Wrapper method to handle EthQuery requests. | ||
*/ | ||
export declare function query(ethQuery: EthQueryLike, method: string, args?: any[]): Promise<any>; | ||
export declare function query(ethQuery: EthQuery, method: string, args?: any[]): Promise<any>; | ||
/** | ||
@@ -195,0 +188,0 @@ * Converts valid hex strings to decimal numbers, and handles unexpected arg types. |
@@ -413,5 +413,5 @@ "use strict"; | ||
}; | ||
if ((0, utils_1.hasProperty)(ethQuery, method) && | ||
typeof ethQuery[method] === 'function') { | ||
// @ts-expect-error All of the generated method types have this signature, but our EthQuery type doesn't include them | ||
// Using `in` rather than `hasProperty` so that we look up the prototype | ||
// chain for the method. | ||
if (method in ethQuery && typeof ethQuery[method] === 'function') { | ||
ethQuery[method](...args, cb); | ||
@@ -418,0 +418,0 @@ } |
{ | ||
"name": "@metamask/controller-utils", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Data and convenience functions shared by multiple packages", | ||
@@ -34,3 +34,5 @@ "keywords": [ | ||
"@spruceid/siwe-parser": "1.1.3", | ||
"babel-runtime": "^6.26.0", | ||
"eth-ens-namehash": "^2.0.8", | ||
"eth-query": "^2.1.2", | ||
"eth-rpc-errors": "^4.0.2", | ||
@@ -37,0 +39,0 @@ "ethereumjs-util": "^7.0.10", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105245
9
1269
+ Addedbabel-runtime@^6.26.0
+ Addedeth-query@^2.1.2
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedeth-query@2.1.2(transitive)
+ Addedjson-rpc-random-id@1.0.1(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
+ Addedxtend@4.0.2(transitive)