Socket
Socket
Sign inDemoInstall

@metamask/approval-controller

Package Overview
Dependencies
Maintainers
12
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/approval-controller - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0

8

CHANGELOG.md

@@ -9,2 +9,7 @@ # Changelog

## [4.1.0]
### Added
- Add `show` option for `startFlow` ([#1886](https://github.com/MetaMask/core/pull/1886))
- This option lets you initiate a new approval flow without triggering the UI immediately.
## [4.0.1]

@@ -90,3 +95,4 @@ ### Changed

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.0.1...HEAD
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.1.0...HEAD
[4.1.0]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.0.1...@metamask/approval-controller@4.1.0
[4.0.1]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.0.0...@metamask/approval-controller@4.0.1

@@ -93,0 +99,0 @@ [4.0.0]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@3.5.2...@metamask/approval-controller@4.0.0

7

dist/ApprovalController.d.ts

@@ -103,3 +103,5 @@ import type { RestrictedControllerMessenger } from '@metamask/base-controller';

};
export declare type StartFlowOptions = OptionalField<ApprovalFlow, 'id' | 'loadingText'>;
export declare type StartFlowOptions = OptionalField<ApprovalFlow, 'id' | 'loadingText'> & {
show?: boolean;
};
export declare type EndFlowOptions = Pick<ApprovalFlow, 'id'>;

@@ -220,3 +222,3 @@ export declare type SetFlowLoadingTextOptions = ApprovalFlow;

* @param options.state - The initial controller state.
* @param options.typesExcludedFromRateLimiting - Array of aproval types which allow multiple pending approval requests from the same origin.
* @param options.typesExcludedFromRateLimiting - Array of approval types which allow multiple pending approval requests from the same origin.
*/

@@ -398,2 +400,3 @@ constructor({ messenger, showApprovalRequest, state, typesExcludedFromRateLimiting, }: ApprovalControllerOptions);

* @param opts.loadingText - The loading text that will be associated to the approval flow.
* @param opts.show - A flag to determine whether the approval should show to the user.
* @returns The object containing the approval flow id.

@@ -400,0 +403,0 @@ */

@@ -66,3 +66,3 @@ "use strict";

* @param options.state - The initial controller state.
* @param options.typesExcludedFromRateLimiting - Array of aproval types which allow multiple pending approval requests from the same origin.
* @param options.typesExcludedFromRateLimiting - Array of approval types which allow multiple pending approval requests from the same origin.
*/

@@ -300,2 +300,3 @@ constructor({ messenger, showApprovalRequest, state = {}, typesExcludedFromRateLimiting = [], }) {

* @param opts.loadingText - The loading text that will be associated to the approval flow.
* @param opts.show - A flag to determine whether the approval should show to the user.
* @returns The object containing the approval flow id.

@@ -310,3 +311,6 @@ */

});
__classPrivateFieldGet(this, _ApprovalController_showApprovalRequest, "f").call(this);
// By default, if nothing else is specified, we always show the approval.
if (opts.show !== false) {
__classPrivateFieldGet(this, _ApprovalController_showApprovalRequest, "f").call(this);
}
return { id, loadingText };

@@ -313,0 +317,0 @@ }

{
"name": "@metamask/approval-controller",
"version": "4.0.1",
"version": "4.1.0",
"description": "Manages requests that require user approval",

@@ -39,3 +39,3 @@ "keywords": [

"devDependencies": {
"@metamask/auto-changelog": "^3.1.0",
"@metamask/auto-changelog": "^3.4.0",
"@types/jest": "^27.4.1",

@@ -42,0 +42,0 @@ "deepmerge": "^4.2.2",

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