Socket
Socket
Sign inDemoInstall

@metamask-previews/approval-controller

Package Overview
Dependencies
Maintainers
2
Versions
256
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask-previews/approval-controller - npm Package Compare versions

Comparing version 5.0.0-preview.3fbb6b41 to 5.1.1-preview.353ee83b

12

CHANGELOG.md

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

## [5.1.1]
### Changed
- Bump `@metamask/base-controller` to `^4.0.1` ([#3695](https://github.com/MetaMask/core/pull/3695))
## [5.1.0]
### Added
- Add `title` and `icon` options to `success` and `error` methods ([#3675](https://github.com/MetaMask/core/pull/3675))
## [5.0.0]

@@ -101,3 +109,5 @@ ### Changed

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@5.0.0...HEAD
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@5.1.1...HEAD
[5.1.1]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@5.1.0...@metamask/approval-controller@5.1.1
[5.1.0]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@5.0.0...@metamask/approval-controller@5.1.0
[5.0.0]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.1.0...@metamask/approval-controller@5.0.0

@@ -104,0 +114,0 @@ [4.1.0]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.0.1...@metamask/approval-controller@4.1.0

@@ -18,2 +18,4 @@ import type { ControllerGetStateAction } from '@metamask/base-controller';

header?: (string | ResultComponent)[];
icon?: string | null;
title?: string | null;
};

@@ -418,2 +420,4 @@ export declare type ApprovalRequest<RequestData extends ApprovalRequestData> = {

* @param opts.flowToEnd - The ID of the approval flow to end once the success page is approved.
* @param opts.title - The title to display above the message. Shown by default but can be hidden with `null`.
* @param opts.icon - The icon to display in the page. Shown by default but can be hidden with `null`.
* @returns Empty object to support future additions.

@@ -429,2 +433,4 @@ */

* @param opts.flowToEnd - The ID of the approval flow to end once the error page is approved.
* @param opts.title - The title to display above the message. Shown by default but can be hidden with `null`.
* @param opts.icon - The icon to display in the page. Shown by default but can be hidden with `null`.
* @returns Empty object to support future additions.

@@ -431,0 +437,0 @@ */

10

dist/ApprovalController.js

@@ -288,3 +288,2 @@ "use strict";

this.update((draftState) => {
// Typecast: ts(2589)
draftState.pendingApprovals[opts.id].requestState =

@@ -357,2 +356,4 @@ opts.requestState;

* @param opts.flowToEnd - The ID of the approval flow to end once the success page is approved.
* @param opts.title - The title to display above the message. Shown by default but can be hidden with `null`.
* @param opts.icon - The icon to display in the page. Shown by default but can be hidden with `null`.
* @returns Empty object to support future additions.

@@ -365,2 +366,4 @@ */

header: opts.header,
title: opts.title,
icon: opts.icon,
});

@@ -377,2 +380,4 @@ return {};

* @param opts.flowToEnd - The ID of the approval flow to end once the error page is approved.
* @param opts.title - The title to display above the message. Shown by default but can be hidden with `null`.
* @param opts.icon - The icon to display in the page. Shown by default but can be hidden with `null`.
* @returns Empty object to support future additions.

@@ -385,2 +390,4 @@ */

header: opts.header,
title: opts.title,
icon: opts.icon,
});

@@ -448,3 +455,2 @@ return {};

this.update((draftState) => {
// Typecast: ts(2589)
draftState.pendingApprovals[id] = approval;

@@ -451,0 +457,0 @@ draftState.pendingApprovalCount = Object.keys(draftState.pendingApprovals).length;

{
"name": "@metamask-previews/approval-controller",
"version": "5.0.0-preview.3fbb6b41",
"version": "5.1.1-preview.353ee83b",
"description": "Manages requests that require user approval",

@@ -25,2 +25,3 @@ "keywords": [

"build:docs": "typedoc",
"changelog:update": "../../scripts/update-changelog.sh @metamask/approval-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/approval-controller",

@@ -34,3 +35,3 @@ "publish:preview": "yarn npm publish --tag preview",

"dependencies": {
"@metamask/base-controller": "^4.0.0",
"@metamask/base-controller": "^4.0.1",
"@metamask/rpc-errors": "^6.1.0",

@@ -41,3 +42,3 @@ "@metamask/utils": "^8.2.0",

"devDependencies": {
"@metamask/auto-changelog": "^3.4.3",
"@metamask/auto-changelog": "^3.4.4",
"@types/jest": "^27.4.1",

@@ -44,0 +45,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