Socket
Socket
Sign inDemoInstall

@metamask/controller-utils

Package Overview
Dependencies
Maintainers
9
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/controller-utils - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

10

CHANGELOG.md

@@ -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

11

dist/util.d.ts
/// <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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc